testutil

package
v0.0.0-...-7dc4ea3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

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

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) ClearUser

func (MockUserManager) ClearUser(gimlet.User, bool) error

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) GetOrCreateUser(gimlet.User) (gimlet.User, error)

func (MockUserManager) GetUserByID

func (MockUserManager) GetUserByID(string) (gimlet.User, error)

func (MockUserManager) GetUserByToken

func (MockUserManager) GetUserByToken(_ context.Context, _ string) (gimlet.User, error)

func (MockUserManager) IsRedirect

func (MockUserManager) IsRedirect() bool

func (MockUserManager) ReauthorizeUser

func (MockUserManager) ReauthorizeUser(gimlet.User) error

Jump to

Keyboard shortcuts

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