Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseRequest ¶
type BaseRequest struct { // 数据开始位置 Start int `json:"start,omitempty"` // 返回数据条数 Limit int `json:"limit,omitempty"` // 字段按照逗号隔开 Fields string `json:"fields,omitempty"` // 排序:sort=otc_type,-created_at,*custom // 以符号开头,可选符号:(+或空 正序)(- 倒序)(* 自定义复杂排序标识关键词) Sorts []string `json:"sorts,omitempty"` // 分组 GroupBy string `json:"group_by,omitempty"` }
BaseRequest 公共请求
type ITest ¶
type ITest interface { // Detail 查询一条 Detail(ctx context.Context, condition *TestCondition, opts ...Option) (info *model.Test, err error) // List 查询多条 List(ctx context.Context, condition *TestCondition, opts ...Option) (list []*model.Test, err error) // Add 添加 Add(ctx context.Context, data *model.Test, opts ...Option) (err error) // Update 更新 Update(ctx context.Context, condition *TestCondition, updateData map[string]interface{}, opts ...Option) (err error) }
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithBaseRequest ¶
func WithBaseRequest(br *BaseRequest) Option
type TestCondition ¶
type TestCondition struct { *BaseRequest // 查询参数 Id int32 Ids []int32 }
Click to show internal directories.
Click to hide internal directories.