config

package
v2.26.4 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EndpointAdministration is the endpoint path of the web interface administration panel.
	EndpointAdministration = "/admin"
	// EndpointAccount is the endpoint path of the web interface account panel.
	EndpointAccount = "/account"

	// EndpointList is the endpoint path for listing all stored accounts.
	EndpointList = "/list"
	// EndpointFind is the endpoint path for finding accounts.
	EndpointFind = "/find"

	// EndpointCreate is the endpoint path for account creation.
	EndpointCreate = "/create"
	// EndpointUpdate is the endpoint path for account updates.
	EndpointUpdate = "/update"
	// EndpointConfigure is the endpoint path for account configuration.
	EndpointConfigure = "/configure"
	// EndpointRemove is the endpoint path for account removal.
	EndpointRemove = "/remove"

	// EndpointSiteGet is the endpoint path for retrieving site data.
	EndpointSiteGet = "/site-get"
	// EndpointSiteConfigure is the endpoint path for site configuration.
	EndpointSiteConfigure = "/site-configure"

	// EndpointLogin is the endpoint path for (internal) user login.
	EndpointLogin = "/login"
	// EndpointLogout is the endpoint path for (internal) user logout.
	EndpointLogout = "/logout"
	// EndpointResetPassword is the endpoint path for resetting user passwords
	EndpointResetPassword = "/reset-password"
	// EndpointContact is the endpoint path for sending contact emails
	EndpointContact = "/contact"

	// EndpointVerifyUserToken is the endpoint path for user token validation.
	EndpointVerifyUserToken = "/verify-user-token"

	// EndpointGrantSiteAccess is the endpoint path for granting or revoking Site access.
	EndpointGrantSiteAccess = "/grant-site-access"
	// EndpointGrantGOCDBAccess is the endpoint path for granting or revoking GOCDB access.
	EndpointGrantGOCDBAccess = "/grant-gocdb-access"

	// EndpointDispatchAlert is the endpoint path for dispatching alerts from Prometheus.
	EndpointDispatchAlert = "/dispatch-alert"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Prefix string `mapstructure:"prefix"`

	Security struct {
		CredentialsPassphrase string `mapstructure:"creds_passphrase"`
	} `mapstructure:"security"`

	Storage struct {
		Driver string `mapstructure:"driver"`

		File struct {
			SitesFile    string `mapstructure:"sites_file"`
			AccountsFile string `mapstructure:"accounts_file"`
		} `mapstructure:"file"`
	} `mapstructure:"storage"`

	Email struct {
		SMTP              *smtpclient.SMTPCredentials `mapstructure:"smtp"`
		NotificationsMail string                      `mapstructure:"notifications_mail"`
	} `mapstructure:"email"`

	Mentix struct {
		URL                      string `mapstructure:"url"`
		DataEndpoint             string `mapstructure:"data_endpoint"`
		SiteRegistrationEndpoint string `mapstructure:"sitereg_endpoint"`
	} `mapstructure:"mentix"`

	Webserver struct {
		URL string `mapstructure:"url"`

		SessionTimeout      int  `mapstructure:"session_timeout"`
		VerifyRemoteAddress bool `mapstructure:"verify_remote_address"`
		LogSessions         bool `mapstructure:"log_sessions"`
	} `mapstructure:"webserver"`

	GOCDB struct {
		URL      string `mapstructure:"url"`
		WriteURL string `mapstructure:"write_url"`

		APIKey string `mapstructure:"apikey"`
	} `mapstructure:"gocdb"`
}

Configuration holds the general service configuration.

func (*Configuration) Cleanup

func (cfg *Configuration) Cleanup()

Cleanup cleans up certain settings, normalizing them.

Jump to

Keyboard shortcuts

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