settings

package
v1.17.9 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBenchmarkConfiguration

func NewBenchmarkConfiguration() IConfiguration

func NewConfiguration

func NewConfiguration(path string, dockerized bool) (IConfiguration, error)

func NewTestConfiguration

func NewTestConfiguration() IConfiguration

Types

type Configuration

type Configuration struct {
	Dockerized           bool
	Environment          string                `yaml:"environment"`
	TrafficRecord        bool                  `yaml:"traffic_record"`
	RequestLog           bool                  `yaml:"request_log"`
	AllowedOrigins       []string              `yaml:"allowed_origins"`
	Server               *Server               `yaml:"server"`
	Influx               *Influx               `yaml:"influx"`
	PostgreSQL           *PostgreSQL           `yaml:"postgres"`
	MastodonApplications []MastodonApplication `yaml:"mastodon"`
}

func (*Configuration) GetAllowedOrigins added in v1.9.3

func (configuration *Configuration) GetAllowedOrigins() []string

func (*Configuration) GetEnvironment

func (configuration *Configuration) GetEnvironment() string

func (*Configuration) GetInfluxConfiguration

func (configuration *Configuration) GetInfluxConfiguration() IInfluxConfiguration

func (*Configuration) GetMastodonApplication added in v1.17.8

func (configuration *Configuration) GetMastodonApplication(name string) IMastodonApplication

func (*Configuration) GetPorts

func (configuration *Configuration) GetPorts() (int, int, int)

func (*Configuration) GetPostgreSQLConfiguration added in v1.7.0

func (configuration *Configuration) GetPostgreSQLConfiguration() IPostgreSQLConfiguration

func (*Configuration) GetServerConfiguration

func (configuration *Configuration) GetServerConfiguration() IServerConfiguration

func (*Configuration) IsDevelopmentEnvironment

func (configuration *Configuration) IsDevelopmentEnvironment() bool

func (*Configuration) IsDockerized

func (configuration *Configuration) IsDockerized() bool

func (*Configuration) IsProductionEnvironment

func (configuration *Configuration) IsProductionEnvironment() bool

func (*Configuration) IsRequestLogEnabled added in v1.15.3

func (configuration *Configuration) IsRequestLogEnabled() bool

func (*Configuration) IsStagingEnvironment

func (configuration *Configuration) IsStagingEnvironment() bool

func (*Configuration) IsTestEnvironment

func (configuration *Configuration) IsTestEnvironment() bool

func (*Configuration) IsTrafficRecordEnabled added in v1.9.0

func (configuration *Configuration) IsTrafficRecordEnabled() bool

type Influx

type Influx struct {
	Enabled  bool     `yaml:"enabled"`
	Address  string   `yaml:"address"`
	Database string   `yaml:"database"`
	Username string   `yaml:"username"`
	Password string   `yaml:"password"`
	Replicas []string `yaml:"replicas"`
}

func (*Influx) GetAddress

func (influx *Influx) GetAddress() string

func (*Influx) GetDatabase

func (influx *Influx) GetDatabase() string

func (*Influx) GetPassword

func (influx *Influx) GetPassword() string

func (*Influx) GetReplicas

func (influx *Influx) GetReplicas() []string

func (*Influx) GetUsername

func (influx *Influx) GetUsername() string

func (*Influx) IsEnabled

func (influx *Influx) IsEnabled() bool

type MastodonApplication added in v1.17.8

type MastodonApplication struct {
	Name         string `yaml:"name"`
	Server       string `yaml:"server"`
	ClientID     string `yaml:"client_id"`
	ClientSecret string `yaml:"client_secret"`
	Token        string `yaml:"token"`
}

func (*MastodonApplication) GetClientID added in v1.17.8

func (mastodon *MastodonApplication) GetClientID() string

func (*MastodonApplication) GetClientSecret added in v1.17.8

func (mastodon *MastodonApplication) GetClientSecret() string

func (*MastodonApplication) GetName added in v1.17.8

