Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultCommonParam = CommonParam{
PageSize: 10,
}
DefaultCommonParam 默认值
Functions ¶
func MustInject ¶
func MustInject(v interface{})
func MustRegisterProvider ¶
func MustRegisterProvider(v interface{})
func RegisterProvider ¶
func RegisterProvider(v interface{}) (err error)
Types ¶
type Base ¶
type Base struct { }
Base 基底
func (*Base) ProcessConcurrent ¶
func (b *Base) ProcessConcurrent(ctx context.Context, opt ProcessOption) error
ProcessConcurrent 并发处理
type CommonParam ¶
type CommonParam struct { BeginTime int64 `json:"beginTime"` // 开始时间 EndTime int64 `json:"endTime"` // 结束时间 PageIndex int `json:"pageIndex"` // 分页开始 PageSize int `json:"pageSize"` // 分页大小 }
CommonParam 通用参数
type ProcessOption ¶
type ProcessOption struct { Query string Args []interface{} N int // 批数量 // 如果用接口呢?就可以不用将值返回,而是存在实体里,这样实体调用Do方法的时候就不需要传入Scan获取到的返回值 // 这样也不会有分裂出现 NewEntity func() Entity }
ProcessOption 选项
Click to show internal directories.
Click to hide internal directories.