Documentation
¶
Index ¶
- func ConfigureProfile(config *config.Config, response *PollAPIKeyResponse) error
- func InteractiveLogin(ctx context.Context, config *config.Config) error
- func Login(ctx context.Context, baseURL string, config *config.Config, input io.Reader) error
- func PollForKey(ctx context.Context, pollURL string, interval time.Duration, maxAttempts int) (*PollAPIKeyResponse, *Account, error)
- func SuccessMessage(ctx context.Context, account *Account, baseURL string, apiKey string) (string, error)
- type Account
- type Dashboard
- type Links
- type PollAPIKeyResponse
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureProfile ¶ added in v1.6.0
func ConfigureProfile(config *config.Config, response *PollAPIKeyResponse) error
ConfigureProfile function sets config for this profile.
func InteractiveLogin ¶
InteractiveLogin lets the user set configuration on the command line
Types ¶
type Dashboard ¶ added in v0.2.2
type Dashboard struct {
DisplayName string `json:"display_name"`
}
Dashboard is within the Settings json response from Stripe
type Links ¶
type Links struct {
BrowserURL string `json:"browser_url"`
PollURL string `json:"poll_url"`
VerificationCode string `json:"verification_code"`
}
Links provides the URLs for the CLI to continue the login flow
type PollAPIKeyResponse ¶ added in v0.6.0
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
Click to show internal directories.
Click to hide internal directories.