Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authorization ¶
type Authorization struct { // HeaderName is the name of the header where the authorization middleware is supposed // to be looking for a JWT token HeaderName string `json:"headerName"` }
Authorization contains all the authorization-related parameters
type Database ¶
type Database struct { // Host of the database server Host string `json:"host"` // Port of the database server, if empty, we will attempt to parse the port from the host value, // if Host does not have a port value, then we will use the default value from the db driver Port uint32 `json:"port"` // Name is the name of the database on the host Name string `json:"name"` // Username to access the database Username string `json:"username"` // PasswordPath is a path to the file where the password is stored PasswordPath string `json:"passwordPath"` // PoolSize is the max number of concurrent connections to the database, // <=0 is unlimited PoolSize int `json:"poolSize"` // DriverName is the database driver name e.g. postgres DriverName string `json:"driverName"` }
Database contains all the configuration parameters for a database
func (*Database) GetConnectionString ¶
GetConnectionString returns the formed connection string
func (*Database) GetPassword ¶
GetPassword gets the database password from PasswordPath
type HTTP ¶
type HTTP struct { // Address to listen for the HTTP server Address string `json:"address"` }
HTTP contains all configuration parameters for HTTP
type JWT ¶
type JWT struct { // PublicKeyPath is a path to the public key for JWT signature verification PublicKeyPath string `json:"publicKeyPath"` // PrivateKeyPath is a path to the private key for signing JWT PrivateKeyPath string `json:"privateKeyPath"` }
JWT contains all JWT related parameters
func (*JWT) GetPrivateKey ¶
func (j *JWT) GetPrivateKey() (privateKey *rsa.PrivateKey, err error)
GetPrivateKey gets the encryption key from a given path
type Queue ¶ added in v2.0.1
type Queue struct { // HeartbeatTTL is the max time a worker is expected to call queue.Heartbeat when processing a task HeartbeatTTL time.Duration `json:"heartbeatTTL"` // PollFrequency is the polling frequency when the queue will check for a new task for a waiting worker PollFrequency time.Duration `json:"pollFrequency"` // JobSchedulingInterval is the interval between iterations of the worker (e.g. job scheduling) SchedulingInterval time.Duration `json:"schedulingInterval"` // Minimal time between two listener reconnects MinReconnectTimeout time.Duration `json:"minReconnectTimeout"` // Maximal time between two listener reconnects MaxReconnectTimeout time.Duration `json:"maxReconnectTimeout"` }
Queue contains configuation for task queueing
Click to show internal directories.
Click to hide internal directories.