task

package
v0.0.0-...-f5b796c Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackendWindows = "windows"
	BackendLinux   = "linux"
)

Variables

View Source
var (
	ErrInvalidParam = errors.New("非法字段")
	ErrNotFound     = errors.New("未找到")
)

Functions

This section is empty.

Types

type DB

type DB interface {
	Insert(ctx context.Context, v PO) (PO, error)
	Update(ctx context.Context, newV PO) (PO, error)
	SelectAll(ctx context.Context) ([]PO, error)
	SelectByID(ctx context.Context, id uint) (PO, error)
	Delete(ctx context.Context, id uint) error
}

type Model

type Model interface {
	GetAll(ctx context.Context) ([]PO, error)
	GetByID(ctx context.Context, id int) (PO, error)
	Delete(ctx context.Context, id int) error
	Insert(ctx context.Context, v PO) (PO, error)
	Update(ctx context.Context, id int, v PO) (PO, error)
}

type PO

type PO struct {
	gorm.Model
	Address     string `gorm:"unique"`
	User        string
	Password    string
	SourcePath  string
	DestPath    string
	Backend     string
	Schedule    string
	Succeed     bool
	Enabled     bool
	CreatedTime time.Time
	UpdatedTime time.Time
}

func (PO) TableName

func (PO) TableName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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