Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerMock ¶
HandlerMock implements http.Handler and is intended for use in tests.
func (HandlerMock) ServeHTTP ¶
func (m HandlerMock) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP is needed to conform http.Handler interface and responds with HTTP 200 and an empty body.
type StaticTokenSource ¶
type StaticTokenSource string
StaticTokenSource implements auth.TokenGenerator and always returns itself as a token.
func (StaticTokenSource) Generate ¶
func (src StaticTokenSource) Generate(tokenLen int) string
Generate is needed to conform auth.TokenGenerator interface and returns StaticTokenSource as a string ignoring provided token length.
type TokenAuthenticatorMock ¶
TokenAuthenticatorMock imprements auth.TokenAuthenticator and is intended for using in tests.
func (TokenAuthenticatorMock) Authenticate ¶
func (m TokenAuthenticatorMock) Authenticate(token string) bool
Authenticate is needed to conform auth.TokenAuthenticator interface and returns mocked value.
type TokenSourceMock ¶
TokenSourceMock implements auth.TokenGenerator and is intended for using in tests.
func (*TokenSourceMock) Generate ¶
func (src *TokenSourceMock) Generate(tokenLen int) string
Generate is needed to conform auth.TokenGenerator interface and returns mocked value.