client

package module
v0.0.0-...-094e1e4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 22 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatFilename

func FormatFilename(filename string) string

func ReqResp

func ReqResp(socketServerAddr string, commandType rpcutil.CommandType, req proto.Message, resp proto.Message) (status rpcutil.Status, err error)

func ReqRespN

func ReqRespN(socketServerAddr string, commandType rpcutil.CommandType, req proto.Message, resp proto.Message,
	onLength func(int64) error, onDirItem func() error) (err error)

func ReqRespWithConn

func ReqRespWithConn(conn net.Conn, commandType rpcutil.CommandType, req proto.Message, resp proto.Message) (status rpcutil.Status, err error)

func ReqString

func ReqString(socketServerAddr string, commandType rpcutil.CommandType, req string) (err error)

func ReqStringResp

func ReqStringResp(socketServerAddr string, commandType rpcutil.CommandType, req string, resp proto.Message) (err error)

Types

type LineProcess

type LineProcess struct {
	// contains filtered or unexported fields
}

type RpcFs

type RpcFs struct {
	SocketServerAddr string
}

func (*RpcFs) BranchInfo

func (fs *RpcFs) BranchInfo(ctx context.Context, branchName string) (dao.IBranch, error)

func (*RpcFs) Cat

func (fs *RpcFs) Cat(ctx context.Context, branchName string, filePath string, fn func(r io.Reader, size int64) error) (err error)

func (*RpcFs) Checkout

func (fs *RpcFs) Checkout(ctx context.Context, branchName string) (bool, error)

func (*RpcFs) Download

func (fs *RpcFs) Download(ctx context.Context, branchName string, dstPath string, srcPath string) (filePath string, err error)

func (*RpcFs) List

func (fs *RpcFs) List(ctx context.Context, branchName string, filePath string, onLength func(int64) error, onDirItem func(item dao.IDirItem) error) error

func (*RpcFs) Reset

func (fs *RpcFs) Reset(ctx context.Context, branchName string) error

func (*RpcFs) Touch

func (fs *RpcFs) Touch(ctx context.Context, branchName string, filePath string) (commit dao.Commit, branch dao.Branch, err error)

func (*RpcFs) Upload

func (fs *RpcFs) Upload(ctx context.Context, branchName string, dstPath string, srcPath string, config core.UploadConfig) (commit dao.Commit, branch dao.Branch, err error)

func (*RpcFs) UploadDir

func (fs *RpcFs) UploadDir(ctx context.Context, deviceId string, driverId uint64, dstPath string, srcPath string, config core.UploadDirConfig) (err error)

type TerminalUploadProcess

type TerminalUploadProcess struct {
	// contains filtered or unexported fields
}

func (*TerminalUploadProcess) Close

func (h *TerminalUploadProcess) Close(resp core.FileResp, err error)

func (*TerminalUploadProcess) EndFile

func (h *TerminalUploadProcess) EndFile(index int, filePath string, info os.FileInfo, exist bool)

func (*TerminalUploadProcess) HasPushedAllToStack

func (h *TerminalUploadProcess) HasPushedAllToStack()

func (*TerminalUploadProcess) New

func (h *TerminalUploadProcess) New(srcPath string, concurrent int, conns []net.Conn) core.UploadProcess

func (*TerminalUploadProcess) OnFileError

func (h *TerminalUploadProcess) OnFileError(index int, filePath string, info os.FileInfo, err error)

func (*TerminalUploadProcess) PushFile

func (h *TerminalUploadProcess) PushFile(info os.FileInfo)

func (*TerminalUploadProcess) Show

func (h *TerminalUploadProcess) Show(p *core.Process)

func (*TerminalUploadProcess) StackSizeHandler

func (h *TerminalUploadProcess) StackSizeHandler(size int)

func (*TerminalUploadProcess) StartFile

func (h *TerminalUploadProcess) StartFile(index int, filePath string, info os.FileInfo)

func (*TerminalUploadProcess) Verbose

func (h *TerminalUploadProcess) Verbose() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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