Versions in this module Expand all Collapse all v0 v0.8.0 Jun 9, 2023 Changes in this version + type APIConfig struct + Headers map[string]string + Path string + Query map[string]string + type Client struct + func (c *Client) Delete(ctx context.Context, apiConfig *APIConfig) (*Response, error) + func (c *Client) Get(ctx context.Context, apiConfig *APIConfig) (*Response, error) + func (c *Client) GetClient() *http.Client + func (c *Client) GetOrganizationID() string + func (c *Client) GetValidator() *validator.Validate + func (c *Client) Post(ctx context.Context, apiConfig *APIConfig, apiRequest any) (*Response, error) + func (c *Client) PostFile(ctx context.Context, apiConfig *APIConfig, body *bytes.Buffer, ...) (*Response, error) + func (c *Client) Stream(ctx context.Context, apiConfig *APIConfig, method Method, apiRequest any) (*Response, error) + type Method int + const DELETE + const GET + const PATCH + const POST + const PUT + func (i Method) String() string + type Option func(client *Client) + func Concurrency(n int) Option + func SetEmptyMessageLimit(limit uint) Option + func Timeout(d time.Duration) Option + func WithCustomBaseURL(baseURL string) Option + func WithCustomClient(client *http.Client) Option + func WithOrganizationID(orgID string) Option + func WithRateLimit(every time.Duration, requestPerTime int) Option + type Response struct + func (r *Response) GetHttpResponse() *http.Response + func (r *Response) GetJSON(response any) error + type Transporter interface + Delete func(ctx context.Context, apiConfig *APIConfig) (*Response, error) + Get func(ctx context.Context, apiConfig *APIConfig) (*Response, error) + GetClient func() *http.Client + GetOrganizationID func() string + GetValidator func() *validator.Validate + Post func(ctx context.Context, apiConfig *APIConfig, apiRequest any) (*Response, error) + PostFile func(ctx context.Context, apiConfig *APIConfig, body *bytes.Buffer, ...) (*Response, error) + func New(apiKeys []string, opts ...Option) (Transporter, error)