Documentation ¶
Overview ¶
Copyright 2018 Northern.tech AS
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 Northern.tech AS
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 Northern.tech AS
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func AllowHeaderOptionsGenerator(methods []string) rest.HandlerFunc
- func AutogenOptionsRoutes(routes []*rest.Route, gen HttpOptionsGenerator) []*rest.Route
- type ApiHandler
- type DevAdmApiStatus
- type DevAdmHandlers
- func (d *DevAdmHandlers) AcceptPreauthorizedHandler(w rest.ResponseWriter, r *rest.Request)
- func (d *DevAdmHandlers) DeleteDeviceHandler(w rest.ResponseWriter, r *rest.Request)
- func (d *DevAdmHandlers) DeleteDeviceManagementHandler(w rest.ResponseWriter, r *rest.Request)
- func (d *DevAdmHandlers) DeleteDevicesHandler(w rest.ResponseWriter, r *rest.Request)
- func (d *DevAdmHandlers) GetApp() (rest.App, error)
- func (d *DevAdmHandlers) GetDeviceHandler(w rest.ResponseWriter, r *rest.Request)
- func (d *DevAdmHandlers) GetDeviceStatusHandler(w rest.ResponseWriter, r *rest.Request)
- func (d *DevAdmHandlers) GetDevicesHandler(w rest.ResponseWriter, r *rest.Request)
- func (d *DevAdmHandlers) PostDevicesHandler(w rest.ResponseWriter, r *rest.Request)
- func (d *DevAdmHandlers) ProvisionTenantHandler(w rest.ResponseWriter, r *rest.Request)
- func (d *DevAdmHandlers) SubmitDeviceHandler(w rest.ResponseWriter, r *rest.Request)
- func (d *DevAdmHandlers) UpdateDeviceStatusHandler(w rest.ResponseWriter, r *rest.Request)
- type HttpOptionsGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowHeaderOptionsGenerator ¶
func AllowHeaderOptionsGenerator(methods []string) rest.HandlerFunc
func AutogenOptionsRoutes ¶
func AutogenOptionsRoutes(routes []*rest.Route, gen HttpOptionsGenerator) []*rest.Route
Automatically add OPTIONS method support for each defined route, only if there's no OPTIONS handler for that route yet
Types ¶
type ApiHandler ¶
type ApiHandler interface { // produce a rest.App with routing setup or an error GetApp() (rest.App, error) }
thin API handler interface
func NewDevAdmApiHandlers ¶
func NewDevAdmApiHandlers(devadm devadm.App) ApiHandler
return an ApiHandler for device admission app
type DevAdmApiStatus ¶
type DevAdmApiStatus struct {
Status string `json:"status"`
}
model of device status response at /devices/:id/status endpoint, the response is a stripped down version of the device containing only the status field
type DevAdmHandlers ¶
func (*DevAdmHandlers) AcceptPreauthorizedHandler ¶
func (d *DevAdmHandlers) AcceptPreauthorizedHandler(w rest.ResponseWriter, r *rest.Request)
func (*DevAdmHandlers) DeleteDeviceHandler ¶
func (d *DevAdmHandlers) DeleteDeviceHandler(w rest.ResponseWriter, r *rest.Request)
func (*DevAdmHandlers) DeleteDeviceManagementHandler ¶
func (d *DevAdmHandlers) DeleteDeviceManagementHandler(w rest.ResponseWriter, r *rest.Request)
func (*DevAdmHandlers) DeleteDevicesHandler ¶
func (d *DevAdmHandlers) DeleteDevicesHandler(w rest.ResponseWriter, r *rest.Request)
func (*DevAdmHandlers) GetDeviceHandler ¶
func (d *DevAdmHandlers) GetDeviceHandler(w rest.ResponseWriter, r *rest.Request)
func (*DevAdmHandlers) GetDeviceStatusHandler ¶
func (d *DevAdmHandlers) GetDeviceStatusHandler(w rest.ResponseWriter, r *rest.Request)
func (*DevAdmHandlers) GetDevicesHandler ¶
func (d *DevAdmHandlers) GetDevicesHandler(w rest.ResponseWriter, r *rest.Request)
func (*DevAdmHandlers) PostDevicesHandler ¶
func (d *DevAdmHandlers) PostDevicesHandler(w rest.ResponseWriter, r *rest.Request)
func (*DevAdmHandlers) ProvisionTenantHandler ¶
func (d *DevAdmHandlers) ProvisionTenantHandler(w rest.ResponseWriter, r *rest.Request)
func (*DevAdmHandlers) SubmitDeviceHandler ¶
func (d *DevAdmHandlers) SubmitDeviceHandler(w rest.ResponseWriter, r *rest.Request)
func (*DevAdmHandlers) UpdateDeviceStatusHandler ¶
func (d *DevAdmHandlers) UpdateDeviceStatusHandler(w rest.ResponseWriter, r *rest.Request)
type HttpOptionsGenerator ¶
type HttpOptionsGenerator func(methods []string) rest.HandlerFunc
Click to show internal directories.
Click to hide internal directories.