server

package
v2.1.5-0...-e9731fd Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Latitude  = "lat"
	Longitude = "lon"
)

constant valuses for lat / lon

Variables

This section is empty.

Functions

func Defaults

func Defaults()

Defaults configure defaults

func Start

func Start(config ConfigSchema) (err error)

Start starts the web server

func Teardown

func Teardown() (err error)

Teardown gracefully release resources

func Validate

func Validate(_ *ConfigSchema) (err []error)

Validate a configuration

Types

type ConfigSchema

type ConfigSchema struct {
	Tz             TzSchema  `mapstructure:"tz"`
	Web            WebSchema `mapstructure:"web"`
	RuntimeVersion string    `mapstructure:"-"`
}

ConfigSchema main configuration for the news room

var Settings ConfigSchema

Settings general settings

type TzSchema

type TzSchema struct {
	DatabaseName       string `mapstructure:"database_name"`
	Snappy             bool   `mapstructure:"snappy"`
	DownloadTzData     bool   `mapstructure:"download_tz_data"`
	DownloadTzDataURL  string `mapstructure:"download_tz_data_url"`
	DownloadTzFilename string `mapstructure:"download_tz_filename"`
}

TzSchema configuration

type WebSchema

type WebSchema struct {
	ListenAddress      string `mapstructure:"listen_address,omitempty"`
	AuthTokenValue     string `mapstructure:"auth_token_value,omitempty"`
	AuthTokenParamName string `mapstructure:"auth_token_param_name,omitempty"`
}

WebSchema configuration

Jump to

Keyboard shortcuts

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