Documentation
¶
Index ¶
- Variables
- type APIError
- type ActivateRequest
- type ActivateResponse
- type Client
- func (c *Client) Activate(ctx context.Context, req ActivateRequest) (*ActivateResponse, error)
- func (c *Client) BaseURL() string
- func (c *Client) Deactivate(ctx context.Context, req DeactivateRequest) (*DeactivateResponse, error)
- func (c *Client) Validate(ctx context.Context, req ValidateRequest) (*ValidateResponse, error)
- type DeactivateRequest
- type DeactivateResponse
- type OptFunc
- type ValidateRequest
- type ValidateResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLicenseKey = errors.New("license key is invalid") ErrLicenseNotFound = errors.New("license key not found") ErrActivationLimitExceeded = errors.New("license activation limit exceeded") ErrInstanceNotFound = errors.New("license activation instance not found") ErrRateLimitExceeded = errors.New("rate limit exceeded") )
Functions ¶
This section is empty.
Types ¶
type ActivateRequest ¶
type ActivateResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Activate ¶
func (c *Client) Activate(ctx context.Context, req ActivateRequest) (*ActivateResponse, error)
func (*Client) Deactivate ¶
func (c *Client) Deactivate(ctx context.Context, req DeactivateRequest) (*DeactivateResponse, error)
func (*Client) Validate ¶
func (c *Client) Validate(ctx context.Context, req ValidateRequest) (*ValidateResponse, error)
type DeactivateRequest ¶
type DeactivateResponse ¶
type DeactivateResponse struct {
Success bool `json:"success"`
}
type OptFunc ¶
type OptFunc func(*Client)
func WithBaseURL ¶
func WithEnvironment ¶
WithEnvironment sets the Dodo Payments environment ("test_mode" or "live_mode").
func WithHTTPClient ¶
func WithUserAgent ¶
type ValidateRequest ¶
Click to show internal directories.
Click to hide internal directories.