Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppComponentCtor ¶
type AppComponentCtor = func(app IApp) IAppComponent
type AppControllerCtor ¶
type AppControllerCtor = func(component IAppComponent) IAppController
type AppScheduleHandler ¶ added in v0.10.17
type IAccessPolicy ¶
type IAccessPolicy string
const ( AccessPolicyPublic IAccessPolicy = "public" AccessPolicyAuthenticated IAccessPolicy = "authenticated" )
type IApp ¶
type IApp interface {
ILoggable
GetName() string
GetVersion() string
GetDocs() *swag.Spec
GetUI() *embed.FS
GetExternals() *embed.FS
GetConfig() *embed.FS
SetLogger(logger ILogger)
GetComponents() []IAppComponent
GetComponent(name string) IAppComponent
AddComponent(ctor AppComponentCtor)
GetKernel() IKernel
SetKernel(kernel IKernel)
}
type IAppComponent ¶
type IAppComponent interface {
ILoggable
GetName() string
GetOrder() int
GetApp() IApp
GetConfig() *embed.FS
GetDocs() *swag.Spec
GetUI() *embed.FS
GetAccessPolicy() IAccessPolicy
GetControllers() []IAppController
GetController(name string) IAppController
Init() error
Register(r *gin.RouterGroup) error
Start() error
Stop() error
}
type IAppController ¶
type IAppController interface {
ILoggable
GetName() string
GetOrder() int
GetComponent() IAppComponent
GetConfig() *embed.FS
GetAccessPolicy() IAccessPolicy
Init() error
Register(r *gin.RouterGroup) error
GetSchedules() []IAppSchedule
Start() error
Stop() error
}
type IAppSchedule ¶ added in v0.10.17
type IAppSchedule interface {
GetName() string
GetCron() string
GetTaskHandler() AppScheduleHandler
}
type IKernel ¶
type IKernel interface {
ILoggable
IsUnsecure() bool
GetApp() IApp
GetRunDirectory() string
GetRootContext() context.Context
GetService(key KernelServiceContextKey) IKernelService
SetService(service IKernelService)
Init() error
Register() error
Start() error
ListenAndServe() error
}
type IKernelService ¶
type ILogger ¶
type ILogger interface {
GetName() string
CreateSubLogger(name string) ILogger
Scope(name string, handler func(log ILogger) error) error
ScopeWithReturn(name string, handler func(log ILogger) (any, error)) (any, error)
GetBaseLogger() *logrus.Entry
Trace(message string)
TraceF(format string, args ...interface{})
Debug(message string)
DebugF(format string, args ...interface{})
Info(message string)
InfoF(format string, args ...interface{})
Warn(message string)
WarnF(format string, args ...interface{})
Error(message string)
ErrorF(format string, args ...interface{})
Panic(message string)
PanicF(format string, args ...interface{})
}
type KernelServiceContextKey ¶
type KernelServiceContextKey string
type PluginComponentCtor ¶ added in v0.11.1
type PluginComponentCtor = func(app IApp) IAppComponent
PluginComponentCtor is the expected function signature exported by plugins Plugins must export a function named "NewComponent" with this signature
type PluginInfo ¶ added in v0.11.1
PluginInfo contains metadata about a loaded plugin
Click to show internal directories.
Click to hide internal directories.