Documentation ¶
Index ¶
- Variables
- type Client
- type ClientLogger
- func (client *ClientLogger) Call(ctx context.Context, api string, targetType int) (*http.Response, error)
- func (client *ClientLogger) Endpoint(api string) (*url.URL, error)
- func (client *ClientLogger) Load(ctx context.Context) error
- func (client *ClientLogger) NewPostRequest(api string, params url.Values) (*http.Request, error)
- func (client *ClientLogger) Send(ctx context.Context, req *http.Request, targetType int) (*http.Response, error)
- type DatabaseStore
- type HttpClient
- func (client *HttpClient) Call(ctx context.Context, api string, targetType int) (*http.Response, error)
- func (client *HttpClient) Endpoint(api string) (*url.URL, error)
- func (client *HttpClient) Load(ctx context.Context) error
- func (client *HttpClient) NewPostRequest(api string, params url.Values) (*http.Request, error)
- func (client *HttpClient) Send(ctx context.Context, req *http.Request, targetType int) (*http.Response, error)
- type MockClient
- func (client *MockClient) AppendResponse(res *http.Response)
- func (client *MockClient) Call(ctx context.Context, api string, targetType int) (*http.Response, error)
- func (client *MockClient) Endpoint(api string) (*url.URL, error)
- func (client *MockClient) Load(ctx context.Context) error
- func (client *MockClient) MockRemaining() int
- func (client *MockClient) NewPostRequest(api string, params url.Values) (*http.Request, error)
- func (client *MockClient) Send(ctx context.Context, req *http.Request, targetType int) (*http.Response, error)
- type Status
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var Api = 2
View Source
var Webpage = 1
View Source
var WebpageApi = 3 // without "x-dbd-xsrf"
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Load(ctx context.Context) error Call(ctx context.Context, api string, targetType int) (*http.Response, error) Send(ctx context.Context, req *http.Request, targetType int) (*http.Response, error) Endpoint(api string) (*url.URL, error) NewPostRequest(api string, params url.Values) (*http.Request, error) }
type ClientLogger ¶
func WrapLogger ¶
func WrapLogger(client Client, dir string) *ClientLogger
func (*ClientLogger) NewPostRequest ¶
type DatabaseStore ¶
func NewDatabaseStore ¶
func NewDatabaseStore(db *sqlx.DB) *DatabaseStore
func (*DatabaseStore) GetCookies ¶
func (store *DatabaseStore) GetCookies() []*http.Cookie
func (*DatabaseStore) RestoreCookies ¶
func (store *DatabaseStore) RestoreCookies(ctx context.Context) error
func (*DatabaseStore) SetCookies ¶
func (store *DatabaseStore) SetCookies(cookies []*http.Cookie)
type HttpClient ¶
func NewClient ¶
func NewClient(store Store) (*HttpClient, error)
func (*HttpClient) NewPostRequest ¶
type MockClient ¶
func NewMockClient ¶
func NewMockClient() *MockClient
func (*MockClient) AppendResponse ¶
func (client *MockClient) AppendResponse(res *http.Response)
func (*MockClient) MockRemaining ¶
func (client *MockClient) MockRemaining() int
func (*MockClient) NewPostRequest ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.