loginservice

package
v0.0.0-testrgm4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Implementation

type Implementation struct {
	AuthInfoService login.AuthInfoService
	QuotaService    quota.Service
	TeamSync        login.TeamSyncFunc
	// contains filtered or unexported fields
}

func ProvideService

func ProvideService(
	userService user.Service,
	quotaService quota.Service,
	authInfoService login.AuthInfoService,
	accessControl accesscontrol.Service,
	orgService org.Service,
) *Implementation

func (*Implementation) DisableExternalUser

func (ls *Implementation) DisableExternalUser(ctx context.Context, username string) error

func (*Implementation) SetTeamSyncFunc

func (ls *Implementation) SetTeamSyncFunc(teamSyncFunc login.TeamSyncFunc)

SetTeamSyncFunc sets the function received through args as the team sync function.

func (*Implementation) UpsertUser

func (ls *Implementation) UpsertUser(ctx context.Context, cmd *login.UpsertUserCommand) (result *user.User, err error)

UpsertUser updates an existing user, or if it doesn't exist, inserts a new one.

type LoginServiceMock

type LoginServiceMock struct {
	login.Service
	ExpectedUser     *user.User
	ExpectedUserFunc func(cmd *login.UpsertUserCommand) *user.User
	ExpectedError    error
}

func (LoginServiceMock) DisableExternalUser

func (s LoginServiceMock) DisableExternalUser(ctx context.Context, username string) error

func (LoginServiceMock) UpsertUser

func (s LoginServiceMock) 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