Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aptly ¶ added in v0.13.0
type Aptly struct { APIURL *url.URL `toml:"api_url"` RepositoryBaseURL *url.URL `toml:"repository_base_url"` }
Aptly holds configuration related to aptly
type AuthConfig ¶
type AuthConfig struct { AuthentificationBackend string `toml:"backend"` OAuth *OAuthConfig `toml:"oauth"` }
AuthConfig holds configuration related to the authentification backend
type Config ¶
type Config struct { DB *DBConfig `toml:"database"` HTTP *HTTPServerConfig `toml:"http"` Auth *AuthConfig `toml:"authentication"` ServerURL *url.URL `toml:"server_url"` Aptly *Aptly `toml:"aptly"` DataDirectory string `toml:"data_directory"` TemplatesDirectory string `toml:"templates_directory"` StaticFilesDirectory string `toml:"static_files_directory"` TemplatesCacheEnabled bool `toml:"templates_cache_enabled"` LogLevel log.Level `toml:"log_level"` }
Config holds configuration that is needed by Server to initialize all of its dependencies.
func ParseConfig ¶
func ParseConfig(filepath string, fs filesystem.FS) (*Config, error)
ParseConfig parses a configuration file to create a server config
type DBConfig ¶
type DBConfig struct { Driver string `toml:"driver"` ConnectionString string `toml:"connection_string"` }
DBConfig holds configuration related to the database
type HTTPServerConfig ¶
type HTTPServerConfig struct {
Address string `toml:"address"`
}
HTTPServerConfig holds configuration related to the HTTP server
Click to show internal directories.
Click to hide internal directories.