massive draft for payment process (UNCOMPLETE)
This commit is contained in:
@@ -16,6 +16,7 @@ const (
|
||||
GET METHOD = iota
|
||||
PUT
|
||||
POST
|
||||
POSTCHECK
|
||||
DELETE
|
||||
|
||||
STRICT_INTERNAL_GET
|
||||
@@ -26,7 +27,7 @@ const (
|
||||
|
||||
// String returns the string of the enum
|
||||
func (m METHOD) String() string {
|
||||
return [...]string{"GET", "PUT", "POST", "DELETE", "INTERNALGET", "INTERNALPUT", "INTERNALPOST", "INTERNALDELETE"}[m]
|
||||
return [...]string{"GET", "PUT", "POST", "POST", "DELETE", "INTERNALGET", "INTERNALPUT", "INTERNALPOST", "INTERNALDELETE"}[m]
|
||||
}
|
||||
|
||||
// EnumIndex returns the index of the enum
|
||||
@@ -36,7 +37,7 @@ 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, POSTCHECK, DELETE,
|
||||
STRICT_INTERNAL_GET, STRICT_INTERNAL_PUT, STRICT_INTERNAL_POST, STRICT_INTERNAL_DELETE} {
|
||||
if s.String() == str {
|
||||
return s
|
||||
|
||||
Reference in New Issue
Block a user