From 719fa239e0d19259ce2f2a68c123edaae9323a69 Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 22 Oct 2024 14:23:39 +0200 Subject: [PATCH] method --- tools/remote_caller.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/remote_caller.go b/tools/remote_caller.go index 6c7f36b..bf1ce37 100644 --- a/tools/remote_caller.go +++ b/tools/remote_caller.go @@ -15,11 +15,16 @@ const ( PUT POST DELETE + + STRICT_INTERNAL_GET + STRICT_INTERNAL_PUT + STRICT_INTERNAL_POST + STRICT_INTERNAL_DELETE ) // String returns the string of the enum func (m METHOD) String() string { - return [...]string{"GET", "PUT", "POST", "DELETE"}[m] + return [...]string{"GET", "PUT", "POST", "DELETE", "INTERNALGET", "INTERNALPUT", "INTERNALPOST", "INTERNALDELETE"}[m] } // EnumIndex returns the index of the enum @@ -29,7 +34,8 @@ func (m METHOD) EnumIndex() int { // ToMethod returns the method from a string func ToMethod(str string) METHOD { - for _, s := range []METHOD{GET, PUT, POST, DELETE} { + for _, s := range []METHOD{GET, PUT, POST, DELETE, + STRICT_INTERNAL_GET, STRICT_INTERNAL_PUT, STRICT_INTERNAL_POST, STRICT_INTERNAL_DELETE} { if s.String() == str { return s }