v1

package
v0.66.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSavingTokenIsDisabled = errors.New("saving tokens is disabled")
View Source
var ErrStoreNotInitialized = errors.New("the tokens store has not been initialized")

Functions

func IsStoreInitialized

func IsStoreInitialized(p paths.Paths) (bool, error)

Types

type EmptyStore

type EmptyStore struct{}

EmptyStore can be used to disable the support for long-living API tokens.

func NewEmptyStore

func NewEmptyStore() *EmptyStore

func (EmptyStore) DeleteToken

func (e EmptyStore) DeleteToken(_ string) error

func (EmptyStore) GetToken

func (e EmptyStore) GetToken(_ string) (session.Token, error)

func (EmptyStore) ListTokens

func (e EmptyStore) ListTokens() ([]session.TokenSummary, error)

func (EmptyStore) SaveToken

func (e EmptyStore) SaveToken(_ session.Token) error

func (EmptyStore) TokenExists

func (e EmptyStore) TokenExists(_ string) (bool, error)

type Store

type Store struct {
	// contains filtered or unexported fields
}

func InitializeStore

func InitializeStore(p paths.Paths, passphrase string) (*Store, error)

func LoadStore

func LoadStore(p paths.Paths, passphrase string) (*Store, error)

func (*Store) DeleteToken

func (s *Store) DeleteToken(token string) error

func (*Store) GetToken

func (s *Store) GetToken(token string) (session.Token, error)

func (*Store) ListTokens

func (s *Store) ListTokens() ([]session.TokenSummary, error)

func (*Store) SaveToken

func (s *Store) SaveToken(token session.Token) error

func (*Store) TokenExists

func (s *Store) TokenExists(token string) (bool, error)

Jump to

Keyboard shortcuts

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