Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIEndpoint ¶
type APIEndpoint string
APIEndpoint represents a api endpoint
const ( // APIEndpointProduction Production API endpoint APIEndpointProduction APIEndpoint = "https://monitor.certified-senders.org/api/v1" // APIEndpointBeta Beta API endpoint APIEndpointBeta APIEndpoint = "https://monitor-beta.certified-senders.org/api/v1" )
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents the main client
func NewWithClient ¶
NewWithClient creates a new Client with a given http.Client
func NewWithOptions ¶
func NewWithOptions(options ...ClientOption) (*Client, error)
NewWithOptions creates a new Client with given options
type ClientOption ¶
type ClientOption func(*Client)
ClientOption options for creating the client
func WithAPIEndpoint ¶
func WithAPIEndpoint(api APIEndpoint) ClientOption
WithAPIEndpoint supplies a API Endpoint to be used
func WithCredentials ¶
func WithCredentials(apiName, apiKey string) ClientOption
WithCredentials supplies the api credentials
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) ClientOption
WithHTTPClient supplies a already created http.Client
func WithLogger ¶
func WithLogger(logger *zerolog.Logger) ClientOption
WithLogger supplies a logger for the transport client
Click to show internal directories.
Click to hide internal directories.