Documentation
¶
Index ¶
- func ConfigureProfile(config *configPkg.Config, response *PollAPIKeyResponse) error
- func InteractiveLogin(ctx context.Context, config *config.Config) error
- func Login(ctx context.Context, baseURL string, config *configPkg.Config, ...) 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 AsyncInputReader
- type AsyncStdinReader
- 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 *configPkg.Config, response *PollAPIKeyResponse) error
ConfigureProfile function sets config for this profile.
func InteractiveLogin ¶
InteractiveLogin lets the user set configuration on the command line
func Login ¶
func Login(ctx context.Context, baseURL string, config *configPkg.Config, asyncInput AsyncInputReader) error
Login function is used to obtain credentials via stripe dashboard.
Types ¶
type AsyncInputReader ¶ added in v1.12.4
type AsyncInputReader interface {
// contains filtered or unexported methods
}
AsyncInputReader is an interface that has an async version of scanln
type AsyncStdinReader ¶ added in v1.12.4
type AsyncStdinReader struct {
}
AsyncStdinReader implements scanln(ch chan int), an async version of scanln
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.