Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsCurlCommand ¶
func AsCurlCommand(request *gorequest.SuperAgent) (string, error)
AsCurlCommand returns a string representing the runnable `curl' command version of the request.
Types ¶
type CallbackFunc ¶
CallbackFunc is the func object of http callback
func NewMetricCallback ¶
func NewMetricCallback(system string, start time.Time) CallbackFunc
NewMetricCallback will record the http request data into metrics
type ESBClient ¶
type ESBClient interface {
GetApplyURL(bkToken string, bkUsername string, body interface{}) (string, error)
}
ESBClient is the interface of esb
type ESBResponse ¶
type ESBResponse struct { Code int `json:"code"` Result bool `json:"result"` Message string `json:"message"` Data map[string]interface{} `json:"data"` }
ESBResponse is the struct of esb response
type IAMBackendBaseResponse ¶
type IAMBackendBaseResponse struct { Code int `json:"code"` Message string `json:"message"` Data json.RawMessage `json:"data"` }
IAMBackendBaseResponse is the struct of iam backend response
func (*IAMBackendBaseResponse) Error ¶
func (r *IAMBackendBaseResponse) Error() error
Error will check if the response with error
func (*IAMBackendBaseResponse) String ¶
func (r *IAMBackendBaseResponse) String() string
String will return the detail text of the response
type IAMBackendClient ¶
type IAMBackendClient interface { Ping() error GetToken() (token string, err error) PolicyQuery(body interface{}) (map[string]interface{}, error) PolicyQueryByActions(body interface{}) ([]map[string]interface{}, error) PolicyAuth(body interface{}) (data map[string]interface{}, err error) PolicyAuthByResources(body interface{}) (data map[string]interface{}, err error) PolicyAuthByActions(body interface{}) (data map[string]interface{}, err error) PolicyGet(policyID int64) (data map[string]interface{}, err error) PolicyList(body interface{}) (data map[string]interface{}, err error) PolicySubjects(policyIDs []int64) (data []map[string]interface{}, err error) }
IAMBackendClient is the interface of iam backend client
func NewIAMBackendClient ¶
func NewIAMBackendClient(host string, system string, appCode string, appSecret string) IAMBackendClient
NewIAMBackendClient will create a iam backend client
Click to show internal directories.
Click to hide internal directories.