Documentation
¶
Index ¶
- func GetDatabaseCfg() *databaseCfg
- func GetJWTCfg() *jwtCfg
- func GetJWTEmailClaim(token *jwt.Token) string
- func GetJWTUserIDClaim(token *jwt.Token) int
- func GetJWTUsernameClaim(token *jwt.Token) string
- func GetMailSenderCfg() *mailSender
- func GetVault() string
- func NewDatabaseCfg(applicationProperties *ApplicationProperties) (*databaseCfg, error)
- func NewJWTCfg(applicationProperties *ApplicationProperties) (*jwtCfg, error)
- func NewMailSender(applicationProperties *ApplicationProperties) *mailSender
- type ApplicationProperties
- type Authentication
- type HTTPError
- type InfluxProperties
- type JWTAuth
- type MailSenderProperties
- type PostgreProperties
- type Security
- type Services
- type TLS
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDatabaseCfg ¶
func GetDatabaseCfg() *databaseCfg
func GetJWTEmailClaim ¶
func GetJWTUserIDClaim ¶
func GetJWTUsernameClaim ¶
func GetMailSenderCfg ¶
func GetMailSenderCfg() *mailSender
func NewDatabaseCfg ¶
func NewDatabaseCfg(applicationProperties *ApplicationProperties) (*databaseCfg, error)
func NewJWTCfg ¶
func NewJWTCfg(applicationProperties *ApplicationProperties) (*jwtCfg, error)
func NewMailSender ¶
func NewMailSender(applicationProperties *ApplicationProperties) *mailSender
Types ¶
type ApplicationProperties ¶
type ApplicationProperties struct {
Services Services `yaml:"services,omitempty"`
Security Security `yaml:"security,omitempty"`
VaultType string `yaml:"vaultType,omitempty"`
User User `yaml:"user,omitempty"`
}
func LoadApplicationProperties ¶
func LoadApplicationProperties(propsFile string) (*ApplicationProperties, error)
type Authentication ¶
type Authentication struct {
JWT JWTAuth `yaml:"JWT,omitempty"`
}
type HTTPError ¶
type HTTPError struct {
// contains filtered or unexported fields
}
HTTPError represents a HTTP response error
func ParseToken ¶
ParseToken parses the token provided in the request header
func (HTTPError) StatusCode ¶
type InfluxProperties ¶
type MailSenderProperties ¶
type PostgreProperties ¶
type Security ¶
type Security struct {
TLS TLS `yaml:"tls,omitempty"`
Authentication Authentication `yaml:"authentication,omitempty"`
}
type Services ¶
type Services struct {
InfluxProps InfluxProperties `yaml:"influxdb,omitempty"`
PostgreProps PostgreProperties `yaml:"postgresdb,omitempty"`
MailSender MailSenderProperties `yaml:"mailsender,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.