Documentation ¶
Index ¶
- func NewController(log *slog.Logger, service UserService) *ctrl
- func NewDAO(log *slog.Logger, timeout time.Duration, db *sqlx.DB) *dao
- func NewService(log *slog.Logger, orgSVC OrgSVC, dao UserDAO, txMGR TXManager, timer Timer, ...) *service
- type CannotAssociateSysOrgErr
- type CannotModifySysUserErr
- type EmailAlreadyInUseErr
- type IDGenerator
- type NotFoundErr
- type OptimisticLockErr
- type OrgSVC
- type TXManager
- type Timer
- type UserDAO
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewController ¶
func NewController(log *slog.Logger, service UserService) *ctrl
func NewService ¶
Types ¶
type CannotAssociateSysOrgErr ¶
func (CannotAssociateSysOrgErr) Error ¶
func (err CannotAssociateSysOrgErr) Error() string
type CannotModifySysUserErr ¶
type CannotModifySysUserErr struct {
ID string
}
func (CannotModifySysUserErr) Error ¶
func (err CannotModifySysUserErr) Error() string
type EmailAlreadyInUseErr ¶
type EmailAlreadyInUseErr struct {
Email string
}
func (EmailAlreadyInUseErr) Error ¶
func (err EmailAlreadyInUseErr) Error() string
type IDGenerator ¶
type IDGenerator interface {
GenID() string
}
type NotFoundErr ¶
type NotFoundErr struct {
ID string
}
func (NotFoundErr) Error ¶
func (err NotFoundErr) Error() string
type OptimisticLockErr ¶
func (OptimisticLockErr) Error ¶
func (err OptimisticLockErr) Error() string
type UserDAO ¶
type UserDAO interface { GetByID(ctx context.Context, id string) (user.User, error) GetAll(ctx context.Context) ([]user.User, error) GetAllByOrgID(ctx context.Context, orgID string) ([]user.User, error) Create(ctx context.Context, tx *sqlx.Tx, u user.User) error Update(ctx context.Context, tx *sqlx.Tx, u user.User) (user.User, error) Delete(ctx context.Context, tx *sqlx.Tx, u user.DeleteUser) error }
type UserService ¶
type UserService interface { GetByID(ctx context.Context, id string) (user.User, error) GetAll(ctx context.Context) ([]user.User, error) GetAllByOrgID(ctx context.Context, orgID string) ([]user.User, error) Save(ctx context.Context, u user.User) (user.User, error) Delete(ctx context.Context, u user.DeleteUser) error }
Click to show internal directories.
Click to hide internal directories.