config

package
v1.32.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const BackmanEncryptionKey = "BACKMAN_ENCRYPTION_KEY"
View Source
const BackmanPassword = "BACKMAN_PASSWORD"
View Source
const BackmanTeamsEvents = "BACKMAN_TEAMS_EVENT"
View Source
const BackmanTeamsWebhook = "BACKMAN_TEAMS_WEBHOOK"
View Source
const BackmanUsername = "BACKMAN_USERNAME"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel           string `json:"log_level"`
	LoggingTimestamp   bool   `json:"logging_timestamp"`
	Username           string
	Password           string
	DisableWeb         bool               `json:"disable_web"`
	DisableMetrics     bool               `json:"disable_metrics"`
	DisableRestore     bool               `json:"disable_restore"`
	UnprotectedMetrics bool               `json:"unprotected_metrics"`
	Notifications      NotificationConfig `json:"notifications"`
	S3                 S3Config
	Services           map[string]ServiceConfig
	Foreground         bool
}

func Get

func Get() *Config

type NotificationConfig added in v1.28.1

type NotificationConfig struct {
	Teams TeamsNotificationConfig `json:"teams,omitempty"`
}

type S3Config added in v1.1.0

type S3Config struct {
	DisableSSL          bool   `json:"disable_ssl"`
	SkipSSLVerification bool   `json:"skip_ssl_verification"`
	ServiceLabel        string `json:"service_label"`
	ServiceName         string `json:"service_name"`
	BucketName          string `json:"bucket_name"`
	EncryptionKey       string `json:"encryption_key"`
}

type ServiceConfig added in v1.1.0

type ServiceConfig struct {
	Schedule  string
	Timeout   TimeoutDuration
	Retention struct {
		Days  int
		Files int
	}
	DirectS3                bool     `json:"direct_s3"`
	DisableColumnStatistics bool     `json:"disable_column_statistics"`
	LogStdErr               bool     `json:"log_stderr"`
	ForceImport             bool     `json:"force_import"`
	LocalBackupPath         string   `json:"local_backup_path"`
	IgnoreTables            []string `json:"ignore_tables"`
	BackupOptions           []string `json:"backup_options"`
	RestoreOptions          []string `json:"restore_options"`
}

type TeamsNotificationConfig added in v1.28.1

type TeamsNotificationConfig struct {
	Webhook string   `json:"webhook"`
	Events  []string `json:"events"`
}

type TimeoutDuration added in v1.1.0

type TimeoutDuration struct {
	time.Duration
}

func (TimeoutDuration) MarshalJSON added in v1.1.0

func (td TimeoutDuration) MarshalJSON() ([]byte, error)

func (*TimeoutDuration) UnmarshalJSON added in v1.1.0

func (td *TimeoutDuration) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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