config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	LogLevel    string `json:"log_level"`
	JSONLog     bool   `json:"json_log"`
	Port        int    `json:"port"`
	ConfigPath  string `json:"config_path"`
	StoragePath string `json:"storage_path"`
	TmpPath     string `json:"tmp_path"`
	DataPath    string `json:"data_path"`
	Version     string `json:"version"`
	UseAwsCli   bool   `json:"use_aws_cli"`
	HasGpg      bool   `json:"has_gpg"`
}

type Azure

type Azure struct {
	ContainerName    string `yaml:"containerName"`
	ConnectionString string `yaml:"connectionString"`
}

type Encryption added in v1.3.0

type Encryption struct {
	Gpg *Gpg `yaml:"gpg"`
}

type GCloud

type GCloud struct {
	Bucket      string `yaml:"bucket"`
	KeyFilePath string `yaml:"keyFilePath"`
}

type Gpg added in v1.3.0

type Gpg struct {
	KeyServer  string   `yaml:"keyServer"`
	Recipients []string `yaml:"recipients"`
	KeyFile    string   `yaml:"keyFile"`
}

type Plan

type Plan struct {
	Name       string      `yaml:"name"`
	Target     Target      `yaml:"target"`
	Scheduler  Scheduler   `yaml:"scheduler"`
	Encryption *Encryption `yaml:"encryption"`
	S3         *S3         `yaml:"s3"`
	GCloud     *GCloud     `yaml:"gcloud"`
	Rclone     *Rclone     `yaml:"rclone"`
	Azure      *Azure      `yaml:"azure"`
	SFTP       *SFTP       `yaml:"sftp"`
	SMTP       *SMTP       `yaml:"smtp"`
	Slack      *Slack      `yaml:"slack"`
}

func LoadPlan

func LoadPlan(dir string, name string) (Plan, error)

func LoadPlans

func LoadPlans(dir string) ([]Plan, error)

type Rclone added in v1.2.0

type Rclone struct {
	Bucket         string `yaml:"bucket"`
	ConfigFilePath string `yaml:"configFilePath"`
	ConfigSection  string `yaml:"configSection"`
}

type S3

type S3 struct {
	Bucket       string `yaml:"bucket"`
	AccessKey    string `yaml:"accessKey"`
	API          string `yaml:"api"`
	SecretKey    string `yaml:"secretKey"`
	URL          string `yaml:"url"`
	KmsKeyId     string `yaml:"kmsKeyId"`
	StorageClass string `` /* 138-byte string literal not displayed */
}

type SFTP

type SFTP struct {
	Dir        string `yaml:"dir"`
	Host       string `yaml:"host"`
	Password   string `yaml:"password"`
	PrivateKey string `yaml:"private_key"`
	Passphrase string `yaml:"passphrase"`
	Port       int    `yaml:"port"`
	Username   string `yaml:"username"`
}

type SMTP

type SMTP struct {
	Server   string   `yaml:"server"`
	Port     string   `yaml:"port"`
	Password string   `yaml:"password"`
	Username string   `yaml:"username"`
	From     string   `yaml:"from"`
	To       []string `yaml:"to"`
}

type Scheduler

type Scheduler struct {
	Cron      string `yaml:"cron"`
	Retention int    `yaml:"retention"`
	Timeout   int    `yaml:"timeout"`
}

type Slack

type Slack struct {
	URL      string `yaml:"url"`
	Channel  string `yaml:"channel"`
	Username string `yaml:"username"`
	WarnOnly bool   `yaml:"warnOnly"`
}

type Target

type Target struct {
	Database string `yaml:"database"`
	Host     string `yaml:"host"`
	Uri      string `yaml:"uri"`
	Password string `yaml:"password"`
	Port     int    `yaml:"port"`
	Username string `yaml:"username"`
	Params   string `yaml:"params"`
}

Jump to

Keyboard shortcuts

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