Documentation ¶
Index ¶
- func CollectMigrations(app *ApplicationImpl) ([]*migrate.Migration, error)
- type Application
- type ApplicationImpl
- func (app *ApplicationImpl) Assets() []*embed.FS
- func (app *ApplicationImpl) Bundle() (*i18n.Bundle, error)
- func (app *ApplicationImpl) Controllers() []Controller
- func (app *ApplicationImpl) DB() *gorm.DB
- func (app *ApplicationImpl) EventPublisher() event.Publisher
- func (app *ApplicationImpl) HashFsAssets() []*hashfs.FS
- func (app *ApplicationImpl) LocaleFiles() []*embed.FS
- func (app *ApplicationImpl) Middleware() []mux.MiddlewareFunc
- func (app *ApplicationImpl) MigrationDirs() []*embed.FS
- func (app *ApplicationImpl) Modules() []Module
- func (app *ApplicationImpl) NavigationItems(l *i18n.Localizer) []types.NavigationItem
- func (app *ApplicationImpl) Permissions() []permission.Permission
- func (app *ApplicationImpl) RegisterAssets(fs ...*embed.FS)
- func (app *ApplicationImpl) RegisterControllers(controllers ...Controller)
- func (app *ApplicationImpl) RegisterHashFsAssets(fs ...*hashfs.FS)
- func (app *ApplicationImpl) RegisterLocaleFiles(fs ...*embed.FS)
- func (app *ApplicationImpl) RegisterMiddleware(middleware ...mux.MiddlewareFunc)
- func (app *ApplicationImpl) RegisterMigrationDirs(fs ...*embed.FS)
- func (app *ApplicationImpl) RegisterModule(module Module)
- func (app *ApplicationImpl) RegisterPermissions(permissions ...permission.Permission)
- func (app *ApplicationImpl) RegisterService(service interface{})
- func (app *ApplicationImpl) RegisterTemplates(fs ...*embed.FS)
- func (app *ApplicationImpl) RollbackMigrations() error
- func (app *ApplicationImpl) RunMigrations() error
- func (app *ApplicationImpl) Seed(ctx context.Context) error
- func (app *ApplicationImpl) Service(service interface{}) interface{}
- func (app *ApplicationImpl) Templates() []*embed.FS
- type Controller
- type Module
- type SeedFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectMigrations ¶
func CollectMigrations(app *ApplicationImpl) ([]*migrate.Migration, error)
Types ¶
type Application ¶
type Application interface { DB() *gorm.DB EventPublisher() event.Publisher Modules() []Module Controllers() []Controller Middleware() []mux.MiddlewareFunc Assets() []*embed.FS HashFsAssets() []*hashfs.FS Templates() []*embed.FS LocaleFiles() []*embed.FS MigrationDirs() []*embed.FS Seed(ctx context.Context) error Permissions() []permission.Permission RegisterControllers(controllers ...Controller) RegisterModule(module Module) RegisterPermissions(permissions ...permission.Permission) RegisterHashFsAssets(fs ...*hashfs.FS) RegisterAssets(fs ...*embed.FS) RegisterTemplates(fs ...*embed.FS) RegisterLocaleFiles(fs ...*embed.FS) RegisterMigrationDirs(fs ...*embed.FS) RegisterService(service interface{}) RegisterMiddleware(middleware ...mux.MiddlewareFunc) Service(service interface{}) interface{} Bundle() (*i18n.Bundle, error) RunMigrations() error RollbackMigrations() error }
Application with a dynamically extendable service registry
type ApplicationImpl ¶
type ApplicationImpl struct {
// contains filtered or unexported fields
}
ApplicationImpl with a dynamically extendable service registry
func (*ApplicationImpl) Assets ¶
func (app *ApplicationImpl) Assets() []*embed.FS
func (*ApplicationImpl) Controllers ¶
func (app *ApplicationImpl) Controllers() []Controller
func (*ApplicationImpl) DB ¶
func (app *ApplicationImpl) DB() *gorm.DB
func (*ApplicationImpl) EventPublisher ¶
func (app *ApplicationImpl) EventPublisher() event.Publisher
func (*ApplicationImpl) HashFsAssets ¶
func (app *ApplicationImpl) HashFsAssets() []*hashfs.FS
func (*ApplicationImpl) LocaleFiles ¶
func (app *ApplicationImpl) LocaleFiles() []*embed.FS
func (*ApplicationImpl) Middleware ¶
func (app *ApplicationImpl) Middleware() []mux.MiddlewareFunc
func (*ApplicationImpl) MigrationDirs ¶
func (app *ApplicationImpl) MigrationDirs() []*embed.FS
func (*ApplicationImpl) Modules ¶
func (app *ApplicationImpl) Modules() []Module
func (*ApplicationImpl) NavigationItems ¶
func (app *ApplicationImpl) NavigationItems(l *i18n.Localizer) []types.NavigationItem
func (*ApplicationImpl) Permissions ¶
func (app *ApplicationImpl) Permissions() []permission.Permission
func (*ApplicationImpl) RegisterAssets ¶
func (app *ApplicationImpl) RegisterAssets(fs ...*embed.FS)
func (*ApplicationImpl) RegisterControllers ¶
func (app *ApplicationImpl) RegisterControllers(controllers ...Controller)
func (*ApplicationImpl) RegisterHashFsAssets ¶
func (app *ApplicationImpl) RegisterHashFsAssets(fs ...*hashfs.FS)
func (*ApplicationImpl) RegisterLocaleFiles ¶
func (app *ApplicationImpl) RegisterLocaleFiles(fs ...*embed.FS)
func (*ApplicationImpl) RegisterMiddleware ¶
func (app *ApplicationImpl) RegisterMiddleware(middleware ...mux.MiddlewareFunc)
func (*ApplicationImpl) RegisterMigrationDirs ¶
func (app *ApplicationImpl) RegisterMigrationDirs(fs ...*embed.FS)
func (*ApplicationImpl) RegisterModule ¶
func (app *ApplicationImpl) RegisterModule(module Module)
func (*ApplicationImpl) RegisterPermissions ¶
func (app *ApplicationImpl) RegisterPermissions(permissions ...permission.Permission)
func (*ApplicationImpl) RegisterService ¶
func (app *ApplicationImpl) RegisterService(service interface{})
RegisterService registers a new service in the application by its type
func (*ApplicationImpl) RegisterTemplates ¶
func (app *ApplicationImpl) RegisterTemplates(fs ...*embed.FS)
func (*ApplicationImpl) RollbackMigrations ¶
func (app *ApplicationImpl) RollbackMigrations() error
func (*ApplicationImpl) RunMigrations ¶
func (app *ApplicationImpl) RunMigrations() error
func (*ApplicationImpl) Service ¶
func (app *ApplicationImpl) Service(service interface{}) interface{}
Service retrieves a service by its type
func (*ApplicationImpl) Templates ¶
func (app *ApplicationImpl) Templates() []*embed.FS
type Controller ¶
type Module ¶
type Module interface { Name() string Seed(ctx context.Context, app Application) error Register(app Application) error }
Click to show internal directories.
Click to hide internal directories.