Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type M ¶
type M map[string]interface{}
M m
type PubSubRepo ¶
type PubSubRepo interface { Subscribe(ctx context.Context, pubsub *PubSub, ttl time.Duration) error Get(ctx context.Context, topic, key string) ([]*PubSub, error) }
PubSubRepo PubSubRepo
type Task ¶
type Task struct { ID string CreatedAt int64 FinishAt int64 CreatorID string CreatorName string Title string Types string Command string FileAddr string FileSize int FileOpt string Value M Result M Status TaskStatus Ratio float64 DepID string `gorm:"-"` }
Task task list
type TaskRepo ¶
type TaskRepo interface { Create(*gorm.DB, *Task) error List(*gorm.DB, string, string, int, int, int) ([]*Task, int64, error) FinishTask(*gorm.DB, *Task) error ChangeRatio(db *gorm.DB, task *Task) error GetByID(db *gorm.DB, taskID string) (*Task, error) GetProcessing(db *gorm.DB, id string, types string) (int64, error) DeleteByID(db *gorm.DB, id string) error GetByCondition(db *gorm.DB, task *Task) (*Task, error) ListProcessing(db *gorm.DB) ([]*Task, error) }
TaskRepo TaskRepo
type TaskStatus ¶
type TaskStatus int
TaskStatus TaskStatus
const ( // TaskSuccess TaskSuccess TaskSuccess TaskStatus = 2 // TaskFail TaskFail TaskFail TaskStatus = 3 //TaskDoing TaskDoing TaskDoing TaskStatus = 1 )
Click to show internal directories.
Click to hide internal directories.