mock

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TokenStore

type TokenStore struct {
	mock.Mock
}

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

func (*TokenStore) StoreUser

func (m *TokenStore) StoreUser(userID string, token *oauth2.Token) error

StoreUser is a mocked stub

Jump to

Keyboard shortcuts

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