config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: BSD-3-Clause Imports: 12 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"`

	/* System */
	TempUploadPath string `yaml:"tempuploadpath"`

	/* Encryption */
	EncryptionKey string `yaml:"encryptionkey"`

	/* 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