launchbox

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 4 Imported by: 0

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

type ClientCredentials added in v1.1.0

type ClientCredentials struct {
	ClientId     string
	ClientSecret string
	TokenUrl     string
}

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

type Credentials

type Credentials struct {
	AccessToken  string
	RefreshToken string
	Expires      time.Time
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL