fake

package
v3.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UserSessionKey for setting fake users
	UserSessionKey = "auth.fake.user"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UserService

type UserService struct{}

UserService is a fake type to support integration tests

func (*UserService) GetUser

func (us *UserService) GetUser(ctx context.Context, session *web.Session) *domain.User

GetUser returns the user form the session

func (*UserService) InitUser

func (us *UserService) InitUser(c context.Context, session *web.Session) error

InitUser satisfies the interface but does not initialize anything

func (*UserService) IsLoggedIn

func (us *UserService) IsLoggedIn(c context.Context, session *web.Session) bool

IsLoggedIn returns true if there is a User set

Jump to

Keyboard shortcuts

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