func (mastodon *MastodonApplication) GetName() string

func (*MastodonApplication) GetServer added in v1.17.8

func (mastodon *MastodonApplication) GetServer() string

func (*MastodonApplication) GetToken added in v1.17.8

func (mastodon *MastodonApplication) GetToken() string

type Ports

type Ports struct {
	Active      int `yaml:"active"`
	Passive     int `yaml:"passive"`
	Diagnostics int `yaml:"diagnostics"`
}

func (*Ports) GetActive

func (ports *Ports) GetActive() int

func (*Ports) GetDiagnostics

func (ports *Ports) GetDiagnostics() int

func (*Ports) GetPassive

func (ports *Ports) GetPassive() int

type PostgreSQL added in v1.7.0

type PostgreSQL struct {
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	Database string `yaml:"database"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

func (*PostgreSQL) GetDatabase added in v1.7.0

func (postgres *PostgreSQL) GetDatabase() string

func (*PostgreSQL) GetHost added in v1.7.0

func (postgres *PostgreSQL) GetHost() string

func (*PostgreSQL) GetPassword added in v1.7.0

func (postgres *PostgreSQL) GetPassword() string

func (*PostgreSQL) GetPort added in v1.7.0

func (postgres *PostgreSQL) GetPort() string

func (*PostgreSQL) GetUsername added in v1.7.0

func (postgres *PostgreSQL) GetUsername() string

func (*PostgreSQL) SetDatabase added in v1.7.0

func (postgres *PostgreSQL) SetDatabase(database string)

func (*PostgreSQL) SetHost added in v1.7.0

func (postgres *PostgreSQL) SetHost(host string)

func (*PostgreSQL) SetPassword added in v1.7.0

func (postgres *PostgreSQL) SetPassword(password string)

func (*PostgreSQL) SetPort added in v1.7.0

func (postgres *PostgreSQL) SetPort(port string)

func (*PostgreSQL) SetUsername added in v1.7.0

func (postgres *PostgreSQL) SetUsername(username string)

type Server

type Server struct {
	FQDN               string `yaml:"fqdn"`
	Protocol           string `yaml:"protocol"`
	Ports              *Ports `yaml:"ports"`
	TLS                *TLS   `yaml:"tls"`
	BuildNumber        int32  `yaml:"build_number"`
	JwtTokenKey        string `yaml:"jwt_token_key"`
	JwtTokenExpiration string `yaml:"jwt_token_expiration"`
	HashKey            string `yaml:"hash_key"`
	BlockKey           string `yaml:"block_key"`
}

func (*Server) GetBlockKey

func (server *Server) GetBlockKey() string

func (*Server) GetBuildNumber

func (server *Server) GetBuildNumber() int32

func (*Server) GetFQDN

func (server *Server) GetFQDN() string

func (*Server) GetHashKey

func (server *Server) GetHashKey() string

func (*Server) GetJwtTokenExpiration added in v1.8.7

func (server *Server) GetJwtTokenExpiration() string

func (*Server) GetJwtTokenKey added in v1.8.7

func (server *Server) GetJwtTokenKey() string

func (*Server) GetPortConfiguration

func (server *Server) GetPortConfiguration() IPortConfiguration

func (*Server) GetProtocol

func (server *Server) GetProtocol() string

func (*Server) GetTLSConfiguration

func (server *Server) GetTLSConfiguration() ITLSConfiguration

func (*Server) SetBuildNumber

func (server *Server) SetBuildNumber(value int32)

type TLS

type TLS struct {
	KeyFile  string `yaml:"key_file"`
	CertFile string `yaml:"cert_file"`
}

func (*TLS) GetCertFile

func (tls *TLS) GetCertFile() string

func (*TLS) GetKeyFile

func (tls *TLS) GetKeyFile() string

func (*TLS) IsEnabled

func (tls *TLS) IsEnabled() bool

Jump to

Keyboard shortcuts

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