Documentation ¶
Index ¶
- Variables
- func Bool(b bool) *bool
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int64(i int64) *int64
- func String(s string) *string
- type HTTPClient
- type Octopus
- func (s *Octopus) GetCampaignsCampaignID(ctx context.Context, request operations.GetCampaignsCampaignIDRequest) (*operations.GetCampaignsCampaignIDResponse, error)
- func (s *Octopus) PostCampaigns(ctx context.Context, request shared.CampaignRequest) (*operations.PostCampaignsResponse, error)
- func (s *Octopus) PostCampaignsCampaignIDSend(ctx context.Context, request operations.PostCampaignsCampaignIDSendRequest) (*operations.PostCampaignsCampaignIDSendResponse, error)
- func (s *Octopus) PostSubscribe(ctx context.Context, request shared.SubscriptionRequest) (*operations.PostSubscribeResponse, error)
- func (s *Octopus) PostUnsubscribe(ctx context.Context, request shared.SubscriptionRequest) (*operations.PostUnsubscribeResponse, error)
- func (s *Octopus) PutCampaignsCampaignID(ctx context.Context, request operations.PutCampaignsCampaignIDRequest) (*operations.PutCampaignsCampaignIDResponse, error)
- type SDKOption
- func WithClient(client HTTPClient) SDKOption
- func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption
- func WithSecurity(apiKey string) SDKOption
- func WithSecuritySource(security func(context.Context) (shared.Security, error)) SDKOption
- func WithServerIndex(serverIndex int) SDKOption
- func WithServerURL(serverURL string) SDKOption
- func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption
Constants ¶
This section is empty.
Variables ¶
var ServerList = []string{
"https://api.octopus.com",
}
ServerList contains the list of servers available to the SDK
Functions ¶
Types ¶
type HTTPClient ¶
HTTPClient provides an interface for suplying the SDK with a custom HTTP client
type Octopus ¶
type Octopus struct {
// contains filtered or unexported fields
}
Octopus API: API for Octopus - email marketing software.
func (*Octopus) GetCampaignsCampaignID ¶
func (s *Octopus) GetCampaignsCampaignID(ctx context.Context, request operations.GetCampaignsCampaignIDRequest) (*operations.GetCampaignsCampaignIDResponse, error)
GetCampaignsCampaignID - Get Campaign
func (*Octopus) PostCampaigns ¶
func (s *Octopus) PostCampaigns(ctx context.Context, request shared.CampaignRequest) (*operations.PostCampaignsResponse, error)
PostCampaigns - Create Campaign
func (*Octopus) PostCampaignsCampaignIDSend ¶
func (s *Octopus) PostCampaignsCampaignIDSend(ctx context.Context, request operations.PostCampaignsCampaignIDSendRequest) (*operations.PostCampaignsCampaignIDSendResponse, error)
PostCampaignsCampaignIDSend - Send Campaign
func (*Octopus) PostSubscribe ¶
func (s *Octopus) PostSubscribe(ctx context.Context, request shared.SubscriptionRequest) (*operations.PostSubscribeResponse, error)
PostSubscribe - Subscribe
func (*Octopus) PostUnsubscribe ¶
func (s *Octopus) PostUnsubscribe(ctx context.Context, request shared.SubscriptionRequest) (*operations.PostUnsubscribeResponse, error)
PostUnsubscribe - Unsubscribe
func (*Octopus) PutCampaignsCampaignID ¶
func (s *Octopus) PutCampaignsCampaignID(ctx context.Context, request operations.PutCampaignsCampaignIDRequest) (*operations.PutCampaignsCampaignIDResponse, error)
PutCampaignsCampaignID - Update Campaign
type SDKOption ¶
type SDKOption func(*Octopus)
func WithClient ¶
func WithClient(client HTTPClient) SDKOption
WithClient allows the overriding of the default HTTP client used by the SDK
func WithRetryConfig ¶ added in v0.3.0
func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption
func WithSecurity ¶
WithSecurity configures the SDK to use the provided security details
func WithSecuritySource ¶ added in v0.4.0
WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication
func WithServerIndex ¶
WithServerIndex allows the overriding of the default server by index
func WithServerURL ¶
WithServerURL allows the overriding of the default server URL