Documentation ¶
Index ¶
- type StripeConfig
- func (c *StripeConfig) CreateClient() (*client.API, error)
- func (c *StripeConfig) GetClient() (client.API, error)
- func (c *StripeConfig) Merge(other *StripeConfig) error
- func (c *StripeConfig) RegisterFlags(f *flag.FlagSet)
- func (c *StripeConfig) Validate() error
- func (c *StripeConfig) WithClient(client *client.API)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StripeConfig ¶
type StripeConfig struct { sync.RWMutex SecretKey string `toml:"secret_key"` // contains filtered or unexported fields }
func (*StripeConfig) CreateClient ¶
func (c *StripeConfig) CreateClient() (*client.API, error)
func (*StripeConfig) Merge ¶
func (c *StripeConfig) Merge(other *StripeConfig) error
func (*StripeConfig) RegisterFlags ¶
func (c *StripeConfig) RegisterFlags(f *flag.FlagSet)
func (*StripeConfig) Validate ¶
func (c *StripeConfig) Validate() error
func (*StripeConfig) WithClient ¶
func (c *StripeConfig) WithClient(client *client.API)
set the stripe client manually. useful when writing tests with an already initialized client.
WARNING: if you use this parameter, be careful to not use CreateClient() as it will overwrite the manually set client. I don't currently have a good solution to get around this.
Click to show internal directories.
Click to hide internal directories.