ubapp

package
v0.0.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UbaseApp added in v0.0.7

type UbaseApp struct {
	// contains filtered or unexported fields
}

func NewUbaseAppEnvConfig added in v0.0.7

func NewUbaseAppEnvConfig() UbaseApp

func (*UbaseApp) GetBackgroundMailer added in v0.0.11

func (app *UbaseApp) GetBackgroundMailer() *ubmailer.BackgroundMailer

func (*UbaseApp) GetConfig added in v0.0.7

func (app *UbaseApp) GetConfig() *UbaseConfig

func (*UbaseApp) GetDB added in v0.0.7

func (app *UbaseApp) GetDB() *sql.DB

func (*UbaseApp) GetDBAdapter added in v0.0.7

func (app *UbaseApp) GetDBAdapter() ubdata.DataAdapter

func (*UbaseApp) GetEncryptionService added in v0.0.7

func (app *UbaseApp) GetEncryptionService() ubsecurity.EncryptionService

func (*UbaseApp) GetEventStore added in v0.0.7

func (app *UbaseApp) GetEventStore() *evercore.EventStore

func (*UbaseApp) GetHashService added in v0.0.7

func (app *UbaseApp) GetHashService() ubsecurity.HashGenerator

func (*UbaseApp) GetMailer added in v0.0.11

func (app *UbaseApp) GetMailer() ubmailer.Mailer

func (*UbaseApp) GetManagementService added in v0.0.7

func (app *UbaseApp) GetManagementService() ubmanage.ManagementService

func (*UbaseApp) GetPrefectService added in v0.0.16

func (app *UbaseApp) GetPrefectService() ubmanage.PrefectService

func (*UbaseApp) GetTOTPService added in v0.0.7

func (app *UbaseApp) GetTOTPService() ub2fa.TotpService

func (*UbaseApp) MigrateUp added in v0.0.7

func (app *UbaseApp) MigrateUp() error

Runs the migrations for the ubase database.

func (*UbaseApp) Shutdown added in v0.0.7

func (app *UbaseApp) Shutdown()

type UbaseConfig added in v0.0.7

type UbaseConfig struct {
	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
	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.7

func UbaseConfigFromEnv() UbaseConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL