massive draft for payment process (UNCOMPLETE)
This commit is contained in:
@@ -11,6 +11,13 @@ import (
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
)
|
||||
|
||||
type APIRequest struct {
|
||||
Username string
|
||||
PeerID string
|
||||
Groups []string
|
||||
Caller *HTTPCaller
|
||||
}
|
||||
|
||||
/*
|
||||
* API is the Health Check API
|
||||
* it defines the health check methods
|
||||
|
@@ -20,6 +20,8 @@ const (
|
||||
BOOKING
|
||||
WORKFLOW_HISTORY
|
||||
WORKSPACE_HISTORY
|
||||
ORDER
|
||||
BUYING_STATUS
|
||||
)
|
||||
|
||||
var NOAPI = ""
|
||||
@@ -48,6 +50,8 @@ var DefaultAPI = [...]string{
|
||||
DATACENTERAPI,
|
||||
NOAPI,
|
||||
NOAPI,
|
||||
NOAPI,
|
||||
NOAPI,
|
||||
}
|
||||
|
||||
// Bind the standard data name to the data type
|
||||
@@ -68,6 +72,8 @@ var Str = [...]string{
|
||||
"booking",
|
||||
"workflow_history",
|
||||
"workspace_history",
|
||||
"order",
|
||||
"buying_status",
|
||||
}
|
||||
|
||||
func FromInt(i int) string {
|
||||
|
@@ -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