service

package
v0.0.0-...-a02da8a Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateCommand

type CreateCommand struct {
	Username string
	Password string
}

type GetByUsernameCommand

type GetByUsernameCommand struct {
	Username string
}

type GetCommand

type GetCommand struct {
	UID uint32
}

type SearchCommand

type SearchCommand struct {
	Uids     []uint32
	Username string
}

type UserService

type UserService interface {
	Search(ctx context.Context, cmd SearchCommand) (map[uint32]model.User, error)
	Get(ctx context.Context, cmd GetCommand) (model.User, error)
	GetByUsername(ctx context.Context, cmd GetByUsernameCommand) (model.User, error)
	Create(ctx context.Context, cmd CreateCommand) (uid uint32, err error)
	ValidatePassword(ctx context.Context, cmd ValidatePasswordCommand) error
}

func NewUserService

func NewUserService(mutexProvider mutex.MutexProvider, userRepository repository.UserRepository) UserService

type ValidatePasswordCommand

type ValidatePasswordCommand struct {
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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