Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRouter ¶
func GetRouter(config configuration.Config, command Controller) http.Handler
@title Smart-Service-Repository API @version 0.1 @license.name Apache 2.0 @license.url http://www.apache.org/licenses/LICENSE-2.0.html @host localhost:8080 @BasePath / @securityDefinitions.apikey Bearer @in header @name Authorization
func Start ¶
func Start(ctx context.Context, config configuration.Config, ctrl Controller) (err error)
Types ¶
type Controller ¶
type EndpointMethod ¶
type EndpointMethod = func(config configuration.Config, router *httprouter.Router, ctrl Controller)
type HealthEndpoints ¶
type HealthEndpoints struct{}
func (*HealthEndpoints) HealthCheck ¶
func (this *HealthEndpoints) HealthCheck(config configuration.Config, router *httprouter.Router, ctrl Controller)
HealthCheck godoc @Summary health check @Description checks health and reachability of the service @Tags health @Success 200 @Router / [get]
func (*HealthEndpoints) HealthCheck2 ¶
func (this *HealthEndpoints) HealthCheck2(config configuration.Config, router *httprouter.Router, ctrl Controller)
HealthCheck godoc @Summary health check @Description checks health and reachability of the service @Tags health @Success 200 @Router /health [get]
type WatcherEndpoints ¶
type WatcherEndpoints struct{}
func (*WatcherEndpoints) Delete ¶
func (this *WatcherEndpoints) Delete(config configuration.Config, router *httprouter.Router, ctrl Controller)
Delete godoc @Summary removes a watcher @Description removes a watcher @Tags watcher @Param id path string true "Watcher ID" @Success 200 @Failure 500 @Router /watcher/{id} [delete]