Documentation
¶
Index ¶
- type AdClient
- func (c *AdClient) AppendMiddleware(middleware Middleware)
- func (c *AdClient) GenMiddlewareHandleFunc(middleware Middleware, ...) func(req *http.Request) (rsp *http.Response, err error)
- func (c *AdClient) IsDebug() bool
- func (c *AdClient) RoundTrip(req *http.Request) (rsp *http.Response, err error)
- func (c *AdClient) SetDebug(b bool)
- func (c *AdClient) SetHeader(key string, value string)
- func (c *AdClient) SetHeaders(header http.Header)
- func (c *AdClient) SetHost(schema, host, apiVersion string)
- func (c *AdClient) UseProduction()
- func (c *AdClient) UseSandbox()
- type LogMiddleware
- type Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdClient ¶
type AdClient struct { http.RoundTripper Cfg *conf.AdConfig ApiVersion string Client *api.APIClient // contains filtered or unexported fields }
func (*AdClient) AppendMiddleware ¶
func (c *AdClient) AppendMiddleware(middleware Middleware)
func (*AdClient) GenMiddlewareHandleFunc ¶
func (c *AdClient) GenMiddlewareHandleFunc(middleware Middleware, beforeFunc func(req *http.Request) (rsp *http.Response, err error), ) func(req *http.Request) (rsp *http.Response, err error)
GenMiddlewareHandleFunc ...
func (*AdClient) SetHeaders ¶
func (*AdClient) UseProduction ¶
func (c *AdClient) UseProduction()
func (*AdClient) UseSandbox ¶
func (c *AdClient) UseSandbox()
type LogMiddleware ¶
type LogMiddleware struct {
// contains filtered or unexported fields
}
LogMiddleware ...
func NewLogMiddleware ¶
func NewLogMiddleware(c *AdClient, f io.Writer) *LogMiddleware
Click to show internal directories.
Click to hide internal directories.