Documentation ¶
Index ¶
Constants ¶
const ( DATABASE_TYPE_DEFAULT = "memory" HTTP_PORT_DEFAULT = 8080 // Port 8080 )
Variables ¶
var Authent bool = false
If authent == true => then we turn authentication on
var Password string = ""
var Username string = ""
Functions ¶
func GenerateRandomBytes ¶
GenerateRandomBytes returns securely generated random bytes. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func GenerateRandomString ¶
GenerateRandomString returns a URL-safe, base64 encoded securely generated random string. It will return an error if the system's secure random number generator fails to function correctly, in which case the caller should not continue.
func InitServer ¶
The config should contain following keys: runners.queuesize: Max number of jobs in the queue (default 10) runners.nbrunners: Max number of parallel running jobs (default 1) runners.timeout for each running job in Seconds (default 0=unlimited) runners.jobthreads : Number of cpus per bootstrap runner database.type: mysql or memory (default memory) database.user: user to connect to mysql if type is mysql database.host: host to connect to mysql if type is mysql database.port: port to connect to mysql if type is mysql database.pass: pass to connect to mysql if type is mysql database.dbname: name of db to connect to mysql if type is mysql logging.logfile : path to log file: stdout, stderr or any file name (default stderr)
Types ¶
type AuthResponse ¶
type Claims ¶
type Claims struct { Username string `json:"username"` // recommended having jwt.StandardClaims }
type GenericResponse ¶
type GlobalInformation ¶ added in v0.1.4
Global informations about server given to different templates
type MarkDownPage ¶
type MarkDownPage struct {
Md string
}