Documentation
¶
Index ¶
- Constants
- Variables
- func ReadEnvValue(path, key string) (string, error)
- func ResolveAPIKey(getenv func(string) string, homeDir string) (string, error)
- func ResolveServerURL(flagValue string, getenv func(string) string) string
- func SetEnvValue(path, key, value string) error
- func UnsetEnvValue(path, key string) error
- func WriteElection(path, key, value string, unsetKeys ...string) error
- type AccessResponse
- type ValidateResponse
Constants ¶
View Source
const DefaultServerURL = "https://app.speakeasy.com"
Variables ¶
View Source
var ErrAccessTokenMissing = errors.New("the platform allowed generation but issued no token")
View Source
var ErrInsecureServerURL = errors.New("the Speakeasy server URL must use https (plain http is allowed for loopback addresses only)")
View Source
var ErrNoAPIKey = errors.New("no Speakeasy API key: set SPEAKEASY_API_KEY or run `speakeasy auth login`")
View Source
var ErrNotEntitled = errors.New("workspace has no commercial entitlement; no license token was issued")
Functions ¶
func ReadEnvValue ¶
func SetEnvValue ¶
func UnsetEnvValue ¶
func WriteElection ¶
Types ¶
type AccessResponse ¶
type AccessResponse struct {
GenerationAllowed bool `json:"generation_allowed"`
Message string `json:"message"`
Level string `json:"level"`
LicenseJWT *string `json:"license_jwt"`
}
func FetchAccessLicenseToken ¶
type ValidateResponse ¶
type ValidateResponse struct {
WorkspaceID string `json:"workspace_id"`
WorkspaceSlug string `json:"workspace_slug"`
OrgSlug string `json:"org_slug"`
AccountType string `json:"account_type_v2"`
LicenseJWT *string `json:"license_jwt"`
}
func FetchLicenseToken ¶
Click to show internal directories.
Click to hide internal directories.