client

package
v1.0.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DownloadServerTypeOss = 2
)

Variables

This section is empty.

Functions

func Start

func Start()

Types

type Announcement

type Announcement struct {
	Content string `json:"content"`
	Hash    string `json:"hash"`
}

type CacheFile added in v1.0.11

type CacheFile struct {
	RelativePath string   `json:"relative_path"`
	Type         FileType `json:"type"`
	Hash         string   `json:"hash"`
}

type CacheInfo added in v1.0.11

type CacheInfo struct {
	GenerateTimestamp int64                 `json:"generate_timestamp"`
	GenerateTime      string                `json:"generate_time"`
	UpdateTimestamp   int64                 `json:"update_timestamp"`
	UpdateTime        string                `json:"update_time"`
	Files             map[string]*CacheFile `json:"files"`
}

func NewCacheInfo added in v1.0.11

func NewCacheInfo() *CacheInfo

type ClientFileInfo

type ClientFileInfo struct {
	Files []*FileInfo `json:"files"`
}

type FileInfo

type FileInfo struct {
	RelativePath string   `json:"relative_path"`
	Type         FileType `json:"type"`
	Hash         string   `json:"hash"`
}

type FileType

type FileType int8
const (
	TypeFile    FileType = 1
	TypeDir     FileType = 2
	TypeSymlink FileType = 4
)

type ScanStatus

type ScanStatus int8
const (
	ScanStatusWait      ScanStatus = 10
	ScanStatusScanning  ScanStatus = 20
	ScanStatusFailed    ScanStatus = 30
	ScanStatusCompleted ScanStatus = 40
)

type ServerFileInfo

type ServerFileInfo struct {
	ScanStatus ScanStatus  `json:"status"`
	Files      []*FileInfo `json:"files"`
}

type UpdateInfo

type UpdateInfo struct {
	Current int
	Total   int
}
var UpdateInf *UpdateInfo = &UpdateInfo{}

Jump to

Keyboard shortcuts

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