Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Dbmap *gorp.DbMap
Dbmap contains database mapping required to use gorp.
View Source
var JwtKey []byte
JwtKey contains the key used for signing and verifying a JWT using HMAC SHA-256.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { ServerHost string // The hostname on which the HTTP server will run, e.g. 'localhost'. ServerPort int // The port on which the HTTP server will run, e.g. '8080'. Key string // The relative path of the base64-encoded key used for signing JWT. Recommended size of key: 256 bits. AllowedOrigins string // The origin on which requests should be allowed from. Database MySQLConfiguration }
Configuration stores the main configuration for the application.
var Config Configuration
Config contains the current configuration settings.
type MySQLConfiguration ¶
type MySQLConfiguration struct { Username string // The username of the MySQL user. Password string // The password of the MySQL user. DatabaseName string // The MySQL database to use. Protocol string // The protocol to use to connect to the MySQL server, either 'tcp' or 'udp'. Host string // The host to use to connect to the MySQL server, e.g. 'localhost'. Port string // The port to use to connect to the MySQL server, e.g. '3306'. Charset string // The charset to use for connection string, e.g. 'utf8mb4,utf8'. Engine string // The database engine of the MySQL server, e.g. 'InnoDB'. Encoding string // The encoding used on the MySQL server, e.g. 'UTF8'. }
MySQLConfiguration stores the specific MySQL configuration for this application.
Click to show internal directories.
Click to hide internal directories.