Documentation
¶
Index ¶
- type BackgroundService
- type UbaseApp
- func (app *UbaseApp) GetAdminLinkService() contracts.AdminLinkService
- func (app *UbaseApp) GetAdminRenderer() contracts.AdminRenderer
- func (app *UbaseApp) GetBackgroundMailer() *ubmailer.BackgroundMailer
- func (app *UbaseApp) GetConfig() *UbaseConfig
- func (app *UbaseApp) GetCookieManager() contracts.AuthTokenCookieManager
- func (app *UbaseApp) GetDB() *sql.DB
- func (app *UbaseApp) GetDBAdapter() ubdata.DataAdapter
- func (app *UbaseApp) GetEncryptionService() ubsecurity.EncryptionService
- func (app *UbaseApp) GetEventStore() *evercore.EventStore
- func (app *UbaseApp) GetHashService() ubsecurity.HashGenerator
- func (app *UbaseApp) GetMailer() ubmailer.Mailer
- func (app *UbaseApp) GetManagementService() ubmanage.ManagementService
- func (app *UbaseApp) GetPermissionsMiddleware() *ubwww.PermissionMiddleware
- func (app *UbaseApp) GetPrefectService() ubmanage.PrefectService
- func (app *UbaseApp) GetTOTPService() ub2fa.TotpService
- func (app *UbaseApp) GetWebService() ubwww.WebService
- func (app *UbaseApp) MigrateUp() error
- func (app *UbaseApp) RegisterService(service BackgroundService)
- func (app *UbaseApp) Shutdown()
- func (app *UbaseApp) StartServices() error
- func (app *UbaseApp) StopServices() error
- func (app *UbaseApp) WithAdminPanel(permissions []string)
- type UbaseConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackgroundService ¶ added in v0.0.28
type UbaseApp ¶ added in v0.0.6
type UbaseApp struct {
// contains filtered or unexported fields
}
func NewUbaseAppEnvConfig ¶ added in v0.0.6
func NewUbaseAppEnvConfig() UbaseApp
func (*UbaseApp) GetAdminLinkService ¶ added in v0.0.28
func (app *UbaseApp) GetAdminLinkService() contracts.AdminLinkService
func (*UbaseApp) GetAdminRenderer ¶ added in v0.0.28
func (app *UbaseApp) GetAdminRenderer() contracts.AdminRenderer
func (*UbaseApp) GetBackgroundMailer ¶ added in v0.0.11
func (app *UbaseApp) GetBackgroundMailer() *ubmailer.BackgroundMailer
func (*UbaseApp) GetConfig ¶ added in v0.0.6
func (app *UbaseApp) GetConfig() *UbaseConfig
func (*UbaseApp) GetCookieManager ¶ added in v0.0.28
func (app *UbaseApp) GetCookieManager() contracts.AuthTokenCookieManager
func (*UbaseApp) GetDBAdapter ¶ added in v0.0.7
func (app *UbaseApp) GetDBAdapter() ubdata.DataAdapter
func (*UbaseApp) GetEncryptionService ¶ added in v0.0.6
func (app *UbaseApp) GetEncryptionService() ubsecurity.EncryptionService
func (*UbaseApp) GetEventStore ¶ added in v0.0.6
func (app *UbaseApp) GetEventStore() *evercore.EventStore
func (*UbaseApp) GetHashService ¶ added in v0.0.6
func (app *UbaseApp) GetHashService() ubsecurity.HashGenerator
func (*UbaseApp) GetManagementService ¶ added in v0.0.6
func (app *UbaseApp) GetManagementService() ubmanage.ManagementService
func (*UbaseApp) GetPermissionsMiddleware ¶ added in v0.0.28
func (app *UbaseApp) GetPermissionsMiddleware() *ubwww.PermissionMiddleware
func (*UbaseApp) GetPrefectService ¶ added in v0.0.16
func (app *UbaseApp) GetPrefectService() ubmanage.PrefectService
func (*UbaseApp) GetTOTPService ¶ added in v0.0.6
func (app *UbaseApp) GetTOTPService() ub2fa.TotpService
func (*UbaseApp) GetWebService ¶ added in v0.0.28
func (app *UbaseApp) GetWebService() ubwww.WebService
func (*UbaseApp) RegisterService ¶ added in v0.0.28
func (app *UbaseApp) RegisterService(service BackgroundService)
func (*UbaseApp) StartServices ¶ added in v0.0.28
func (*UbaseApp) StopServices ¶ added in v0.0.28
func (*UbaseApp) WithAdminPanel ¶ added in v0.0.28
type UbaseConfig ¶ added in v0.0.6
type UbaseConfig struct {
WebPort uint `env:"WEB_PORT" default:"8080"`
DatabaseConnection string `env:"DATABASE_CONNECTION" default:"/var/data/main.db"`
EventStoreConnection string `env:"EVENT_STORE_CONNECTION" default:"/var/data/main.db"`
Pepper []byte `env:"PEPPER" required:"true"`
SecretKey []byte `env:"SECRET_KEY" required:"true"`
Environment string `env:"ENVIRONMENT" default:"production"`
TokenMaxSoftExpirySeconds int `env:"TOKEN_SOFT_EXPIRY_SECONDS" default:"3600"` // 1 hour
TokenMaxHardExpirySeconds int `env:"TOKEN_HARD_EXPIRY_SECONDS" default:"86400"` // 24 hours
PrimaryOrganization int64 `env:"PRIMARY_ORGANIZATION" required:"true"`
TOTPIssuer string `env:"TOTP_ISSUER" required:"true"`
// Mailer
MailerType string `env:"MAILER_TYPE" default:"none"`
MailerFrom string `env:"MAILER_FROM"`
MailerUsername string `env:"MAILER_USERNAME"`
MailerPassword string `env:"MAILER_PASSWORD"`
MailerHost string `env:"MAILER_HOST"`
MailerOutputDir string `env:"MAILER_OUTPUT_DIR"`
}
func UbaseConfigFromEnv ¶ added in v0.0.6
func UbaseConfigFromEnv() UbaseConfig
Click to show internal directories.
Click to hide internal directories.