Documentation
¶
Index ¶
- func FromBundle(bundlePath string) (*echo.Echo, error)
- func Start(e *echo.Echo) error
- type SystemSourceRouter
- func (es *SystemSourceRouter) Attach(prefix string, e *echo.Echo) error
- func (es *SystemSourceRouter) AuthenticationHandler() echo.HandlerFunc
- func (es *SystemSourceRouter) CapabilitiesHandler() echo.HandlerFunc
- func (es *SystemSourceRouter) ConnectionsHandler() echo.HandlerFunc
- func (es *SystemSourceRouter) GetModuleHandler() echo.HandlerFunc
- func (es *SystemSourceRouter) OverviewHandler() echo.HandlerFunc
- func (es *SystemSourceRouter) Routes() *echo.Echo
- func (es *SystemSourceRouter) StateHandler() echo.HandlerFunc
- func (es *SystemSourceRouter) TenantOverviewHandler() echo.HandlerFunc
- func (es *SystemSourceRouter) WorkflowsHandler() echo.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SystemSourceRouter ¶
type SystemSourceRouter struct {
// contains filtered or unexported fields
}
func NewRouter ¶
func NewRouter(logger zerolog.Logger, source system.Source) *SystemSourceRouter
NewRouter creates a new echo handler struct that has a logger and an underlying source.
func (*SystemSourceRouter) Attach ¶
func (es *SystemSourceRouter) Attach(prefix string, e *echo.Echo) error
Attach takes a prefix and an echo instance to attach the routes onto. The prefix can either be empty, or start with a / character. It will attach the following routes to the passed in echo handler: - GET /<prefix>/state - GET /<prefix>/overview - GET /<prefix>/tenant/:ident - GET /<prefix>/module/:ident/:ref/:namespace/:mod - GET /<prefix>/workflows/:ident/:namespace/:version - GET /<prefix>/connections/:ident/:namespace/:verion - GET /<prefix>/authentication/:ident/:namespace/:version - GET /<prefix>/capabilities/:ident/:namespace/:version - GET /<prefix>/queries/:ident/:namespace/:version - GET /<prefix>/file/:ident/:version/*filename
If the prefix is not empty and does not start with a / character, it returns an error.
func (*SystemSourceRouter) AuthenticationHandler ¶
func (es *SystemSourceRouter) AuthenticationHandler() echo.HandlerFunc
AuthenticationHandler is a handler to fetch Authentication data.
func (*SystemSourceRouter) CapabilitiesHandler ¶
func (es *SystemSourceRouter) CapabilitiesHandler() echo.HandlerFunc
CapabilitiesHandler is a handler to fetch Capabilities data.
func (*SystemSourceRouter) ConnectionsHandler ¶
func (es *SystemSourceRouter) ConnectionsHandler() echo.HandlerFunc
ConnectionsHandler is a handler to fetch Connection data.
func (*SystemSourceRouter) GetModuleHandler ¶
func (es *SystemSourceRouter) GetModuleHandler() echo.HandlerFunc
GetModuleHandler is a handler to find a single module.
func (*SystemSourceRouter) OverviewHandler ¶
func (es *SystemSourceRouter) OverviewHandler() echo.HandlerFunc
OverviewHandler is a handler to fetch the system overview.
func (*SystemSourceRouter) Routes ¶
func (es *SystemSourceRouter) Routes() *echo.Echo
Routes creates an echo route group and returns it so the consuming service can attach it to wherever it likes using whatever middlewares they way. The consuming service no longer has an option to modify the middlewares of a route, nor can it remove a route once added. The routes do not have a prefix, so the consuming service can choose what path to mount these under.
To use this you will need to do the following: - e.Any("/some/prefix", echo.WrapHandler(es.Routes(), <middlewares>)
Alternatively you can not use the Routes() method, and construct your own route-handler pairs as you see fit, because all of the handlers are exported. That way you have the most flexibility.
The routes in this group are the following: - GET /state - GET /overview - GET /tenant/:ident - GET /module/:ident/:ref/:namespace/:mod - GET /workflows/:ident/:namespace/:version - GET /connections/:ident/:namespace/:verion - GET /authentication/:ident/:namespace/:version - GET /capabilities/:ident/:namespace/:version - GET /queries/:ident/:namespace/:version - GET /file/:ident/:version/*filename
func (*SystemSourceRouter) StateHandler ¶
func (es *SystemSourceRouter) StateHandler() echo.HandlerFunc
StateHandler is a handler to fetch the system State.
func (*SystemSourceRouter) TenantOverviewHandler ¶
func (es *SystemSourceRouter) TenantOverviewHandler() echo.HandlerFunc
TenantOverviewHandler is a handler to fetch a particular tenant's overview.
func (*SystemSourceRouter) WorkflowsHandler ¶
func (es *SystemSourceRouter) WorkflowsHandler() echo.HandlerFunc
WorkflowsHandler is a handler to fetch Workflows.