config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	Prefix    string `toml:"prefix"`
	Retention int    `toml:"retention"`
	Schedule  string `toml:"schedule"`
}

type Config

type Config struct {
	S3 S3 `toml:"-"`

	PGURL      string     `toml:"pg_url"`
	S3URL      string     `toml:"s3_url"`
	Backup     Backup     `toml:"backup"`
	Restore    Restore    `toml:"restore"`
	Encryption Encryption `toml:"encryption"`
}

func Read

func Read(data string) (Config, error)

func ReadFile

func ReadFile(path string) (Config, error)

type Encryption

type Encryption struct {
	PublicKeys []string `toml:"public_keys"`
}

type Restore

type Restore struct {
	Schemas []string `toml:"schemas"`
}

type S3

type S3 struct {
	Endpoint        string
	AccessKeyID     string
	SecretAccessKey string
	BucketName      string
}

func ParseS3URL

func ParseS3URL(s3URL string) (S3, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