Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // SwaggerJSON embedded version of the swagger document used at generation time SwaggerJSON json.RawMessage // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time FlatSwaggerJSON json.RawMessage )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Address string Debug bool InsecureHTTP bool AuthDisabled bool TLSCertFile string TLSKeyFile string WellKnownDisabled bool TokenURL string Tracer opentracing.Tracer }
Config defines the config options for the API server.
func (*Config) WithDefaultFlags ¶
WithDefaultFlags creates a Config with default address ':8080'
type Routes ¶
type Routes struct { *gin.Engine DeleteThingsDeviceNameActionsActionNameActionID struct { *gin.RouterGroup } GetThings struct { *gin.RouterGroup } GetThingsDeviceName struct { *gin.RouterGroup } GetThingsDeviceNameActions struct { *gin.RouterGroup } GetThingsDeviceNameActionsActionNameActionID struct { *gin.RouterGroup } GetThingsDeviceNameEvents struct { *gin.RouterGroup } GetThingsDeviceNameEventsEventType struct { *gin.RouterGroup } GetThingsDeviceNameProperties struct { *gin.RouterGroup } GetThingsDeviceNamePropertiesPropertyName struct { *gin.RouterGroup } PostThingsDeviceNameActions struct { *gin.RouterGroup } PutThingsDeviceNameActionsActionNameActionID struct { *gin.RouterGroup } PutThingsDeviceNamePropertiesPropertyName struct { *gin.RouterGroup } }
Routes defines all the routes of the Server service.
type Server ¶
type Server struct { Routes *Routes Title string Version string // contains filtered or unexported fields }
Server defines the Server service.
func (*Server) ConfigureRoutes ¶
func (s *Server) ConfigureRoutes()
ConfigureRoutes starts the internal configureRoutes methode.
func (*Server) Run ¶
Run runs the Server. It will listen on either HTTP or HTTPS depending on the config passed to NewServer.
func (*Server) RunWithSigHandler ¶
RunWithSigHandler runs the Server server with SIGTERM handling automatically enabled. The server will listen for a SIGTERM signal and gracefully shutdown the web server. It's possible to optionally pass any number shutdown functions which will execute one by one after the webserver has been shutdown successfully.
type Service ¶
type Service interface { Healthy() bool DeleteThingsDeviceNameActionsActionNameActionID(ctx *gin.Context, params *operations.DeleteThingsDeviceNameActionsActionNameActionIDParams) *api.Response GetThings(ctx *gin.Context) *api.Response GetThingsDeviceName(ctx *gin.Context, params *operations.GetThingsDeviceNameParams) *api.Response GetThingsDeviceNameActions(ctx *gin.Context, params *operations.GetThingsDeviceNameActionsParams) *api.Response GetThingsDeviceNameActionsActionNameActionID(ctx *gin.Context, params *operations.GetThingsDeviceNameActionsActionNameActionIDParams) *api.Response GetThingsDeviceNameEvents(ctx *gin.Context, params *operations.GetThingsDeviceNameEventsParams) *api.Response GetThingsDeviceNameEventsEventType(ctx *gin.Context, params *operations.GetThingsDeviceNameEventsEventTypeParams) *api.Response GetThingsDeviceNameProperties(ctx *gin.Context, params *operations.GetThingsDeviceNamePropertiesParams) *api.Response GetThingsDeviceNamePropertiesPropertyName(ctx *gin.Context, params *operations.GetThingsDeviceNamePropertiesPropertyNameParams) *api.Response PostThingsDeviceNameActions(ctx *gin.Context, params *operations.PostThingsDeviceNameActionsParams) *api.Response PutThingsDeviceNameActionsActionNameActionID(ctx *gin.Context, params *operations.PutThingsDeviceNameActionsActionNameActionIDParams) *api.Response PutThingsDeviceNamePropertiesPropertyName(ctx *gin.Context, params *operations.PutThingsDeviceNamePropertiesPropertyNameParams) *api.Response }
Service is the interface that must be implemented in order to provide business logic for the Server service.