tokenstore

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultTokenStoreFactory

type DefaultTokenStoreFactory struct{}

func NewDefaultTokenStoreFactory

func NewDefaultTokenStoreFactory() *DefaultTokenStoreFactory

func (*DefaultTokenStoreFactory) NewTokenStore

func (d *DefaultTokenStoreFactory) NewTokenStore(storeType StoreType) (TokenStore, error)

type FileTokenStore

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

func NewFileTokenStore

func NewFileTokenStore() (*FileTokenStore, error)

NewFileTokenStore creates a new FileTokenStore with the default file path in the user's home directory

func NewFileTokenStoreWithBasePath

func NewFileTokenStoreWithBasePath(basePath string) (*FileTokenStore, error)

func (*FileTokenStore) DeleteSession

func (f *FileTokenStore) DeleteSession() error

func (*FileTokenStore) GetFilePath

func (f *FileTokenStore) GetFilePath() string

func (*FileTokenStore) GetSession

func (f *FileTokenStore) GetSession() (*auth.AuthSession, error)

func (*FileTokenStore) HasSession

func (f *FileTokenStore) HasSession() (bool, error)

func (*FileTokenStore) PutSession

func (f *FileTokenStore) PutSession(session auth.AuthSession) error

type KeychainTokenStore

type KeychainTokenStore struct{}

KeychainTokenStore provides a keychain-based implementation of TokenStore

func NewKeychainTokenStore

func NewKeychainTokenStore() (*KeychainTokenStore, error)

func (*KeychainTokenStore) DeleteSession

func (k *KeychainTokenStore) DeleteSession() error

func (*KeychainTokenStore) GetSession

func (k *KeychainTokenStore) GetSession() (*auth.AuthSession, error)

func (*KeychainTokenStore) HasSession

func (k *KeychainTokenStore) HasSession() (bool, error)

func (*KeychainTokenStore) PutSession

func (k *KeychainTokenStore) PutSession(session auth.AuthSession) error

type StoreType

type StoreType int
const (
	StoreTypeKeychain StoreType
	StoreTypeFile
)

func ParseStoreType

func ParseStoreType(s string) (StoreType, error)

func (StoreType) String

func (t StoreType) String() string

type TokenStore

type TokenStore interface {
	PutSession(session auth.AuthSession) error
	GetSession() (*auth.AuthSession, error)
	HasSession() (bool, error)
	DeleteSession() error
}

type TokenStoreFactory

type TokenStoreFactory interface {
	NewTokenStore(storeType StoreType) (TokenStore, error)
}

Jump to

Keyboard shortcuts

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