Documentation
¶
Overview ¶
Package usecase provides business logic for option management
Index ¶
- type Usecase
- func (a *Usecase) Count(ctx context.Context, opts ...option.QOption) (int64, error)
- func (a *Usecase) Delete(ctx context.Context, name string, otype models.OptionType, targetID uint64) error
- func (a *Usecase) FetchList(ctx context.Context, opts ...option.QOption) ([]*models.Option, error)
- func (a *Usecase) Get(ctx context.Context, name string, otype models.OptionType, targetID uint64) (*models.Option, error)
- func (a *Usecase) Set(ctx context.Context, targetObj *models.Option) error
- func (a *Usecase) SetOption(ctx context.Context, name string, otype models.OptionType, targetID uint64, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Usecase ¶
type Usecase struct {
// contains filtered or unexported fields
}
Usecase implements business logic for option access and management
func NewUsecase ¶
func NewUsecase(repo option.Repository) *Usecase
NewUsecase creates and returns a new Usecase instance
func (*Usecase) Count ¶
Count returns the total count of options matching the filter with permission checks
func (*Usecase) Delete ¶
func (a *Usecase) Delete(ctx context.Context, name string, otype models.OptionType, targetID uint64) error
Delete removes an option with permission checks
func (*Usecase) FetchList ¶
FetchList retrieves a list of options filtered and ordered with permission checks
func (*Usecase) Get ¶
func (a *Usecase) Get(ctx context.Context, name string, otype models.OptionType, targetID uint64) (*models.Option, error)
Get retrieves an option by name, type, and target ID with permission checks
Click to show internal directories.
Click to hide internal directories.