Documentation
¶
Index ¶
- type Controller
- func (c *Controller) InjectCommand(commands ...module.CommandController)
- func (c *Controller) InjectDownstream(downstream ...module.DownstreamController)
- func (ctrl *Controller) InjectHTTP(httpControllers ...module.HttpController)
- func (c *Controller) InjectMetric(metric ...module.MetricController)
- func (c *Controller) ListDownstream() []module.DownstreamController
- func (c *Controller) ListMetric() []module.MetricController
- type HttpInjector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(httpInjector HttpInjector, apiError module.ApiError, rootCommand *cobra.Command) *Controller
func (*Controller) InjectCommand ¶
func (c *Controller) InjectCommand(commands ...module.CommandController)
TODO: Return error when command already registered
func (*Controller) InjectDownstream ¶
func (c *Controller) InjectDownstream(downstream ...module.DownstreamController)
func (*Controller) InjectHTTP ¶
func (ctrl *Controller) InjectHTTP(httpControllers ...module.HttpController)
TODO: Return error when controller already registered
func (*Controller) InjectMetric ¶
func (c *Controller) InjectMetric(metric ...module.MetricController)
func (*Controller) ListDownstream ¶
func (c *Controller) ListDownstream() []module.DownstreamController
func (*Controller) ListMetric ¶
func (c *Controller) ListMetric() []module.MetricController
type HttpInjector ¶
type HttpInjector func(httpMethod, relativePath string, handlers ...gin.HandlerFunc) gin.IRoutes
Click to show internal directories.
Click to hide internal directories.