clib

package
v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLib

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

func NewCLib

func NewCLib(daemonStart daemonStartFunc) *CLib

func (*CLib) JSONCall

func (clib *CLib) JSONCall(jsonStr string) *JSONCallResult

type DaemonSwitch

type DaemonSwitch struct {
	StopChan chan bool
	IsStop   bool
	IsOnline bool
}

type DownloadCancelReq

type DownloadCancelReq struct {
	FilePath string `json:"file_path"`
}

type DownloadFileReq

type DownloadFileReq struct {
	CID          string `json:"cid"`
	DownloadPath string `json:"download_path"`
	LocatorURL   string `json:"locator_url"`
}

type DownloadProgressReq

type DownloadProgressReq struct {
	FilePath string `json:"file_path"`
}

type DownloadProgressResult

type DownloadProgressResult struct {
	FilePath  string `json:"file_path"`
	Status    string `json:"status"`
	TotalSize int64  `json:"total_size"`
	DoneSize  int64  `json:"done_size"`
}

type Downloader

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

type JSONCallArgs

type JSONCallArgs struct {
	Method     string `json:"method"`
	JSONParams string `json:"jsonParams"`
}

type JSONCallResult

type JSONCallResult struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data string `json:"data"`
}

type MergeConfigReq

type MergeConfigReq struct {
	RepoPath string `json:"repoPath"`
	Config   string `json:"config"`
}

type Progress

type Progress struct {
	TotalSize int64
	DoneSize  int64
}

type ProgressReader

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

func (*ProgressReader) Read

func (pr *ProgressReader) Read(p []byte) (n int, err error)

type ReadConfigReq

type ReadConfigReq struct {
	RepoPath string `json:"repoPath"`
}

type SignReq

type SignReq struct {
	RepoPath string `json:"repoPath"`
	Hash     string `json:"hash"`
}

type SignResult

type SignResult struct {
	Signature string `json:"signature"`
}

type StartDaemonReq

type StartDaemonReq struct {
	RepoPath   string `json:"repoPath"`
	LogPath    string `json:"logPath"`
	LocatorURL string `json:"locatorURL"`
}

type StateResult

type StateResult struct {
	Runing bool `json:"running"`
	Online bool `json:"online"`
}

Jump to

Keyboard shortcuts

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