Documentation ¶
Index ¶
- Constants
- Variables
- func MakeBadRequest(err error) *goa.ServiceError
- func MakeForbidden(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func MakeUnauthorized(err error) *goa.ServiceError
- func NewDeviceLayoutEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewFirmwareStatisticsEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewViewedDeviceLayoutResponse(res *DeviceLayoutResponse, view string) *informationviews.DeviceLayoutResponse
- type Auther
- type Client
- type DeviceLayoutPayload
- type DeviceLayoutResponse
- type Endpoints
- type FirmwareStatisticsPayload
- type FirmwareStatisticsResult
- type SensorRange
- type SensorReading
- type Service
- type StationConfiguration
- type StationModule
- type StationSensor
Constants ¶
const ServiceName = "information"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [2]string{"device layout", "firmware statistics"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func MakeBadRequest ¶
func MakeBadRequest(err error) *goa.ServiceError
MakeBadRequest builds a goa.ServiceError from an error.
func MakeForbidden ¶
func MakeForbidden(err error) *goa.ServiceError
MakeForbidden builds a goa.ServiceError from an error.
func MakeNotFound ¶
func MakeNotFound(err error) *goa.ServiceError
MakeNotFound builds a goa.ServiceError from an error.
func MakeUnauthorized ¶
func MakeUnauthorized(err error) *goa.ServiceError
MakeUnauthorized builds a goa.ServiceError from an error.
func NewDeviceLayoutEndpoint ¶
func NewDeviceLayoutEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDeviceLayoutEndpoint returns an endpoint function that calls the method "device layout" of service "information".
func NewFirmwareStatisticsEndpoint ¶
func NewFirmwareStatisticsEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewFirmwareStatisticsEndpoint returns an endpoint function that calls the method "firmware statistics" of service "information".
func NewViewedDeviceLayoutResponse ¶
func NewViewedDeviceLayoutResponse(res *DeviceLayoutResponse, view string) *informationviews.DeviceLayoutResponse
NewViewedDeviceLayoutResponse initializes viewed result type DeviceLayoutResponse from result type DeviceLayoutResponse using the given view.
Types ¶
type Auther ¶
type Auther interface { // JWTAuth implements the authorization logic for the JWT security scheme. JWTAuth(ctx context.Context, token string, schema *security.JWTScheme) (context.Context, error) }
Auther defines the authorization functions to be implemented by the service.
type Client ¶
Client is the "information" service client.
func (*Client) DeviceLayout ¶
func (c *Client) DeviceLayout(ctx context.Context, p *DeviceLayoutPayload) (res *DeviceLayoutResponse, err error)
DeviceLayout calls the "device layout" endpoint of the "information" service.
func (*Client) FirmwareStatistics ¶
func (c *Client) FirmwareStatistics(ctx context.Context, p *FirmwareStatisticsPayload) (res *FirmwareStatisticsResult, err error)
FirmwareStatistics calls the "firmware statistics" endpoint of the "information" service.
type DeviceLayoutPayload ¶
DeviceLayoutPayload is the payload type of the information service device layout method.
type DeviceLayoutResponse ¶
type DeviceLayoutResponse struct { Configurations []*StationConfiguration Sensors map[string][]*StationSensor }
DeviceLayoutResponse is the result type of the information service device layout method.
func NewDeviceLayoutResponse ¶
func NewDeviceLayoutResponse(vres *informationviews.DeviceLayoutResponse) *DeviceLayoutResponse
NewDeviceLayoutResponse initializes result type DeviceLayoutResponse from viewed result type DeviceLayoutResponse.
type Endpoints ¶
Endpoints wraps the "information" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "information" service with endpoints.
type FirmwareStatisticsPayload ¶
type FirmwareStatisticsPayload struct {
Auth string
}
FirmwareStatisticsPayload is the payload type of the information service firmware statistics method.
type FirmwareStatisticsResult ¶
type FirmwareStatisticsResult struct {
Object interface{}
}
FirmwareStatisticsResult is the result type of the information service firmware statistics method.
type SensorRange ¶
type SensorReading ¶
type Service ¶
type Service interface { // DeviceLayout implements device layout. DeviceLayout(context.Context, *DeviceLayoutPayload) (res *DeviceLayoutResponse, err error) // FirmwareStatistics implements firmware statistics. FirmwareStatistics(context.Context, *FirmwareStatisticsPayload) (res *FirmwareStatisticsResult, err error) }
Service is the information service interface.
type StationConfiguration ¶
type StationModule ¶
type StationSensor ¶
type StationSensor struct { Name string UnitOfMeasure string Reading *SensorReading Key string FullKey string Ranges []*SensorRange Meta map[string]interface{} }