Documentation ¶
Index ¶
- Constants
- func IsApplicationErr(err error) bool
- type Config
- type GameType
- type Interface
- type RESTClient
- func (c *RESTClient) Cookies() []*http.Cookie
- func (c *RESTClient) Delete() *Request
- func (c *RESTClient) Get() *Request
- func (c *RESTClient) Head() *Request
- func (c *RESTClient) NextRequestID() uint64
- func (c *RESTClient) Post() *Request
- func (c *RESTClient) Put() *Request
- func (c *RESTClient) Verb(verb string) *Request
- type Request
- func (r *Request) Body(obj interface{}) *Request
- func (r *Request) BodyKV(k string, v interface{}) *Request
- func (r *Request) Do() *Result
- func (r *Request) GID(id GameType) *Request
- func (r *Request) Header(k, v string) *Request
- func (r *Request) ParamAdd(k, v string) *Request
- func (r *Request) ParamSet(k, v string) *Request
- func (r *Request) Path(path string) *Request
- func (r *Request) Use(o RequestOptions) *Request
- type RequestOptions
- type Result
Constants ¶
View Source
const ( MysAppVersion = "2.7.0" DsSalt = "14bmu1mz0yuljprsfgpvjh3ju2ni468r" MysClientType = "5" )
Variables ¶
This section is empty.
Functions ¶
func IsApplicationErr ¶
Types ¶
type RESTClient ¶
type RESTClient struct {
// contains filtered or unexported fields
}
func NewRESTClient ¶
func NewRESTClient(base url.URL, cfg *Config) *RESTClient
func (*RESTClient) Cookies ¶
func (c *RESTClient) Cookies() []*http.Cookie
func (*RESTClient) Delete ¶
func (c *RESTClient) Delete() *Request
func (*RESTClient) Get ¶
func (c *RESTClient) Get() *Request
func (*RESTClient) Head ¶
func (c *RESTClient) Head() *Request
func (*RESTClient) NextRequestID ¶
func (c *RESTClient) NextRequestID() uint64
return the next request ID. Auto incremental.
func (*RESTClient) Post ¶
func (c *RESTClient) Post() *Request
func (*RESTClient) Put ¶
func (c *RESTClient) Put() *Request
func (*RESTClient) Verb ¶
func (c *RESTClient) Verb(verb string) *Request
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func (*Request) Use ¶
func (r *Request) Use(o RequestOptions) *Request
type RequestOptions ¶
Click to show internal directories.
Click to hide internal directories.