Documentation ¶
Index ¶
- Variables
- func NextPort() int
- type MockUserManager
- func (MockUserManager) ClearUser(gimlet.User, bool) error
- func (MockUserManager) CreateUserToken(_, _ string) (string, error)
- func (MockUserManager) GetGroupsForUser(string) ([]string, error)
- func (MockUserManager) GetLoginCallbackHandler() http.HandlerFunc
- func (MockUserManager) GetLoginHandler(_ string) http.HandlerFunc
- func (MockUserManager) GetOrCreateUser(gimlet.User) (gimlet.User, error)
- func (MockUserManager) GetUserByID(string) (gimlet.User, error)
- func (MockUserManager) GetUserByToken(_ context.Context, _ string) (gimlet.User, error)
- func (MockUserManager) IsRedirect() bool
- func (MockUserManager) ReauthorizeUser(gimlet.User) error
Constants ¶
This section is empty.
Variables ¶
View Source
var MockUser = user.DBUser{Id: "testuser", APIKey: "testapikey"}
Functions ¶
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) GetGroupsForUser ¶
func (MockUserManager) GetGroupsForUser(string) ([]string, error)
func (MockUserManager) GetLoginCallbackHandler ¶
func (MockUserManager) GetLoginCallbackHandler() http.HandlerFunc
func (MockUserManager) GetLoginHandler ¶
func (MockUserManager) GetLoginHandler(_ string) http.HandlerFunc
func (MockUserManager) GetOrCreateUser ¶
func (MockUserManager) GetUserByID ¶
func (MockUserManager) GetUserByID(string) (gimlet.User, error)
func (MockUserManager) GetUserByToken ¶
func (MockUserManager) IsRedirect ¶
func (MockUserManager) IsRedirect() bool
func (MockUserManager) ReauthorizeUser ¶
func (MockUserManager) ReauthorizeUser(gimlet.User) error
Click to show internal directories.
Click to hide internal directories.