Documentation
¶
Index ¶
- Constants
- type App
- type BaseApp
- func (b *BaseApp) Acm() *auth.AccessControlManager
- func (app *BaseApp) Bootstrap() error
- func (b *BaseApp) DBSessionFromContext(ctx context.Context) *gorm.DB
- func (b *BaseApp) Dao() *daos.Dao
- func (b *BaseApp) DataDir() string
- func (b *BaseApp) EventClient() eventclient.Client
- func (b *BaseApp) GetFileURL(key string) string
- func (b *BaseApp) IsACLEnforced() bool
- func (app *BaseApp) IsDev() bool
- func (b *BaseApp) MigrationsDir() string
- func (b *BaseApp) NewFileSystem() (*filesystem.System, error)
- func (b *BaseApp) OnTerminate(handler TerminateHandler)
- func (b *BaseApp) Otp() *security.Otp
- func (b *BaseApp) RegisterEventClient(client eventclient.Client)
- func (b *BaseApp) Router() *gin.Engine
- func (b *BaseApp) Scheduler() scheduler.Client
- func (b *BaseApp) SchemaName(tenantId string) string
- func (b *BaseApp) Settings() *models.Settings
- func (b *BaseApp) Terminate() error
- func (b *BaseApp) Validator() *validation.Validator
- type BaseAppConfig
- type TerminateHandler
Constants ¶
View Source
const LocalStorageDirName string = "storage"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App interface {
IsDev() bool
IsACLEnforced() bool
Bootstrap() error
OnTerminate(TerminateHandler)
DataDir() string
MigrationsDir() string
Terminate() error
Acm() *auth.AccessControlManager
Dao() *daos.Dao
Settings() *models.Settings
Validator() *validation.Validator
Router() *gin.Engine
Otp() *security.Otp
NewFileSystem() (*filesystem.System, error)
GetFileURL(key string) string
EventClient() eventclient.Client
Scheduler() scheduler.Client
SchemaName(tenantId string) string
DBSessionFromContext(ctx context.Context) *gorm.DB
RegisterEventClient(eventClinet eventclient.Client)
}
type BaseApp ¶
type BaseApp struct {
Env string
// contains filtered or unexported fields
}
func NewBaseApp ¶
func NewBaseApp(config BaseAppConfig) *BaseApp
func (*BaseApp) Acm ¶
func (b *BaseApp) Acm() *auth.AccessControlManager
func (*BaseApp) DBSessionFromContext ¶
func (*BaseApp) EventClient ¶
func (b *BaseApp) EventClient() eventclient.Client
func (*BaseApp) GetFileURL ¶
func (*BaseApp) IsACLEnforced ¶
func (*BaseApp) MigrationsDir ¶
func (*BaseApp) NewFileSystem ¶
func (b *BaseApp) NewFileSystem() (*filesystem.System, error)
func (*BaseApp) OnTerminate ¶
func (b *BaseApp) OnTerminate(handler TerminateHandler)
func (*BaseApp) RegisterEventClient ¶
func (b *BaseApp) RegisterEventClient(client eventclient.Client)
func (*BaseApp) SchemaName ¶
func (*BaseApp) Validator ¶
func (b *BaseApp) Validator() *validation.Validator
type BaseAppConfig ¶
type BaseAppConfig struct {
Env string
IsDev bool
EnforceAcl bool
DataDir string
MigrationsDir string
DatabaseConfig config.DatabaseConfig
TenantConfig config.TenantConfig
}
type TerminateHandler ¶
type TerminateHandler func() error
Click to show internal directories.
Click to hide internal directories.