Help us shape the future of Go! Take the 2026 Go Developer Survey

domain

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupConfig

type BackupConfig struct {
	Docker []ContainerDocker `yaml:"Docker,omitempty"`
}

type Config

type Config struct {
	Daemon      ConfigDaemon `yaml:"Daemon,omitempty"`
	Backup      BackupConfig `yaml:"Backup"`
	Alert       ConfigAlert  `yaml:"Alert,omitempty"`
	Destination ConfigDest   `yaml:"Destination,omitempty"`
}

This is the root yaml config that contains the information needed to operate

type ConfigAlert

type ConfigAlert struct {
	SendOnlyOnError bool               `yaml:"SendOnlyOnError,omitempty"`
	Discord         ConfigAlertDiscord `yaml:"Discord,omitempty"`
	Email           ConfigAlertEmail   `yaml:"Email,omitempty"`
}

type ConfigAlertDiscord

type ConfigAlertDiscord struct {
	Username string   `yaml:"Username,omitempty"`
	Webhooks []string `yaml:"Webhooks,omitempty"`
}

type ConfigAlertEmail added in v0.0.3

type ConfigAlertEmail struct {
	Account ConfigAlertEmailAccount `yaml:"Account"`
	From    string                  `yaml:"From"`
	To      string                  `yaml:"To"`
}

type ConfigAlertEmailAccount added in v0.0.3

type ConfigAlertEmailAccount struct {
	Username string `yaml:"Username"`
	Password string `yaml:"Password"`
	Host     string `yaml:"Host"`
	Port     int    `yaml:"Port"`
	UseTls   bool   `yaml:"UseTls"`
}

type ConfigContainerPost added in v0.0.3

type ConfigContainerPost struct {
	Reboot []string `yaml:"Reboot,omitempty"`
}

type ConfigContainerTar

type ConfigContainerTar struct {
	UseDate   bool   `yaml:"UseDate,omitempty"`
	Pattern   string `yaml:"Pattern,omitempty"`
	Directory string `yaml:"Directory,omitempty"`
}

type ConfigDaemon added in v0.0.4

type ConfigDaemon struct {
	Cron string `yaml:"Cron,omitempty"`
}

type ConfigDest

type ConfigDest struct {
	Retain ConfigRetain    `yaml:"Retain,omitempty"`
	Local  ConfigDestLocal `yaml:"Local,omitempty"`
	Sftp   ConfigDestSftp  `yaml:"Sftp,omitempty"`
}

type ConfigDestLocal

type ConfigDestLocal struct {
	Path string `yaml:"Path,omitempty"`
}

Defines where and how to move data

type ConfigDestSftp

type ConfigDestSftp struct {
	Path     string `yaml:"Path"`
	Server   string `yaml:"Server"`
	Username string `yaml:"Username"`
	Password string `yaml:"Password"`
}

type ConfigRetain

type ConfigRetain struct {
	Days int `yaml:"Days,omitempty"`
}

Defines how long backups should be retained

type ContainerDocker

type ContainerDocker struct {
	Name      string              `yaml:"Name"`
	Directory string              `yaml:"Directory"`
	Tar       ConfigContainerTar  `yaml:"Tar"`
	Post      ConfigContainerPost `yaml:"Post,omitempty"`
}

type DiscordAuthor

type DiscordAuthor struct {
	Name    string `json:"name,omitempty"`
	Url     string `json:"url,omitempty"`
	IconUrl string `json:"icon_url,omitempty"`
}

type DiscordBasicMessage added in v0.0.6

type DiscordBasicMessage struct {
	Username  string         `json:"username,omitempty"`
	AvatarUrl string         `json:"avatar_url,omitempty"`
	Content   string         `json:"content,omitempty"`
	Embeds    []DiscordEmbed `json:"embeds,omitempty"`
}

Root object for Discord Webhook messages

type DiscordEmbed

type DiscordEmbed struct {
	Title       string         `json:"title,omitempty"`
	Description string         `json:"description,omitempty"`
	Url         string         `json:"url,omitempty"`
	Color       int            `json:"color,omitempty"`
	Fields      []DiscordField `json:"fields,omitempty"`
	Author      DiscordAuthor  `json:"author,omitempty"`
	Image       DiscordImage   `json:"image,omitempty"`
	Thumbnail   DiscordImage   `json:"thumbnail,omitempty"`
	Footer      DiscordFooter  `json:"footer,omitempty"`
}

type DiscordField

type DiscordField struct {
	Name   string `json:"name,omitempty"`
	Value  string `json:"value,omitempty"`
	Inline bool   `json:"inline,omitempty"`
}

type DiscordFooter

type DiscordFooter struct {
	Value   string `json:"text,omitempty"`
	IconUrl string `json:"icon_url,omitempty"`
}

type DiscordImage

type DiscordImage struct {
	Url string `json:"url,omitempty"`
}

type Flags added in v0.0.2

type Flags struct {
	ConfigPath  string
	StartBackup bool
}

type Logs

type Logs struct {
	Message []string
}

func NewLogs

func NewLogs() *Logs

func (*Logs) Add

func (c *Logs) Add(Message string)

func (*Logs) Error

func (c *Logs) Error(err error)

type Process added in v0.0.2

type Process interface {
	RunProcess() error
}

type RunBackupDetails

type RunBackupDetails struct {
	TargetDirectory       string
	LocalDirectory        string
	ServiceName           string
	FileName              string
	Extension             string
	FileNameWithExtension string
	FullFilePath          string
}

type RunDestDetails

type RunDestDetails struct {
	Local RunDetailsDestLocal
}

type RunDetails

type RunDetails struct {
	ContainerName       string
	ContainerBackupPath string
	Backup              RunBackupDetails
	Dest                RunDestDetails
}

type RunDetailsDestLocal

type RunDetailsDestLocal struct {
	Directory             string
	FileName              string
	Extension             string
	FileNameWithExtension string
	FullFilePath          string
}

This struct contains the information on where the local data

type SendAlert

type SendAlert interface {
	SendAlert() error
}

Jump to

Keyboard shortcuts

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