api

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

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 Controller interface {
	DeleteWatcher(userId string, watcherId string) (err error)
}

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]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL