config

package
v0.0.0-...-a253b9f Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncConfig

type SyncConfig struct {
	Local struct {
		Path string `yaml:"path"`
	} `yaml:"local"`
	Remote struct {
		Endpoint  string `yaml:"endpoint"`
		UseSSL    bool   `yaml:"use_ssl"`
		SecretId  string `yaml:"secret_id"`
		SecretKey string `yaml:"secret_key"`
		Bucket    string `yaml:"bucket"`
		Region    string `yaml:"region"`
		Path      string `yaml:"path"`
	} `yaml:"remote"`
	Sync struct {
		RealTime struct {
			Enable   bool `yaml:"enable"`
			HotDelay int  `yaml:"hot_delay"`
		} `yaml:"real_time"`
		CheckJob struct {
			Enable   bool   `yaml:"enable"`
			Interval int    `yaml:"interval"`
			StartAt  string `yaml:"start_at"`
		} `yaml:"check_job"`
		Symlink string   `yaml:"symlink"`
		Ignore  []string `yaml:"ignore,omitempty"`
	} `yaml:"sync"`
	Log []log.OutputConfig `yaml:"log"`
}

SyncConfig 同步配置

func GetConfig

func GetConfig(path string) (*SyncConfig, error)

GetConfig 获取解析好的配置

func (*SyncConfig) GetString

func (c *SyncConfig) GetString() string

GetString 格式化配置成字符串

Jump to

Keyboard shortcuts

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