Documentation ¶
Index ¶
- Variables
- type Asset
- type AssetRepo
- type AssetUsecase
- func (a *AssetUsecase) Create(ctx context.Context, data *Asset) (*Asset, error)
- func (a *AssetUsecase) FindList(ctx context.Context, param FindListParams) ([]*Asset, error)
- func (a *AssetUsecase) FindOne(ctx context.Context, id int) (*Asset, error)
- func (a *AssetUsecase) FindOneWithInstance(ctx context.Context, queries ...Query) (*Asset, error)
- func (a *AssetUsecase) Update(ctx context.Context, data *Asset) (*Asset, error)
- type FindListParams
- type Inquirer
- type Query
- func Cache(ttl int) Query
- func CitySpliderIDEQ(id int) Query
- func IDEQ(id int) Query
- func IDIn(ids ...int) Query
- func Limit(limit int) Query
- func Offset(offset int) Query
- func Order(order ...string) Query
- func SourceIDEQ(sourceID uint64) Query
- func SourceIDIn(sourceIDs []uint64) Query
- func StatusEQ(status Status) Query
- type Status
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Status_name = map[Status]string{ StatusWaitSync: "待同步", StatusWaitLoaded: "待加载", StatusFinished: "已完成", } )
Functions ¶
This section is empty.
Types ¶
type AssetRepo ¶
type AssetRepo interface { Count(ctx context.Context, options ...Query) int FindList(ctx context.Context, options ...Query) ([]*Asset, error) FindOne(ctx context.Context, options ...Query) (*Asset, error) Save(ctx context.Context, data *Asset) (*Asset, error) Remove(ctx context.Context, options ...Query) error }
type AssetUsecase ¶
type AssetUsecase struct {
// contains filtered or unexported fields
}
func NewAssetUsecase ¶
func NewAssetUsecase( repo AssetRepo, ) *AssetUsecase
func (*AssetUsecase) FindList ¶
func (a *AssetUsecase) FindList(ctx context.Context, param FindListParams) ([]*Asset, error)
func (*AssetUsecase) FindOneWithInstance ¶
type FindListParams ¶
Click to show internal directories.
Click to hide internal directories.