config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.

* Arc - Copyleft of Simone 'evilsocket' Margaritelli. * evilsocket at protonmail dot com * https://www.evilsocket.net/ * * See LICENSE.

Index

Constants

View Source
const (
	APP_NAME    = "arcd"
	APP_VERSION = "1.1.1"
)

Variables

View Source
var Conf = Configuration{
	Address:       defAddress,
	Port:          defPort,
	Database:      defDatabaseName,
	Secret:        defHMacSecret,
	Username:      defUsername,
	Password:      defPassword,
	TokenDuration: defTokenDuration,
	Compression:   defCompression,
	Backups: bkConfig{
		Enabled: defBackupsEnabled,
	},
	Scheduler: schConfig{
		Enabled: true,
		Period:  defSchedulerPeriod,
		Reports: rpConfig{
			Enabled:   false,
			RateLimit: defRateLimit,
		},
	},
}

Functions

func Load

func Load(filename string) error

Types

type Configuration

type Configuration struct {
	Address       string    `json:"address"`
	Port          int       `json:"port"`
	Certificate   string    `json:"certificate"`
	Key           string    `json:"key"`
	Database      string    `json:"database"`
	Secret        string    `json:"secret"`
	Username      string    `json:"username"`
	Password      string    `json:"password"`
	TokenDuration int       `json:"token_duration"`
	Compression   bool      `json:"compression"`
	CheckExpired  int       `json:"check_expired"`
	Scheduler     schConfig `json:"scheduler"`
	Backups       bkConfig  `json:"backups"`
}

Arc server configuration. swagger:response

func (Configuration) Auth

func (c Configuration) Auth(username, password string) bool

type KeyPair added in v1.0.5

type KeyPair struct {
	Public  string `json:"public"`
	Private string `json:"private"`
}

type PGPConfig added in v1.0.5

type PGPConfig struct {
	Enabled bool    `json:"enabled"`
	Keys    KeyPair `json:"keys"`
}

PGP configuration.

type SMTPConfig

type SMTPConfig struct {
	Address  string `json:"address"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
}

SMTP configuration.

Jump to

Keyboard shortcuts

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