Documentation
¶
Index ¶
- Constants
- func NewRouteRegistryRouter(base chi.Router, owner string) chi.Router
- func RegisterAllChi(router chi.Router, opts CoreOptions) error
- func RegisterSwaggerChi(router chi.Router, opts *SwaggerOptions) error
- type CoreOptions
- type ErrMigration
- type ErrModuleBootstrap
- type ErrPluginBootstrap
- type ErrRouteConflict
- type ModuleBootstrapper
- type PluginRegistrar
- type RuntimeAdapter
- type SwaggerOptions
Constants ¶
View Source
const (
DefaultBasePath = "/api/v1"
)
Variables ¶
This section is empty.
Functions ¶
func NewRouteRegistryRouter ¶
NewRouteRegistryRouter creates a chi router that tracks route ownership.
func RegisterAllChi ¶
func RegisterAllChi(router chi.Router, opts CoreOptions) error
func RegisterSwaggerChi ¶
func RegisterSwaggerChi(router chi.Router, opts *SwaggerOptions) error
Types ¶
type CoreOptions ¶
type CoreOptions struct {
Logger *zap.Logger
Config any
PluginRegistrar PluginRegistrar
ModuleBootstrapper ModuleBootstrapper
MigrationRunner func(context.Context) error
SkipMigrate bool
BasePath string
}
type ErrMigration ¶
type ErrMigration struct {
Cause error
}
func (*ErrMigration) Error ¶
func (e *ErrMigration) Error() string
func (*ErrMigration) Unwrap ¶
func (e *ErrMigration) Unwrap() error
type ErrModuleBootstrap ¶
type ErrModuleBootstrap struct {
Cause error
}
func (*ErrModuleBootstrap) Error ¶
func (e *ErrModuleBootstrap) Error() string
func (*ErrModuleBootstrap) Unwrap ¶
func (e *ErrModuleBootstrap) Unwrap() error
type ErrPluginBootstrap ¶
type ErrPluginBootstrap struct {
Cause error
}
func (*ErrPluginBootstrap) Error ¶
func (e *ErrPluginBootstrap) Error() string
func (*ErrPluginBootstrap) Unwrap ¶
func (e *ErrPluginBootstrap) Unwrap() error
type ErrRouteConflict ¶
func (*ErrRouteConflict) Error ¶
func (e *ErrRouteConflict) Error() string
type ModuleBootstrapper ¶
type PluginRegistrar ¶
type PluginRegistrar func(rt RuntimeAdapter, cfg any, logger *zap.Logger) error
func NewManifestPluginRegistrar ¶
func NewManifestPluginRegistrar(manifestPath string) PluginRegistrar
NewManifestPluginRegistrar loads plugin names from plugins.yaml.
func NewStaticPluginRegistrar ¶
func NewStaticPluginRegistrar(names ...string) PluginRegistrar
NewStaticPluginRegistrar registers the provided plugin names in order.
type RuntimeAdapter ¶
Click to show internal directories.
Click to hide internal directories.