Documentation ¶
Index ¶
- Constants
- func AppTokenMiddleware(req *http.Request) error
- func GetAppToken() (string, error)
- func ServiceIDMiddleware(req *http.Request) error
- func TenantAndUserMiddleware(req *http.Request) error
- type HttpClient
- func (c *HttpClient) DeleteJson(path string, headers map[string][]string, data interface{}, ...) ([]byte, error)
- func (c *HttpClient) Get(path string, headers map[string][]string, mids ...ReqMiddleWare) ([]byte, error)
- func (c *HttpClient) PatchJson(path string, headers map[string][]string, data interface{}, ...) ([]byte, error)
- func (c *HttpClient) PostBson(path string, headers map[string][]string, data interface{}, ...) ([]byte, error)
- func (c *HttpClient) PostFormData(path string, headers map[string][]string, body *bytes.Buffer, ...) ([]byte, error)
- func (c *HttpClient) PostJson(path string, headers map[string][]string, data interface{}, ...) ([]byte, error)
- type ReqMiddleWare
Constants ¶
View Source
const (
OpenapiPath_GetToken = "/auth/v1/appToken"
)
Variables ¶
This section is empty.
Functions ¶
func AppTokenMiddleware ¶
func GetAppToken ¶
func ServiceIDMiddleware ¶ added in v0.0.4
func TenantAndUserMiddleware ¶ added in v0.0.4
Types ¶
type HttpClient ¶
func GetOpenapiClient ¶
func GetOpenapiClient() *HttpClient
func (*HttpClient) DeleteJson ¶
func (c *HttpClient) DeleteJson(path string, headers map[string][]string, data interface{}, mids ...ReqMiddleWare) ([]byte, error)
func (*HttpClient) Get ¶
func (c *HttpClient) Get(path string, headers map[string][]string, mids ...ReqMiddleWare) ([]byte, error)
func (*HttpClient) PatchJson ¶
func (c *HttpClient) PatchJson(path string, headers map[string][]string, data interface{}, mids ...ReqMiddleWare) ([]byte, error)
func (*HttpClient) PostBson ¶ added in v0.0.4
func (c *HttpClient) PostBson(path string, headers map[string][]string, data interface{}, mids ...ReqMiddleWare) ([]byte, error)
func (*HttpClient) PostFormData ¶
func (c *HttpClient) PostFormData(path string, headers map[string][]string, body *bytes.Buffer, mids ...ReqMiddleWare) ([]byte, error)
func (*HttpClient) PostJson ¶
func (c *HttpClient) PostJson(path string, headers map[string][]string, data interface{}, mids ...ReqMiddleWare) ([]byte, error)
type ReqMiddleWare ¶
Click to show internal directories.
Click to hide internal directories.