config

package
v0.0.0-...-f03aceb Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ServerName = "api_scanner"

ServerName is the server type that is returned in the transparency response.

Variables

View Source
var Version = "1"

Version contains the current project version

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerConf             ServerConfig   `json:"server"`
	DBMSType               string         `json:"dbms_type"`
	DatabaseURI            string         `json:"database_uri"`
	DBSSLCaPath            string         `json:"db_sslca_path"`
	MigrationsPath         string         `json:"migrations_prefix"`
	TestFlag               bool           `json:"test_flag"`
	ContactAddress         string         `json:"contact_address"`
	Logging                *logger.Config `json:"logging"`
	ProductTitle           string         `json:"product_title"`
	CopyrightFooterCompany string         `json:"copyright_footer_company"`
	WorkDir                string         `json:"work_dir"`
	TempUploadsDir         string         `json:"temp_uploads_dir"`
}

Config represents the configuration information.

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig loads the configuration from the specified filepath

type DatabaseConfig

type DatabaseConfig struct {
	Host   string `json:"host"`
	User   string `json:"user"`
	Pass   string `json:"password"`
	DBName string `json:"db_name"`
}

type ServerConfig

type ServerConfig struct {
	ServerAddress        string   `json:"server_address"`
	CSRFKey              string   `json:"csrf_key"`
	UseTLS               bool     `json:"use_tls"`
	AllowedInternalHosts []string `json:"allowed_internal_hosts"`
	TrustedOrigins       []string `json:"trusted_origins"`
	CertPath             string   `json:"cert_path"`
	KeyPath              string   `json:"key_path"`
	CSRFName             string   `json:"csrf_name"`
}

Server represents the Server configuration details

Jump to

Keyboard shortcuts

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