Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrServerModeIsNotSet = "server mode is not set" ErrServerMode = "server mode error" ErrCertFileIsNotSet = "certificate file is not set" ErrKeyFileIsNotSet = "key file is not set" ErrFileExtensionIsNotSet = "file extension is not set" ErrMimeTypeIsNotSet = "MIME type is not set" ErrDbClientPoolSize = "DB client pool size is not set" ErrHttpCacheControlMaxAge = "HTTP cache control max-age error" )
View Source
const ( ContentDispositionInline = "inline" ServerModeHttp = "HTTP" ServerModeIdHttp = 1 ServerModeHttps = "HTTPS" ServerModeIdHttps = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Settings ¶
type Settings struct { // Path to the File with these Settings. File string // Server's Host Name. ServerHost string // Server's Listen Port. ServerPort uint16 // ServerMode is an HTTP mode selector. // Possible values are: HTTP and HTTPS. ServerModeStr string ServerModeId byte // Server's Certificate and Key. CertFile string KeyFile string // Database Host Name. DbHost string // Database Ports. DbPortA uint16 DbPortB uint16 // DbClientPoolSize is the size of a pool of DB clients. DbClientPoolSize int // File Extension & MIME Type. // Extension which is appended to all files served. FileExtension string MimeType string // HttpCacheControlMaxAge is time in seconds for which this server's // response is fresh (valid). After this period clients will be refreshing // the stale content by re-requesting it from the server. HttpCacheControlMaxAge uint // Allowed Origin for cross-origin requests (CORS). AllowedOriginForCORS string }
Settings is Server's settings.
func NewSettingsFromFile ¶
Click to show internal directories.
Click to hide internal directories.