logintest

package
v0.0.0-cloud Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthInfoServiceFake

type AuthInfoServiceFake struct {
	login.AuthInfoService
	LatestUserID         int64
	ExpectedUserAuth     *login.UserAuth
	ExpectedUser         *user.User
	ExpectedExternalUser *login.ExternalUserInfo
	ExpectedError        error
	ExpectedLabels       map[int64]string

	SetAuthInfoFn    func(ctx context.Context, cmd *login.SetAuthInfoCommand) error
	UpdateAuthInfoFn func(ctx context.Context, cmd *login.UpdateAuthInfoCommand) error
}

func (*AuthInfoServiceFake) DeleteUserAuthInfo

func (a *AuthInfoServiceFake) DeleteUserAuthInfo(ctx context.Context, userID int64) error

func (*AuthInfoServiceFake) GetAuthInfo

func (a *AuthInfoServiceFake) GetAuthInfo(ctx context.Context, query *login.GetAuthInfoQuery) (*login.UserAuth, error)

func (*AuthInfoServiceFake) GetExternalUserInfoByLogin

func (*AuthInfoServiceFake) GetUserLabels

func (a *AuthInfoServiceFake) GetUserLabels(ctx context.Context, query login.GetUserLabelsQuery) (map[int64]string, error)

func (*AuthInfoServiceFake) LookupAndUpdate

func (a *AuthInfoServiceFake) LookupAndUpdate(ctx context.Context, query *login.GetUserByAuthInfoQuery) (*user.User, error)

func (*AuthInfoServiceFake) SetAuthInfo

func (*AuthInfoServiceFake) UpdateAuthInfo

func (a *AuthInfoServiceFake) UpdateAuthInfo(ctx context.Context, cmd *login.UpdateAuthInfoCommand) error

type AuthenticatorFake

type AuthenticatorFake struct {
	ExpectedUser  *user.User
	ExpectedError error
}

func (*AuthenticatorFake) AuthenticateUser

func (a *AuthenticatorFake) AuthenticateUser(c context.Context, query *login.LoginUserQuery) error

type LoginServiceFake

type LoginServiceFake struct{}

func (*LoginServiceFake) DisableExternalUser

func (l *LoginServiceFake) DisableExternalUser(ctx context.Context, username string) error

func (*LoginServiceFake) SetTeamSyncFunc

func (l *LoginServiceFake) SetTeamSyncFunc(login.TeamSyncFunc)

func (*LoginServiceFake) UpsertUser

func (l *LoginServiceFake) UpsertUser(ctx context.Context, cmd *login.UpsertUserCommand) (*user.User, error)

Jump to

Keyboard shortcuts

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