dto

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RepositoryStatusOnline  = "online"
	RepositoryStatusOffline = "offline"
)

表示仓库的状态

Variables

This section is empty.

Functions

This section is empty.

Types

type AboutInfo added in v0.0.9

type AboutInfo struct {
	Title       string
	Name        string
	WebSite     string
	Company     string
	Version     string
	Revision    int
	ReleaseDate string
	ReleaseTime int64
	Copyright   string
}

AboutInfo ...

type AgentLink struct {
	ID           string
	Port         int
	UserHome     string // the user-home-dir
	PublicKey    string // the user-public-key-file
	PublicKeySum string // sha256sum
	Timeout      int
	Online       bool
}

type AgentMessage

type AgentMessage struct {
	ID      int
	Time    time.Time
	Name    string
	Title   string
	Content string
}

type BaseDTO

type BaseDTO struct {
	ID      string
	UUID    string
	Owner   string
	Creator string
}

type Command

type Command struct {
	Path        string
	Script      string
	Output      string
	Input       string
	Error       string
	TaskID      string
	Done        bool
	SyncTimeout int64 // 同步模式的超时时间,如果超时则转为异步执行。如果设为0,则直接采用异步执行。
}

type DBASnapshot

type DBASnapshot struct {
	Timestamp  int64
	Message    string
	CountDirs  int64
	CountFiles int64
	CountBytes int64
}

type Dir

type Dir struct {
	DirItem
	Path  string
	Items []*DirItem
}

Dir 是目录的 DTO

type DirItem

type DirItem struct {
	Name        string
	ContentType string
	URL         string

	Size      int64
	UpdatedAt int64
	CreatedAt int64

	Exists    bool
	IsDir     bool
	IsFile    bool
	IsVirtual bool
	IsSymlink bool
}

DirItem 是 Dir 和 File 的基本结构

type Example added in v0.0.9

type Example struct {
	BaseDTO
}

type File

type File struct {
	DirItem
	Path string
}

File 是文件的 DTO

type Plan

type Plan struct {
	BaseDTO
}

type Repository

type Repository struct {
	BaseDTO

	Name        string
	Label       string
	DisplayName string // Name or Label
	Path        string
	Description string
	Status      string
}

type RepositoryClone

type RepositoryClone struct {
	BaseDTO

	Name        string
	Label       string
	DisplayName string // Name or Label
	Path        string
	URL         string
	Description string
}

type RepositoryImport

type RepositoryImport struct {
	BaseDTO
	Paths []string
}

type RepositoryInit

type RepositoryInit struct {
	BaseDTO

	Bare        bool
	Name        string
	Label       string
	DisplayName string // Name or Label
	Path        string
	Description string
}

type Setting added in v0.0.9

type Setting struct {
	Name         string
	Value        string
	Description  string
	DefaultValue string
}

Setting ...

type StarIndexItem added in v0.0.9

type StarIndexItem struct {
	ID      string
	Class   string
	URL     string
	Version string
	Types   string
}

StarIndexItem "STAR"服务描述符

type Task

type Task struct {
	BaseDTO

	FromTime int64
	ToTime   int64
	Deadline int64 // 如果>=0, 该字段无效
	ShortID  int   // 这个字段只是为了方便人类阅读,实际的ID 应该以 BaseDTO.ID 为准
	Archive  bool  // 表示任务结束后,是否要存入历史记录

	Class            string // 类似于html的class属性,用来选取不同种类的任务
	CommandLine      string
	WorkingDirectory string
	Status           string // = mix ( task.Status , task.State)
	Message          string
	Error            string
}

Task 表示一个后台任务

type User

type User struct {
	BaseDTO
}

Jump to

Keyboard shortcuts

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