testutil

package
v0.0.0-...-eeee692 Latest Latest
Warning

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

Go to latest
Published: May 25, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockUser = user.DBUser{Id: "testuser"}

Functions

func NextPort

func NextPort() int

Types

type MockUserManager

type MockUserManager struct{}

MockUserManager is used for testing the servers. It accepts all tokens and return the same user for all tokens.

func (MockUserManager) CreateUserToken

func (MockUserManager) CreateUserToken(_, _ string) (string, error)

func (MockUserManager) GetLoginCallbackHandler

func (MockUserManager) GetLoginCallbackHandler() func(http.ResponseWriter, *http.Request)

func (MockUserManager) GetLoginHandler

func (MockUserManager) GetLoginHandler(_ string) func(http.ResponseWriter, *http.Request)

func (MockUserManager) GetUserByToken

func (MockUserManager) GetUserByToken(_ string) (auth.User, error)

func (MockUserManager) IsRedirect

func (MockUserManager) IsRedirect() bool

Jump to

Keyboard shortcuts

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