Documentation
¶
Index ¶
- type AgentDB
- func (a *AgentDB) Destroy(c context.Context, tx *gorm.DB) error
- func (a *AgentDB) Find(c context.Context, tx *gorm.DB, search *AgentDB) (*AgentDB, error)
- func (a *AgentDB) PageList(c context.Context, tx *gorm.DB, params *agentdto.AgentListInput) ([]AgentDB, int, error)
- func (a *AgentDB) Save(c *gin.Context, tx *gorm.DB) error
- func (a *AgentDB) TableName() string
- func (a *AgentDB) Update(c *gin.Context, tx *gorm.DB) error
- func (a *AgentDB) UpdateStatus(c *gin.Context, tx *gorm.DB) error
- type AgentDateInfo
- type TaskOverview
- func (t *TaskOverview) Delete(ctx context.Context, tx *gorm.DB) error
- func (t *TaskOverview) Find(ctx context.Context, tx *gorm.DB, search *TaskOverview) (*TaskOverview, error)
- func (t *TaskOverview) PageList(c *gin.Context, tx *gorm.DB, params *agentdto.TaskOverViewListInput) ([]TaskOverview, int, error)
- func (t *TaskOverview) Save(ctx context.Context, tx *gorm.DB) error
- func (t *TaskOverview) TableName() string
- func (t *TaskOverview) Updates(ctx context.Context, tx *gorm.DB, id int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentDB ¶
type AgentDB struct { Id int `json:"id" gorm:"primary_key" description:"自增主键"` ServiceName string `json:"service_name" gorm:"column:service_name"` Content string `json:"content" gorm:"column:content"` Address string `json:"address" gorm:"column:address"` AgentStatus int `json:"agent_status" gorm:"column:agent_status"` TaskNum int `json:"task_num" gorm:"column:task_num"` FinishNum int `json:"finish_num" gorm:"column:finish_num"` LastTime time.Time `json:"last_time" gorm:"column:last_time"` CreateAt time.Time `json:"create_at" gorm:"column:create_at"` IsDeleted int `json:"is_deleted" gorm:"column:is_deleted"` }
type AgentDateInfo ¶
type AgentDateInfo struct { Id int64 `gorm:"column:id;type:int(11);AUTO_INCREMENT;primary_key" json:"id"` TaskNum int64 `gorm:"column:task_num;type:int(11);NOT NULL" json:"task_num"` FinishNum int64 `gorm:"column:finish_num;type:int(11);NOT NULL" json:"finish_num"` CurrentTime string `gorm:"column:current_time;type:datetime;NOT NULL" json:"current_time"` }
AgentDateInfo 服务根据时间统计完成量
func (*AgentDateInfo) Find ¶
func (a *AgentDateInfo) Find(ctx context.Context, tx *gorm.DB, search *AgentDateInfo) (*AgentDateInfo, error)
func (*AgentDateInfo) TableName ¶
func (a *AgentDateInfo) TableName() string
type TaskOverview ¶
type TaskOverview struct { ID int64 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"` ServiceName string `gorm:"column:service_name;type:varchar(255);NOT NULL" json:"service_name"` HostId int64 `gorm:"column:host_id;type:int(11);NOT NULL" json:"host_id"` Host string `gorm:"column:host;type:varchar(255);NOT NULL" json:"host"` TaskId int64 `gorm:"column:task_id;type:int(11);NOT NULL" json:"task_id"` DbName string `gorm:"column:db_name;type:varchar(255);NOT NULL" json:"db_name"` BackupCycle string `gorm:"column:backup_cycle;type:varchar(255);NOT NULL" json:"backup_cycle"` KeepNumber int64 `gorm:"column:keep_number;type:int(11);NOT NULL" json:"keep_number"` Status sql.NullInt64 `gorm:"column:status;type:int(11)" json:"status"` Type int64 `gorm:"column:type;type:int(11)" json:"type"` FinishNum int64 `gorm:"column:finish_num;type:int(11)" json:"finish_num"` CreatedAt time.Time `gorm:"column:created_at;type:datetime;NOT NULL" json:"created_at"` UpdateAt time.Time `gorm:"column:update_at;type:datetime;NOT NULL" json:"update_at"` IsDeleted sql.NullInt64 `gorm:"column:is_deleted;type:int(11);NOT NULL" json:"is_deleted"` DeletedAt time.Time `json:"deleted_at" gorm:"column:deleted_at" description:"删除时间"` }
func (*TaskOverview) Find ¶
func (t *TaskOverview) Find(ctx context.Context, tx *gorm.DB, search *TaskOverview) (*TaskOverview, error)
func (*TaskOverview) PageList ¶
func (t *TaskOverview) PageList(c *gin.Context, tx *gorm.DB, params *agentdto.TaskOverViewListInput) ([]TaskOverview, int, error)
func (*TaskOverview) TableName ¶
func (t *TaskOverview) TableName() string
Click to show internal directories.
Click to hide internal directories.