types

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

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 AppScheduleHandler = func(fire string) string

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 IKernelService interface {
	ILoggable
	GetName() string
	GetKernel() IKernel
	GetConfig(key string) string
	SetConfig(key string, value string)
	GetData(key string) interface{}
	SetData(key string, value interface{})
	Init() error
	Register() error
	Start() error
	Stop() error
}

type ILoggable

type ILoggable interface {
	GetLogger() ILogger
}

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

type PluginInfo struct {
	Name string
	Path string
}

PluginInfo contains metadata about a loaded plugin

Jump to

Keyboard shortcuts

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