credentials

package
v0.7.3-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreApiKeyVar   = "CRE_API_KEY"
	AuthTypeApiKey = "api-key"
	AuthTypeBearer = "bearer"
	ConfigDir      = ".cre"
	ConfigFile     = "cre.yaml"
)

Variables

This section is empty.

Functions

func SaveCredentials

func SaveCredentials(tokenSet *CreLoginTokenSet) error

Types

type CreLoginTokenSet

type CreLoginTokenSet struct {
	AccessToken  string `json:"access_token"  yaml:"AccessToken"`
	IDToken      string `json:"id_token"      yaml:"IDToken"`
	RefreshToken string `json:"refresh_token" yaml:"RefreshToken"`
	ExpiresIn    int    `json:"expires_in"    yaml:"ExpiresIn"`
	TokenType    string `json:"token_type"    yaml:"TokenType"`
}

type Credentials

type Credentials struct {
	Tokens   *CreLoginTokenSet `yaml:"tokens"`
	APIKey   string            `yaml:"api_key"`
	AuthType string            `yaml:"auth_type"`
	// contains filtered or unexported fields
}

func New

func New(logger *zerolog.Logger) (*Credentials, error)

Jump to

Keyboard shortcuts

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