config

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Environment file for getting variables Currently the only thing it does is set the master password Should probably have it take over functions from OS such as port and mongodb connection details Reads from the config/environments/dev.yaml file by default

Index

Constants

This section is empty.

Variables

View Source
var SetupErr error

Functions

This section is empty.

Types

type EnvironmentConfig

type EnvironmentConfig struct {
	Server ServerConfig `yaml:"server"`
	SQL    SQLConfig    `yaml:"sql"`
}

EnvironmentConfig - environment conf struct

Config : application config stored as global variable

func ReadConfig

func ReadConfig(absolutePath string) (*EnvironmentConfig, error)

reading in the env file

type SQLConfig

type SQLConfig struct {
	Host     string `yaml:"host"`
	Port     int32  `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	DB       string `yaml:"db"`
	SSLMode  string `yaml:"sslmode"`
}

SQLConfig - Generic SQL Config

type ServerConfig

type ServerConfig struct {
	CoreDNSAddr                string        `yaml:"corednsaddr"`
	APIConnString              string        `yaml:"apiconn"`
	APIHost                    string        `yaml:"apihost"`
	APIPort                    string        `yaml:"apiport"`
	Broker                     string        `yam:"broker"`
	ServerBrokerEndpoint       string        `yaml:"serverbrokerendpoint"`
	BrokerType                 string        `yaml:"brokertype"`
	EmqxRestEndpoint           string        `yaml:"emqxrestendpoint"`
	NetclientAutoUpdate        string        `yaml:"netclientautoupdate"`
	NetclientEndpointDetection string        `yaml:"netclientendpointdetection"`
	MasterKey                  string        `yaml:"masterkey"`
	DNSKey                     string        `yaml:"dnskey"`
	AllowedOrigin              string        `yaml:"allowedorigin"`
	NodeID                     string        `yaml:"nodeid"`
	RestBackend                string        `yaml:"restbackend"`
	MessageQueueBackend        string        `yaml:"messagequeuebackend"`
	DNSMode                    string        `yaml:"dnsmode"`
	DisableRemoteIPCheck       string        `yaml:"disableremoteipcheck"`
	Version                    string        `yaml:"version"`
	SQLConn                    string        `yaml:"sqlconn"`
	Platform                   string        `yaml:"platform"`
	Database                   string        `yaml:"database"`
	Verbosity                  int32         `yaml:"verbosity"`
	AuthProvider               string        `yaml:"authprovider"`
	OIDCIssuer                 string        `yaml:"oidcissuer"`
	ClientID                   string        `yaml:"clientid"`
	ClientSecret               string        `yaml:"clientsecret"`
	FrontendURL                string        `yaml:"frontendurl"`
	DisplayKeys                string        `yaml:"displaykeys"`
	AzureTenant                string        `yaml:"azuretenant"`
	Telemetry                  string        `yaml:"telemetry"`
	HostNetwork                string        `yaml:"hostnetwork"`
	Server                     string        `yaml:"server"`
	PublicIPService            string        `yaml:"publicipservice"`
	MQPassword                 string        `yaml:"mqpassword"`
	MQUserName                 string        `yaml:"mqusername"`
	MetricsExporter            string        `yaml:"metrics_exporter"`
	BasicAuth                  string        `yaml:"basic_auth"`
	LicenseValue               string        `yaml:"license_value"`
	NetmakerTenantID           string        `yaml:"netmaker_tenant_id"`
	IsPro                      string        `yaml:"is_ee" json:"IsEE"`
	StunPort                   int           `yaml:"stun_port"`
	StunList                   string        `yaml:"stun_list"`
	TurnServer                 string        `yaml:"turn_server"`
	TurnApiServer              string        `yaml:"turn_api_server"`
	TurnPort                   int           `yaml:"turn_port"`
	TurnUserName               string        `yaml:"turn_username"`
	TurnPassword               string        `yaml:"turn_password"`
	UseTurn                    bool          `yaml:"use_turn"`
	UsersLimit                 int           `yaml:"user_limit"`
	NetworksLimit              int           `yaml:"network_limit"`
	MachinesLimit              int           `yaml:"machines_limit"`
	IngressesLimit             int           `yaml:"ingresses_limit"`
	EgressesLimit              int           `yaml:"egresses_limit"`
	DeployedByOperator         bool          `yaml:"deployed_by_operator"`
	Environment                string        `yaml:"environment"`
	JwtValidityDuration        time.Duration `yaml:"jwt_validity_duration" swaggertype:"primitive,integer" format:"int64"`
	RacAutoDisable             bool          `yaml:"rac_auto_disable"`
	CacheEnabled               string        `yaml:"caching_enabled"`
	EndpointDetection          bool          `json:"endpoint_detection"`
	AllowedEmailDomains        string        `yaml:"allowed_email_domains"`
	EmailSenderAddr            string        `json:"email_sender_addr"`
	EmailSenderUser            string        `json:"email_sender_user"`
	EmailSenderPassword        string        `json:"email_sender_password"`
	SmtpHost                   string        `json:"smtp_host"`
	SmtpPort                   int           `json:"smtp_port"`
	MetricInterval             string        `yaml:"metric_interval"`
	ManageDNS                  bool          `yaml:"manage_dns"`
	Stun                       bool          `yaml:"stun"`
	StunServers                string        `yaml:"stun_servers"`
	DefaultDomain              string        `yaml:"default_domain"`
	PublicIp                   string        `yaml:"public_ip"`
}

ServerConfig - server conf struct

Jump to

Keyboard shortcuts

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