api

package
v0.0.0-...-52780e3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearErrors

func ClearErrors() error

func GetLogTxt

func GetLogTxt() (string, error)

func IgnoreCertErrors

func IgnoreCertErrors()

func Override

func Override(folderID string) error

func PauseFolder

func PauseFolder(f string, p bool) error

func PostError

func PostError(msg string) error

func Rescan

func Rescan(folderID string) error

func ResetDB

func ResetDB() error

func Restart

func Restart() error

func Revert

func Revert(folderID string) error

func SetApiKeyTarget

func SetApiKeyTarget(a, t string) error

func Shutdown

func Shutdown() error

Types

type DbCompletion

type DbCompletion struct {
	Completion float64 `json:"completion"`
	NeedBytes  uint64  `json:"needBytes"`
}

func GetCompletion

func GetCompletion(qStr string) (DbCompletion, error)

type DbStatus

type DbStatus struct {
	GlobalBytes           uint64 `json:"globalBytes"`
	GlobalFiles           uint64 `json:"globalFiles"`
	LocalBytes            uint64 `json:"localBytes"`
	LocalFiles            uint64 `json:"localFiles"`
	NeedBytes             uint64 `json:"needBytes"`
	NeedTotalItems        uint64 `json:"needTotalItems"`
	State                 string `json:"state"`
	Errors                uint64 `json:"errors"`
	ReceiveOnlyTotalItems uint64 `json:"receiveOnlyTotalItems"`
}

func GetFolderStatus

func GetFolderStatus(f string) (DbStatus, error)

type FolderErrors

type FolderErrors struct {
	Errors []struct {
		Path  string `json:"path"`
		Error string `json:"error"`
	} `json:"errors"`
}

func GetFolderErrors

func GetFolderErrors(folderID string) (FolderErrors, error)

type StConfig

type StConfig struct {
	Folders []struct {
		ID     string `json:"id"`
		Label  string `json:"label"`
		Paused bool   `json:"paused"`
		Type   string `json:"type"`
	} `json:"folders"`

	Devices []struct {
		DeviceID string `json:"deviceID"`
		Name     string `json:"name"`
		Paused   bool   `json:"paused"`
	}
}

func GetConfig

func GetConfig() (StConfig, error)

type SysConn

type SysConn map[string]struct {
	Connected     bool   `json:"connected"`
	InBytesTotal  uint64 `json:"inBytesTotal"`
	OutBytesTotal uint64 `json:"outBytesTotal"`
}

func GetConnection

func GetConnection() (SysConn, error)

type SysConnections

type SysConnections struct {
	Connections SysConn
}

type SysErrors

type SysErrors struct {
	Errors []struct {
		When    string `json:"when"`
		Message string `json:"message"`
	} `json:"errors"`
}

func GetSysErrors

func GetSysErrors() (SysErrors, error)

type SysStatus

type SysStatus struct {
	MyID   string `json:"myID"`
	Uptime int64  `json:"uptime"`
	Ram    uint64 `json:"sys"`
}

func GetSysStatus

func GetSysStatus() (SysStatus, error)

type SysVersion

type SysVersion struct {
	Version string `json:"version"`
}

func GetSysVersion

func GetSysVersion() (SysVersion, error)

Jump to

Keyboard shortcuts

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