Documentation ¶
Index ¶
- Variables
- type RestClient
- func (rc *RestClient) Auth(token string) *RestClient
- func (rc *RestClient) Decrypt(h func(payload []byte) ([]byte, error)) *RestClient
- func (rc *RestClient) Encrypt(h func(payload []byte) ([]byte, error)) *RestClient
- func (rc *RestClient) Form(req map[string]string) (code int, err error)
- func (rc *RestClient) FormUrl(req map[string]string) (code int, err error)
- func (rc *RestClient) Get(query map[string]string) (code int, err error)
- func (rc *RestClient) Header(name, value string) *RestClient
- func (rc *RestClient) Path(name ...string) *RestClient
- func (rc *RestClient) Post(payload []byte) (code int, err error)
- func (rc *RestClient) PostQuery(query map[string]string) (code int, err error)
- func (rc *RestClient) ResponseJson(respPtr any) *RestClient
Constants ¶
This section is empty.
Variables ¶
View Source
var DebugEnable bool
Functions ¶
This section is empty.
Types ¶
type RestClient ¶
type RestClient struct {
// contains filtered or unexported fields
}
func NewRest ¶
func NewRest(host string) *RestClient
func (*RestClient) Auth ¶
func (rc *RestClient) Auth(token string) *RestClient
func (*RestClient) Decrypt ¶
func (rc *RestClient) Decrypt(h func(payload []byte) ([]byte, error)) *RestClient
func (*RestClient) Encrypt ¶
func (rc *RestClient) Encrypt(h func(payload []byte) ([]byte, error)) *RestClient
func (*RestClient) FormUrl ¶
func (rc *RestClient) FormUrl(req map[string]string) (code int, err error)
func (*RestClient) Header ¶
func (rc *RestClient) Header(name, value string) *RestClient
func (*RestClient) Path ¶
func (rc *RestClient) Path(name ...string) *RestClient
func (*RestClient) PostQuery ¶ added in v0.0.10
func (rc *RestClient) PostQuery(query map[string]string) (code int, err error)
func (*RestClient) ResponseJson ¶
func (rc *RestClient) ResponseJson(respPtr any) *RestClient
Click to show internal directories.
Click to hide internal directories.