Help us shape the future of Go! Take the 2026 Go Developer Survey

usecase

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListUserQueryParams

type ListUserQueryParams struct {
	Limit      uint32
	Offset     uint32
	UserIds    []string
	UserEmails []string
	UserName   string
	Status     user.Status
	GroupIds   []string
}

type UserFinder

type UserFinder interface {
	GetMeMenus(ctx context.Context) ([]*menu.Menu, error)
}

type UserUseCase

type UserUseCase interface {
	Me(ctx context.Context) (*user.User, error)
	Get(ctx context.Context, userId string) (*user.User, error)
	Update(ctx context.Context, u *user.User, password *string) (*user.User, error)
	Delete(ctx context.Context, userId string) error
	Create(ctx context.Context, username, email, password string, groupIds []string) (*user.User, error)
	List(ctx context.Context, params *ListUserQueryParams) ([]*user.User, int64, error)
	AddGroups(ctx context.Context, userId string, groupIds []string) (*user.User, error)
	RemoveGroups(ctx context.Context, userId string, groupIds []string) (*user.User, error)
	GetMeMenus(ctx context.Context) ([]*menu.Menu, error)
	SendMeVerifyEmail(ctx context.Context) error
}

func NewUserUseCase

func NewUserUseCase(
	db *sql.DB,
	dialectWrapper persistence.DialectWrapper,
	transRepo trans.Repository,
	userRepo user.Repository,
	userSvc user.Service,
	userGroupRepo usergroup.Repository,
	oidcUserRepo oidcUserDomain.Repository,
	userFinder UserFinder,
) UserUseCase

Directories

Path Synopsis
Package pagination bounds how much a list endpoint will return.
Package pagination bounds how much a list endpoint will return.

Jump to

Keyboard shortcuts

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