model

package
v0.0.0-...-86d34a5 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DevelopmentMode 开发模式
	DevelopmentMode = "development"

	// TestMode 测试模式
	TestMode = "test"

	// ProductionMode 产品模式
	ProductionMode = "production"
)

Variables

View Source
var DB *gorm.DB

Functions

func GetAllTranLogCount

func GetAllTranLogCount() uint64

func InitDB

func InitDB() (*gorm.DB, error)

Types

type BaseModel

type BaseModel struct {
	ID        uint64 `gorm:"primary_key"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

Base Model

type TaskFileCopy

type TaskFileCopy struct {
	ID       uint64 `gorm:"primary_key"`
	TaskID   string
	FileName string
	FileSize int64
	FileMd5  string
}

func (*TaskFileCopy) Find

func (tFileCopy *TaskFileCopy) Find() (*TaskFileCopy, error)

func (*TaskFileCopy) Insert

func (tFileCopy *TaskFileCopy) Insert() error

func (*TaskFileCopy) Update

func (tFileCopy *TaskFileCopy) Update() error

type TaskFileInfo

type TaskFileInfo struct {
	BaseModel
	TaskID         string `json:"taskID"'`
	SrcHost        string `json:"srcHost"`
	DestHost       string `json:"destHost"`
	FilePort       int    `json:"filePort"`
	SrcPath        string `json:"srcPath"`
	DestPath       string `json:"destPath"`
	Status         int    `json:"status"`
	TranType       int    `json:"tranType"`
	ScheduleTime   int64  `json:"scheduleTime"`
	LastFinishTime int64  `json:"lastFinishTime"`
}

func FindAllTaskQuery

func FindAllTaskQuery() ([]*TaskFileInfo, error)

func FindTaskByID

func FindTaskByID(id string) (*TaskFileInfo, error)

func (*TaskFileInfo) Delete

func (tFileInfo *TaskFileInfo) Delete() error

func (*TaskFileInfo) Find

func (tFileInfo *TaskFileInfo) Find() (*TaskFileInfo, error)

func (*TaskFileInfo) GetTaskJsonPack

func (tFileInfo *TaskFileInfo) GetTaskJsonPack(taskType string) string

func (*TaskFileInfo) Insert

func (tFileInfo *TaskFileInfo) Insert() error

func (*TaskFileInfo) SendTaskInfoToLocal

func (tFileInfo *TaskFileInfo) SendTaskInfoToLocal(taskType string) bool

func (*TaskFileInfo) Update

func (tFileInfo *TaskFileInfo) Update() error

func (*TaskFileInfo) UpdateTaskStatus

func (tFileInfo *TaskFileInfo) UpdateTaskStatus() error

func (*TaskFileInfo) UpdateTaskStatusTime

func (tFileInfo *TaskFileInfo) UpdateTaskStatusTime() error

type TaskFileLog

type TaskFileLog struct {
	ID            uint64 `gorm:"primary_key"`
	TaskID        string
	SrcHost       string
	DestHost      string
	FileName      string `json:"fileName"`
	FileSize      int64  `json:"fileSize"`
	FileStartTime string
	FileEndTime   string
	TransResult   string
}

func FindAllTranLogQuery

func FindAllTranLogQuery(curOffset int) ([]*TaskFileLog, error)

func (*TaskFileLog) Insert

func (tFilelog *TaskFileLog) Insert() error

Jump to

Keyboard shortcuts

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