syncconfig

package
v0.2.38 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	Paths  []PathList `json:"paths"`
	Server SyncServer `json:"server"`
}

ClientConfig 客户端配置文件

func (ClientConfig) String

func (c ClientConfig) String() string

String

type CmdMessage

type CmdMessage struct {
	Server
	Dir   string     `json:"dir"`
	Cmd   string     `json:"cmd"`
	Slave []CmdSlave `json:"slave"`
}

CmdMessage

type CmdResult

type CmdResult struct {
	Server
	Result string `json:"result"`
}

CmdResult

func (CmdResult) String

func (f CmdResult) String() string

String

type CmdSlave

type CmdSlave struct {
	Server
	Dir string `json:"dir"`
	Cmd string `json:"cmd"`
}

CmdSlave

type FileData

type FileData struct {
	Name string `json:"name"`
	Path string `json:"path"`
	Seek int64  `json:"seek"`
	Size int64  `json:"size"`
	Data []byte `json:"data"`
}

FileData

type FileSyncMessage

type FileSyncMessage struct {
	LocationPath string   `json:"locationPath"`
	RemotePath   string   `json:"remotePath"`
	RelPath      string   `json:"relPath"`
	File         FileData `json:"file"`
	Slave        []Server `json:"slave"`
}

FileSyncMessage 同步文件信息

func (FileSyncMessage) String

func (f FileSyncMessage) String() string

String

type MessageResult

type MessageResult struct {
	Success bool   `json:"success"`
	Err     string `json:"err"`
	Code    int    `json:"code"`
	Msg     string `json:"msg"`
	Data    []byte `json:"data"`
}

MessageResult

func (MessageResult) String

func (f MessageResult) String() string

String

type PathList added in v0.0.48

type PathList struct {
	LocationPath string   `json:"locationPath"`
	RemotePath   string   `json:"remotePath"`
	Filter       []string `json:"filter"`
}

PathList

func (PathList) String added in v0.0.48

func (c PathList) String() string

String

type Server

type Server struct {
	IP   string `json:"ip"`
	Port string `json:"port"`
}

Server 服务器信息

func (Server) String

func (s Server) String() string

String

type SyncServer

type SyncServer struct {
	Server
	Slave []Server `json:"slave"`
}

SyncServer

func (SyncServer) String

func (s SyncServer) String() string

String

Jump to

Keyboard shortcuts

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