Documentation ¶
Index ¶
- type TokenStore
- func (m *TokenStore) ContainsAPIToken(tokenName string) bool
- func (m *TokenStore) DeleteAPIToken(tokenName string) error
- func (m *TokenStore) GenerateAPIToken(userID string, email string) (string, error)
- func (m *TokenStore) GenerateSessionToken(userID string, email string) (string, error)
- func (m *TokenStore) GetAPITokenNames() []string
- func (m *TokenStore) GetTokenForUser(userID string) (*oauth2.Token, error)
- func (m *TokenStore) GetUserForToken(apiToken string) (string, error)
- func (m *TokenStore) HasUserCredentials(userID string) bool
- func (m *TokenStore) InvalidateUser(userID string) error
- func (m *TokenStore) StoreAPIToken(tokenName string, apiToken string, userID string) error
- func (m *TokenStore) StoreUser(userID string, token *oauth2.Token) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenStore ¶
TokenStore provides a mocked implementation of the APITokenStore interface
func (*TokenStore) ContainsAPIToken ¶
func (m *TokenStore) ContainsAPIToken(tokenName string) bool
ContainsAPIToken is a mocked stub
func (*TokenStore) DeleteAPIToken ¶
func (m *TokenStore) DeleteAPIToken(tokenName string) error
DeleteAPIToken is a mocked stub
func (*TokenStore) GenerateAPIToken ¶
func (m *TokenStore) GenerateAPIToken(userID string, email string) (string, error)
GenerateAPIToken is a mocked stub
func (*TokenStore) GenerateSessionToken ¶
func (m *TokenStore) GenerateSessionToken(userID string, email string) (string, error)
GenerateSessionToken is a mocked stub
func (*TokenStore) GetAPITokenNames ¶
func (m *TokenStore) GetAPITokenNames() []string
GetAPITokenNames is a mocked stub
func (*TokenStore) GetTokenForUser ¶
func (m *TokenStore) GetTokenForUser(userID string) (*oauth2.Token, error)
GetTokenForUser is a mocked stub
func (*TokenStore) GetUserForToken ¶
func (m *TokenStore) GetUserForToken(apiToken string) (string, error)
GetUserForToken is a mocked stub
func (*TokenStore) HasUserCredentials ¶
func (m *TokenStore) HasUserCredentials(userID string) bool
HasUserCredentials is a mocked stub
func (*TokenStore) InvalidateUser ¶
func (m *TokenStore) InvalidateUser(userID string) error
InvalidateUser is a mocked stub
func (*TokenStore) StoreAPIToken ¶
func (m *TokenStore) StoreAPIToken(tokenName string, apiToken string, userID string) error
StoreAPIToken is a mocked stub
Click to show internal directories.
Click to hide internal directories.