config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	ClientName string   `yaml:"name"`
	IPv4Addr   []string `yaml:"ipv4"`
	IPv6Addr   []string `yaml:"ipv6"`
	Password   string   `yaml:"password"`
}

ClientConfig is the data structure containing all information about a client that can connect to the eldim service

func (*ClientConfig) IPv4

func (client *ClientConfig) IPv4() []net.IP

IPv4 returns the list of client IPv4 Addresses

func (*ClientConfig) IPv6

func (client *ClientConfig) IPv6() []net.IP

IPv6 returns the list of client IPv6 Addresses

func (*ClientConfig) Name

func (client *ClientConfig) Name() string

Name returns the name of the client, as configured

func (*ClientConfig) Validate

func (client *ClientConfig) Validate() error

Validate validates a single client entry from the client configuration file

type Config

type Config struct {
	/* Web Server Settings */
	ListenPort   int   `yaml:"listenport"`
	ServerTokens bool  `yaml:"servertokens"`
	MaxUploadRAM int64 `yaml:"maxuploadram"`

	/* TLS Settings */
	TLSChainPath string `yaml:"tlschain"`
	TLSKeyPath   string `yaml:"tlskey"`

	/* Backend Server */
	SwiftBackends []swift.BackendConfig `yaml:"swiftbackends"`
	GCSBackends   []gcs.BackendConfig   `yaml:"gcsbackends"`
	S3Backends    []s3.BackendConfig    `yaml:"s3backends"`

	/* Clients */
	ClientFile string `yaml:"clientfile"`

	/* Encryption */
	EncryptionKey string `yaml:"encryptionkey"` // Deprecated in eldim v0.6.0
	Encryption    struct {
		AgeID  []string `yaml:"age-id"`
		AgeSSH []string `yaml:"age-ssh"`
	} `yaml:"encryption"`

	/* Prometheus Metrics */
	PrometheusEnabled  bool   `yaml:"prometheusenabled"`
	PrometheusAuthUser string `yaml:"prometheusauthuser"`
	PrometheusAuthPass string `yaml:"prometheusauthpass"`
}

Config is the data structure outlying the configuration file of eldim

func (*Config) Clients

func (conf *Config) Clients() []backend.Client

Clients returns all configured Backend Clients

func (*Config) Validate

func (conf *Config) Validate() error

Validate validates the eldim configuration file and returns the first error that occured

Jump to

Keyboard shortcuts

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