Documentation
¶
Index ¶
- func NewController(log *slog.Logger, service OrgService) *ctrl
- func NewDAO(log *slog.Logger, timeout time.Duration, db *sqlx.DB) *dao
- func NewService(log *slog.Logger, dao OrgDAO, txMGR TXManager, timer Timer, idGen IDGenerator) *service
- type CannotModifySysOrgErr
- type IDGenerator
- type NameAlreadyInUseErr
- type NotFoundErr
- type OptimisticLockErr
- type OrgDAO
- type OrgService
- type TXManager
- type Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewController ¶
func NewController(log *slog.Logger, service OrgService) *ctrl
func NewService ¶
Types ¶
type CannotModifySysOrgErr ¶
type CannotModifySysOrgErr struct {
ID string
}
func (CannotModifySysOrgErr) Error ¶
func (err CannotModifySysOrgErr) Error() string
type IDGenerator ¶
type IDGenerator interface {
GenID() string
}
type NameAlreadyInUseErr ¶
type NameAlreadyInUseErr struct {
Name string
}
func (NameAlreadyInUseErr) Error ¶
func (err NameAlreadyInUseErr) Error() 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 OrgDAO ¶
type OrgDAO interface { GetByID(ctx context.Context, id string) (org.Org, error) GetAll(ctx context.Context) ([]org.Org, error) SearchByName(ctx context.Context, name string) ([]org.Org, error) Create(ctx context.Context, tx *sqlx.Tx, o org.Org) error Update(ctx context.Context, tx *sqlx.Tx, o org.Org) (org.Org, error) Delete(ctx context.Context, tx *sqlx.Tx, o org.DeleteOrg) error }
type OrgService ¶
Click to show internal directories.
Click to hide internal directories.