Documentation
¶
Overview ¶
Package restapi FlottaManagement
Flotta Edge Management Schemes: https Host: localhost BasePath: /api/flotta-management/v1 Version: 1.0.0 License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0.html Contact: Flotta flotta<flotta@redhat.com> https://github.com/project-flotta Consumes: - application/json Produces: - application/json
swagger:meta
Index ¶
- Constants
- Variables
- func Handler(c Config) (http.Handler, error)
- func HandlerAPI(c Config) (http.Handler, *operations.FlottaManagementAPI, error)
- type Config
- type MockYggdrasilAPI
- func (_m *MockYggdrasilAPI) GetControlMessageForDevice(ctx context.Context, params yggdrasil.GetControlMessageForDeviceParams) middleware.Responder
- func (_m *MockYggdrasilAPI) GetDataMessageForDevice(ctx context.Context, params yggdrasil.GetDataMessageForDeviceParams) middleware.Responder
- func (_m *MockYggdrasilAPI) PostControlMessageForDevice(ctx context.Context, params yggdrasil.PostControlMessageForDeviceParams) middleware.Responder
- func (_m *MockYggdrasilAPI) PostDataMessageForDevice(ctx context.Context, params yggdrasil.PostDataMessageForDeviceParams) middleware.Responder
- type YggdrasilAPI
Constants ¶
const AuthKey contextKey = "Auth"
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 ¶
func Handler ¶
Handler returns an http.Handler given the handler configuration It mounts all the business logic implementers in the right routing.
func HandlerAPI ¶
func HandlerAPI(c Config) (http.Handler, *operations.FlottaManagementAPI, error)
HandlerAPI returns an http.Handler given the handler configuration and the corresponding *FlottaManagement instance. It mounts all the business logic implementers in the right routing.
Types ¶
type Config ¶
type Config struct {
YggdrasilAPI
Logger func(string, ...interface{})
// InnerMiddleware is for the handler executors. These do not apply to the swagger.json document.
// The middleware executes after routing but before authentication, binding and validation
InnerMiddleware func(http.Handler) http.Handler
// Authorizer is used to authorize a request after the Auth function was called using the "Auth*" functions
// and the principal was stored in the context in the "AuthKey" context value.
Authorizer func(*http.Request) error
// Authenticator to use for all APIKey authentication
APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator
// Authenticator to use for all Bearer authentication
BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator
// Authenticator to use for all Basic authentication
BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator
}
Config is configuration for Handler
type MockYggdrasilAPI ¶
MockYggdrasilAPI is an autogenerated mock type for the YggdrasilAPI type
func (*MockYggdrasilAPI) GetControlMessageForDevice ¶
func (_m *MockYggdrasilAPI) GetControlMessageForDevice(ctx context.Context, params yggdrasil.GetControlMessageForDeviceParams) middleware.Responder
GetControlMessageForDevice provides a mock function with given fields: ctx, params
func (*MockYggdrasilAPI) GetDataMessageForDevice ¶
func (_m *MockYggdrasilAPI) GetDataMessageForDevice(ctx context.Context, params yggdrasil.GetDataMessageForDeviceParams) middleware.Responder
GetDataMessageForDevice provides a mock function with given fields: ctx, params
func (*MockYggdrasilAPI) PostControlMessageForDevice ¶
func (_m *MockYggdrasilAPI) PostControlMessageForDevice(ctx context.Context, params yggdrasil.PostControlMessageForDeviceParams) middleware.Responder
PostControlMessageForDevice provides a mock function with given fields: ctx, params
func (*MockYggdrasilAPI) PostDataMessageForDevice ¶
func (_m *MockYggdrasilAPI) PostDataMessageForDevice(ctx context.Context, params yggdrasil.PostDataMessageForDeviceParams) middleware.Responder
PostDataMessageForDevice provides a mock function with given fields: ctx, params
type YggdrasilAPI ¶
type YggdrasilAPI interface {
/* GetControlMessageForDevice Get control message for device API */
GetControlMessageForDevice(ctx context.Context, params yggdrasil.GetControlMessageForDeviceParams) middleware.Responder
/* GetDataMessageForDevice Get data message for device API */
GetDataMessageForDevice(ctx context.Context, params yggdrasil.GetDataMessageForDeviceParams) middleware.Responder
/* PostControlMessageForDevice Post control message for device API */
PostControlMessageForDevice(ctx context.Context, params yggdrasil.PostControlMessageForDeviceParams) middleware.Responder
/* PostDataMessageForDevice Post data message for device API */
PostDataMessageForDevice(ctx context.Context, params yggdrasil.PostDataMessageForDeviceParams) middleware.Responder
}
YggdrasilAPI