Documentation ¶
Index ¶
Constants ¶
View Source
const ( LaunchboxTokenUrlEnvVar = "LAUNCHBOX_TOKEN_URL" LaunchboxClientIdEnvVar = "LAUNCHBOX_CLIENT_ID" LaunchboxClientSecretEnvVar = "LAUNCHBOX_CLIENT_SECRET" LaunchboxAccessToken = "LAUNCHBOX_ACCESS_TOKEN" )
View Source
const DefaultTokenUrl = "https://launchboxhq.io/oauth/token"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenCredentials ¶ added in v1.1.0
type AccessTokenCredentials struct { }
func NewAccessTokenCredentials ¶ added in v1.1.0
func NewAccessTokenCredentials() *AccessTokenCredentials
func (*AccessTokenCredentials) Fetch ¶ added in v1.1.0
func (atc *AccessTokenCredentials) Fetch(ctx context.Context) (Credentials, error)
type ClientCredentials ¶ added in v1.1.0
func NewClientCredentials ¶ added in v1.1.0
func NewClientCredentials(clientId string, clientSecret string) *ClientCredentials
func NewClientCredentialsFromEnv ¶ added in v1.1.0
func NewClientCredentialsFromEnv() *ClientCredentials
func (*ClientCredentials) Fetch ¶ added in v1.1.0
func (cc *ClientCredentials) Fetch(ctx context.Context) (Credentials, error)
type Credentials ¶
Credentials represent the access credentials provided to LaunchboxHQ
func (Credentials) Expired ¶
func (c Credentials) Expired() bool
Expired checks if a credential set has expired
type CredentialsProvider ¶
type CredentialsProvider interface {
Fetch(ctx context.Context) (Credentials, error)
}
type CredentialsType ¶
type CredentialsType string
const ( ClientCredentialsType CredentialsType = "CLIENT_CREDENTIALS" AccessTokenType = "ACCESS_TOKEN" )
type ForbiddenError ¶
type ForbiddenError struct{}
func (*ForbiddenError) Error ¶
func (*ForbiddenError) Error() string
type GenericError ¶
type GenericError struct{}
func (*GenericError) Error ¶
func (*GenericError) Error() string
type ProviderChain ¶
type ProviderChain struct { }
func NewProviderChain ¶
func NewProviderChain() *ProviderChain
func (*ProviderChain) Resolve ¶
func (pc *ProviderChain) Resolve() CredentialsProvider
type ResourceNotFoundError ¶
type ResourceNotFoundError struct{}
func (*ResourceNotFoundError) Error ¶
func (*ResourceNotFoundError) Error() string
type UnauthorizedError ¶
type UnauthorizedError struct{}
func (*UnauthorizedError) Error ¶
func (*UnauthorizedError) Error() string
Click to show internal directories.
Click to hide internal directories.