Documentation ¶
Overview ¶
Package schema contains DTOs describing services and
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidType - error casting general service to exact type. ErrInvalidType = errors.New("invalid service type") // ErrMissingService - provider has no matching service to return. ErrMissingService = errors.New("provider missing initialized service") )
Functions ¶
This section is empty.
Types ¶
type AddHandlersFunc ¶
type AddHandlersFunc func(baseGroup, secGroup *echo.Group) error
AddHandlersFunc - function adding handlers to secure or/and unsecure groups.
type ProvidingServices ¶
ProvidingServices describes provider of the services.
type ServiceDefinition ¶
type ServiceDefinition struct { // Unique service ID allowing to build service dependency tree ID ServiceID // Init is a function used to initialized service instance with given state Init ServiceInitFunc // DependsOn list IDs of the required services. DependsOn []ServiceID // InitHandlersFunc is a function for initializing service-related handlers // after the service is initialized. // Can remain `nil` if service does not provide API endpoints. InitHandlersFunc func(state ProvidingServices) AddHandlersFunc }
ServiceDefinition contains service metadata and initialization.
type ServiceInitFunc ¶
ServiceInitFunc - function returning initialized service instance.
type ServiceMapping ¶
ServiceMapping - ServiceID to Service mapping.
Click to show internal directories.
Click to hide internal directories.