core

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

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) Bootstrap

func (app *BaseApp) Bootstrap() error

func (*BaseApp) DBSessionFromContext

func (b *BaseApp) DBSessionFromContext(ctx context.Context) *gorm.DB

func (*BaseApp) Dao

func (b *BaseApp) Dao() *daos.Dao

func (*BaseApp) DataDir

func (b *BaseApp) DataDir() string

func (*BaseApp) EventClient

func (b *BaseApp) EventClient() eventclient.Client

func (*BaseApp) GetFileURL

func (b *BaseApp) GetFileURL(key string) string

func (*BaseApp) IsACLEnforced

func (b *BaseApp) IsACLEnforced() bool

func (*BaseApp) IsDev

func (app *BaseApp) IsDev() bool

func (*BaseApp) MigrationsDir

func (b *BaseApp) MigrationsDir() string

func (*BaseApp) NewFileSystem

func (b *BaseApp) NewFileSystem() (*filesystem.System, error)

func (*BaseApp) OnTerminate

func (b *BaseApp) OnTerminate(handler TerminateHandler)

func (*BaseApp) Otp

func (b *BaseApp) Otp() *security.Otp

func (*BaseApp) RegisterEventClient

func (b *BaseApp) RegisterEventClient(client eventclient.Client)

func (*BaseApp) Router

func (b *BaseApp) Router() *gin.Engine

func (*BaseApp) Scheduler

func (b *BaseApp) Scheduler() scheduler.Client

func (*BaseApp) SchemaName

func (b *BaseApp) SchemaName(tenantId string) string

func (*BaseApp) Settings

func (b *BaseApp) Settings() *models.Settings

func (*BaseApp) Terminate

func (b *BaseApp) Terminate() error

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

Jump to

Keyboard shortcuts

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