Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type HTTPClient ¶
type HTTPClient interface { RequestJSON(ctx context.Context, method, path string, in interface{}, out interface{}, mods ...RequestModifier) ([]byte, http.Header, int, error) PostJSON(ctx context.Context, path string, in interface{}, out interface{}, mods ...RequestModifier) (int, error) PutJSON(ctx context.Context, path string, in interface{}, out interface{}, mods ...RequestModifier) (int, error) GetJSON(ctx context.Context, path string, out interface{}, mods ...RequestModifier) (int, error) DeleteJSON(ctx context.Context, path string, out interface{}, mods ...RequestModifier) (int, error) }
HTTPClient is a interface for HTTPClient mock
func NewClient ¶
func NewClient(host, token string) HTTPClient
type RequestModifier ¶
RequestModifier is used to modify behavior of Request and Steam functions
func SetHeader ¶
func SetHeader(key, value string) RequestModifier
SetHeader modify headers of http.Request
func WithQueryParameter ¶
func WithQueryParameter(key, value string) RequestModifier
WithQueryParameter add query parameters to your http.Request
Click to show internal directories.
Click to hide internal directories.