Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { HTTPTimeout time.Duration CommandName string Logger log.Logger // contains filtered or unexported fields }
Client is the default wrapper around an http client extra helpers for our APIs around using bearer tokens
func NewClient ¶
NewClient creates a new default client with no options set This is typically just passed into a service call like
notifications.NewNotificationSvc(client.NewClient())
type Option ¶
type Option func(*Client)
Option is used for setting client options for the SDK
func WithBearerToken ¶
WithBearerToken lets you set a token to include with every request
func WithHTTPClient ¶
WithHTTPClient sets the underlying http client for use with requests, overrides default of http.DefaultClient
func WithHTTPTimeout ¶
WithHTTPTimeout sets how long the request has to finish, this defaults to 5 seconds
func WithHeader ¶
WithHeader lets you add additional header values to all requests
func WithLogger ¶
WithLogger sets the underlying logger to be used with any Client passing through the returned Option
func WithTenant ¶
WithTenant lets you set a tenant id with every request