worker

package
v0.0.0-...-161ecb4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrontabWorkerEntity

type CrontabWorkerEntity struct {
	Id           int64          `gorm:"not null; column:id" json:"id"`
	Name         string         `gorm:"not null; column:name" json:"name"`
	OS           string         `gorm:"not null; column:os" json:"os"`
	ARCH         string         `gorm:"not null; column:arch" json:"arch"`
	Ip           string         `gorm:"not null; column:ip" json:"ip"`
	JobList      pq.StringArray `gorm:"type:varchar[]; not null; column:job_list" json:"job_list"`
	StatusOnline int32          `gorm:"not null; column:status_online" json:"status_online"`
	Status       int32          `gorm:"not null; column:status" json:"status"`
	CreateTime   int64          `gorm:"not null; column:create_time" json:"create_time"`
	UpdateTime   int64          `gorm:"not null; column:update_time" json:"update_time"`
}

func Create

func Create(ctx context.Context, id int64, name, ip, os, arch string, jobList []string, statusOnline, status int32) (*CrontabWorkerEntity, error)

func DetailById

func DetailById(ctx context.Context, id int64) (*CrontabWorkerEntity, error)

func DetailByIds

func DetailByIds(ctx context.Context, ids []int64) ([]*CrontabWorkerEntity, error)

func DetailByKeys

func DetailByKeys(ctx context.Context, name, ip, os string) (*CrontabWorkerEntity, error)

func List

func List(ctx context.Context, id int64, name, ip, os, arch string, statusOnline, status int32, sortValue string, offset, limit int64) ([]*CrontabWorkerEntity, int64, error)

func Update

func Update(ctx context.Context, id int64, name, ip, os, arch string, jobList []string, statusOnline, status int32) (*CrontabWorkerEntity, error)

func UpdateStatus

func UpdateStatus(ctx context.Context, id int64, status int32) (*CrontabWorkerEntity, error)

func Upset

func Upset(ctx context.Context, id int64, name, ip, os, arch string, jobList []string, statusOnline, status int32) (*CrontabWorkerEntity, error)

func (CrontabWorkerEntity) TableName

func (CrontabWorkerEntity) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL