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 ¶
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)
}
Click to show internal directories.
Click to hide internal directories.