Documentation ¶
Index ¶
- Constants
- Variables
- func DisplayGlobal(opts *DisplayOptions) error
- func DisplayLocal(opts *DisplayOptions, zetaDir string) error
- func DisplaySystem(opts *DisplayOptions) error
- func Encode(zetaDir string, config *Config) error
- func EncodeGlobal(config *Config) error
- func Get(opts *GetOptions, zetaDir string, found bool) error
- func GetGlobal(opts *GetOptions) error
- func GetLocal(opts *GetOptions, zetaDir string) error
- func GetSystem(opts *GetOptions) error
- func IsErrBadConfigKey(err error) bool
- func UnsetGlobal(keys ...string) error
- func UnsetLocal(zetaDir string, keys ...string) error
- func UnsetSystem(keys ...string) error
- func UpdateGlobal(opts *UpdateOptions) error
- func UpdateLocal(zetaDir string, opts *UpdateOptions) error
- func UpdateSystem(opts *UpdateOptions) error
- type Accelerator
- type Boolean
- type Config
- type Core
- type Display
- type DisplayOptions
- type ErrBadConfigKey
- type Fragment
- type GetOptions
- type HTTP
- type Section
- type Sections
- type Size
- type Strategy
- type StringArray
- type Transport
- type UpdateOptions
- type User
Constants ¶
View Source
const ( NoZetaDir = "" FragmentThreshold int64 = 1 * strengthen.GiByte //1G FragmentSize int64 = 1 * strengthen.GiByte //1G )
View Source
const ( UNSPECIFIED = "" BOOLEAN = "bool" INTEGER = "int" BOOLORINT = "bool-or-int" PATH = "path" DATETIME = "datetime" )
View Source
const ( BOOLEAN_UNSET = 0 BOOLEAN_TRUE = 1 BOOLEAN_FALSE = 2 )
View Source
const (
ENV_ZETA_CONFIG_SYSTEM = "ZETA_CONFIG_SYSTEM"
)
View Source
const (
NUL = '\x00'
)
Variables ¶
View Source
var ( True = Boolean{/* contains filtered or unexported fields */} False = Boolean{/* contains filtered or unexported fields */} )
View Source
var (
ErrInvalidArgument = errors.New("invalid argument")
)
View Source
var (
ErrKeyNotFound = errors.New("key not found")
)
Functions ¶
func DisplayGlobal ¶
func DisplayGlobal(opts *DisplayOptions) error
func DisplayLocal ¶
func DisplayLocal(opts *DisplayOptions, zetaDir string) error
func DisplaySystem ¶
func DisplaySystem(opts *DisplayOptions) error
func EncodeGlobal ¶
func GetGlobal ¶
func GetGlobal(opts *GetOptions) error
func GetLocal ¶
func GetLocal(opts *GetOptions, zetaDir string) error
func GetSystem ¶
func GetSystem(opts *GetOptions) error
func IsErrBadConfigKey ¶
func UnsetGlobal ¶
func UnsetLocal ¶
func UnsetSystem ¶
func UpdateGlobal ¶
func UpdateGlobal(opts *UpdateOptions) error
func UpdateLocal ¶
func UpdateLocal(zetaDir string, opts *UpdateOptions) error
func UpdateSystem ¶
func UpdateSystem(opts *UpdateOptions) error
Types ¶
type Accelerator ¶
type Accelerator string
const ( Direct Accelerator = "direct" Dragonfly Accelerator = "dragonfly" Aria2 Accelerator = "aria2" // https://github.com/aria2/aria2 )
type Boolean ¶
type Boolean struct {
// contains filtered or unexported fields
}
func (*Boolean) UnmarshalTOML ¶
type Config ¶
type Config struct { Core Core `toml:"core,omitempty"` User User `toml:"user,omitempty"` Fragment Fragment `toml:"fragment,omitempty"` HTTP HTTP `toml:"http,omitempty"` Transport Transport `toml:"transport,omitempty"` }
func LoadBaseline ¶
func LoadGlobal ¶
func LoadSystem ¶
type Core ¶
type Core struct { SharingRoot string `toml:"sharingRoot,omitempty"` // GLOBAL HooksPath string `toml:"hooksPath,omitempty"` // GLOBAL Remote string `toml:"remote,omitempty"` Snapshot bool `toml:"snapshot,omitempty"` SparseDirs StringArray `toml:"sparse,omitempty"` HashALGO string `toml:"hash-algo,omitempty"` CompressionALGO string `toml:"compression-algo,omitempty"` Editor string `toml:"editor,omitempty"` OptimizeStrategy Strategy `toml:"optimizeStrategy,omitempty"` // zeta config core.optimizeStrategy eager OR ZETA_CORE_OPTIMIZE_STRATEGY="eager" Accelerator Accelerator `toml:"accelerator,omitempty"` // zeta config core.accelerator dragonfly OR ZETA_CORE_ACCELERATOR="dragonfly" ConcurrentTransfers int `toml:"concurrenttransfers,omitzero"` // zeta config core.concurrenttransfers 8 OR ZETA_CORE_CONCURRENT_TRANSFERS=8 }
type DisplayOptions ¶
func (*DisplayOptions) DbgPrint ¶
func (opts *DisplayOptions) DbgPrint(format string, args ...any)
type ErrBadConfigKey ¶
type ErrBadConfigKey struct {
// contains filtered or unexported fields
}
ErrNotExist commit not exist error
func (*ErrBadConfigKey) Error ¶
func (err *ErrBadConfigKey) Error() string
type Fragment ¶
type GetOptions ¶
func (*GetOptions) DbgPrint ¶
func (opts *GetOptions) DbgPrint(format string, args ...any)
type HTTP ¶
type HTTP struct { ExtraHeader StringArray `toml:"extraHeader,omitempty"` SSLVerify Boolean `toml:"sslVerify,omitempty"` }
type StringArray ¶
type StringArray []string
func (*StringArray) UnmarshalTOML ¶
func (a *StringArray) UnmarshalTOML(data any) error
type Transport ¶
type UpdateOptions ¶
Click to show internal directories.
Click to hide internal directories.