Documentation
¶
Overview ¶
internal/app/seed.go
Index ¶
- func BuildPostgresDSN(sec *vault.UserPassSecret) string
- func S3Connection(sec *vault.UserPassSecret) *s3.Client
- func S3InternalConnection(sec *vault.UserPassSecret) *s3.Client
- type App
- func (app *App) ConfigureAuth()
- func (app *App) ConfigureRouter()
- func (app *App) ConnectDatabaseFromVault() error
- func (app *App) ConnectDatabaseWithSecret(secret *vault.UserPassSecret) error
- func (app *App) ConnectS3()
- func (a App) GetDB() *gorm.DB
- func (app *App) RegisterApi(group string)
- func (app *App) Run()
- func (app *App) Seed()
- func (app *App) StartDBRotation()
- func (a *App) String() string
- func (a *App) SwapDB(db *gorm.DB) *gorm.DB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPostgresDSN ¶
func BuildPostgresDSN(sec *vault.UserPassSecret) string
func S3Connection ¶
func S3Connection(sec *vault.UserPassSecret) *s3.Client
func S3InternalConnection ¶
func S3InternalConnection(sec *vault.UserPassSecret) *s3.Client
Types ¶
type App ¶
type App struct {
// Gin Router
Port string
Router *gin.Engine
// Connections
Database atomic.Value // holds *gorm.DB
S3Internal *s3.Client
S3 *s3.Client
Vault *vault.Manager
// Authenticators
FtAuth oauth2.Authenticator
JwtAccessAuth jwt.Authenticator
JwtRefreshAuth jwt.Authenticator
EmailTokenAuth jwt.Authenticator
PasswordResetAuth jwt.Authenticator
PasswordAuth password.Authenticator
// Issuers
JwtAccessIssuer jwt.Issuer
JwtRefreshIssuer jwt.Issuer
JwtRefreshRemover jwt.Issuer
}
TODO (pipo) : multi-router app
func (*App) ConfigureAuth ¶
func (app *App) ConfigureAuth()
func (*App) ConfigureRouter ¶
func (app *App) ConfigureRouter()
func (*App) ConnectDatabaseFromVault ¶
2. Update your original wrapper to use the new helper
func (*App) ConnectDatabaseWithSecret ¶
func (app *App) ConnectDatabaseWithSecret(secret *vault.UserPassSecret) error
func (*App) RegisterApi ¶
func (*App) StartDBRotation ¶
func (app *App) StartDBRotation()
Click to show internal directories.
Click to hide internal directories.