Documentation ¶
Index ¶
- func Export[T, C, N any](ctx context.Context, data []byte, emptyListError error, ...) (*model.Message, error)
- func Import[T, C any, D string | int](ctx context.Context, data []byte, checkDataFn CheckDataFn[T], ...) (*model.Message, error)
- func MassDelete[T any, C string | int](ctx context.Context, data []byte, notFoundError error, ...) (*model.Message, error)
- func MassUpdate[T any, C string | int](ctx context.Context, data []byte, notFoundError error, ...) (*model.Message, error)
- type CheckDataFn
- type Config
- type Consumer
- type Consumers
- type DataFn
- type DeleteActionFn
- type ExportActionFn
- type IdsFn
- type ImportActionFn
- type ListFn
- type PluckIDsFn
- type Queue
- type Task
- func (e *Task) ExportHandler(name string, bind func(c *gin.Context) ([]byte, error)) gin.HandlerFunc
- func (e *Task) ImportHandler(name string, bind func(c *gin.Context) ([]byte, error)) gin.HandlerFunc
- func (e *Task) InitHandler(secured *gin.RouterGroup, unsecured *gin.RouterGroup)
- func (e *Task) MassDeleteHandler(name string, bind func(c *gin.Context) ([]byte, error)) gin.HandlerFunc
- func (e *Task) MassUpdateHandler(name string, bind func(c *gin.Context) ([]byte, error)) gin.HandlerFunc
- func (e *Task) NewTask(c *gin.Context, tp string, name string, data []byte) (*model.Task, error)
- type Tasker
- type UpdateActionFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MassDelete ¶
func MassDelete[T any, C string | int](ctx context.Context, data []byte, notFoundError error, checkDataFn CheckDataFn[T], idsFn IdsFn[T, C], pluckIDsFn PluckIDsFn[C], actionFn DeleteActionFn[T, C]) (*model.Message, error)
func MassUpdate ¶
func MassUpdate[T any, C string | int](ctx context.Context, data []byte, notFoundError error, checkDataFn CheckDataFn[T], idsFn IdsFn[T, C], pluckIDsFn PluckIDsFn[C], actionFn UpdateActionFn[T, C]) (*model.Message, error)
Types ¶
type CheckDataFn ¶ added in v2.3.74
type DeleteActionFn ¶ added in v2.3.74
type ExportActionFn ¶ added in v2.3.74
type ImportActionFn ¶ added in v2.3.74
type PluckIDsFn ¶ added in v2.3.74
type Queue ¶
type Queue interface { Run(data runner.Data) Stop(id int) TaskResults() chan runner.TaskResult }
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func (*Task) ExportHandler ¶
func (*Task) ImportHandler ¶
func (*Task) InitHandler ¶
func (e *Task) InitHandler(secured *gin.RouterGroup, unsecured *gin.RouterGroup)
func (*Task) MassDeleteHandler ¶
func (*Task) MassUpdateHandler ¶
type Tasker ¶
type Tasker interface { InitHandler(secured *gin.RouterGroup, unsecured *gin.RouterGroup) ExportHandler(name string, bind func(c *gin.Context) ([]byte, error)) gin.HandlerFunc ImportHandler(name string, bind func(c *gin.Context) ([]byte, error)) gin.HandlerFunc MassUpdateHandler(name string, bind func(c *gin.Context) ([]byte, error)) gin.HandlerFunc MassDeleteHandler(name string, bind func(c *gin.Context) ([]byte, error)) gin.HandlerFunc }
Click to show internal directories.
Click to hide internal directories.