Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncPollResult ¶
AsyncPollResult is the data returned from polling for keys
type Configurer ¶
type Configurer interface {
SaveLoginDetails(response *PollAPIKeyResponse) error
}
Configurer is an interface for saving login details
type KeyTransfer ¶
type KeyTransfer interface {
AsyncPollKey(ctx context.Context, pollURL string, interval time.Duration, maxAttempts int, ch chan AsyncPollResult)
}
KeyTransfer handles polling for API keys
type PollAPIKeyResponse ¶
type PollAPIKeyResponse struct { Redeemed bool `json:"redeemed"` AccountID string `json:"account_id"` AccountDisplayName string `json:"account_display_name"` LiveModeAPIKey string `json:"livemode_key_secret"` LiveModePublishableKey string `json:"livemode_key_publishable"` TestModeAPIKey string `json:"testmode_key_secret"` TestModePublishableKey string `json:"testmode_key_publishable"` }
PollAPIKeyResponse returns the data of the polling client login
type RAKConfigurer ¶
type RAKConfigurer struct {
// contains filtered or unexported fields
}
RAKConfigurer saves login details into the filesystem after the user has gone through the login flow
func NewRAKConfigurer ¶
func NewRAKConfigurer(cfg *config.Config, fs afero.Fs) *RAKConfigurer
NewRAKConfigurer returns a new RAKConfigurer
func (*RAKConfigurer) SaveLoginDetails ¶
func (c *RAKConfigurer) SaveLoginDetails(response *PollAPIKeyResponse) error
SaveLoginDetails function sets config for this profile.
type RAKTransfer ¶
type RAKTransfer struct {
// contains filtered or unexported fields
}
RAKTransfer implements KeyTransfer to poll for RAKs
func NewRAKTransfer ¶
func NewRAKTransfer(configurer Configurer) *RAKTransfer
NewRAKTransfer creates a new RAKTransfer object
func (*RAKTransfer) AsyncPollKey ¶
func (rt *RAKTransfer) AsyncPollKey(ctx context.Context, pollURL string, interval time.Duration, maxAttempts int, ch chan AsyncPollResult)
AsyncPollKey polls for RAKs
Click to show internal directories.
Click to hide internal directories.