usecase

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package usecase account implementation

Index

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 provides bussiness logic for account access

func NewUsecase

func NewUsecase(repo option.Repository) *Usecase

NewUsecase object controller

func (*Usecase) Count

func (a *Usecase) Count(ctx context.Context, filter *option.Filter) (int64, error)

Count of accounts by filter

func (*Usecase) Delete

func (a *Usecase) Delete(ctx context.Context, name string, otype model.OptionType, targetID uint64) error

Delete delites record by ID

func (*Usecase) FetchList

func (a *Usecase) FetchList(ctx context.Context, filter *option.Filter, order *option.ListOrder, pagination *repository.Pagination) ([]*model.Option, error)

FetchList of accounts by filter

func (*Usecase) Get

func (a *Usecase) Get(ctx context.Context, name string, otype model.OptionType, targetID uint64) (*model.Option, error)

Get returns the group by ID if have access

func (*Usecase) Set

func (a *Usecase) Set(ctx context.Context, targetObj *model.Option) error

Create new object in database

Jump to

Keyboard shortcuts

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