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 ¶ added in v1.1.0
func (j *JWT) GetPrivateKey() (privateKey *rsa.PrivateKey, err error)
GetPrivateKey gets the encryption key from a given path
Click to show internal directories.
Click to hide internal directories.