Documentation ¶
Index ¶
- Variables
- func IsStoreBootstrapped(p paths.Paths) (bool, error)
- type EmptyStore
- func (e EmptyStore) Close()
- func (e EmptyStore) DeleteToken(_ connections.Token) error
- func (e EmptyStore) DescribeToken(_ connections.Token) (connections.TokenDescription, error)
- func (e EmptyStore) ListTokens() ([]connections.TokenSummary, error)
- func (e EmptyStore) OnUpdate(_ func(context.Context, ...connections.TokenDescription))
- func (e EmptyStore) SaveToken(_ connections.TokenDescription) error
- func (e EmptyStore) TokenExists(_ connections.Token) (bool, error)
- type FileStore
- func (s *FileStore) Close()
- func (s *FileStore) DeleteToken(token connections.Token) error
- func (s *FileStore) DescribeToken(token connections.Token) (connections.TokenDescription, error)
- func (s *FileStore) ListTokens() ([]connections.TokenSummary, error)
- func (s *FileStore) OnUpdate(callbackFn func(ctx context.Context, tokens ...connections.TokenDescription))
- func (s *FileStore) SaveToken(token connections.TokenDescription) error
- func (s *FileStore) TokenExists(token connections.Token) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTokenDoesNotExist = errors.New("the token does not exist") ErrWrongPassphrase = errors.New("wrong passphrase") )
View Source
var ErrSavingTokenIsDisabled = errors.New("saving tokens is disabled")
View Source
var ErrStoreNotInitialized = errors.New("the tokens store has not been initialized")
Functions ¶
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) Close ¶
func (e EmptyStore) Close()
func (EmptyStore) DeleteToken ¶
func (e EmptyStore) DeleteToken(_ connections.Token) error
func (EmptyStore) DescribeToken ¶
func (e EmptyStore) DescribeToken(_ connections.Token) (connections.TokenDescription, error)
func (EmptyStore) ListTokens ¶
func (e EmptyStore) ListTokens() ([]connections.TokenSummary, error)
func (EmptyStore) OnUpdate ¶
func (e EmptyStore) OnUpdate(_ func(context.Context, ...connections.TokenDescription))
func (EmptyStore) SaveToken ¶
func (e EmptyStore) SaveToken(_ connections.TokenDescription) error
func (EmptyStore) TokenExists ¶
func (e EmptyStore) TokenExists(_ connections.Token) (bool, error)
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
func ReinitialiseStore ¶
func (*FileStore) DeleteToken ¶
func (s *FileStore) DeleteToken(token connections.Token) error
func (*FileStore) DescribeToken ¶
func (s *FileStore) DescribeToken(token connections.Token) (connections.TokenDescription, error)
func (*FileStore) ListTokens ¶
func (s *FileStore) ListTokens() ([]connections.TokenSummary, error)
func (*FileStore) OnUpdate ¶
func (s *FileStore) OnUpdate(callbackFn func(ctx context.Context, tokens ...connections.TokenDescription))
func (*FileStore) SaveToken ¶
func (s *FileStore) SaveToken(token connections.TokenDescription) error
func (*FileStore) TokenExists ¶
func (s *FileStore) TokenExists(token connections.Token) (bool, error)
Click to show internal directories.
Click to hide internal directories.