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 NewBookmarkEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewDataEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewMetaEndpoint(s Service) goa.Endpoint
- func NewRecentlyEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewResolveEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewSensorMetaEndpoint(s Service) goa.Endpoint
- func NewStationMetaEndpoint(s Service) goa.Endpoint
- func NewTailEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewViewedSavedBookmark(res *SavedBookmark, view string) *sensorviews.SavedBookmark
- type Auther
- type BookmarkPayload
- type Client
- func (c *Client) Bookmark(ctx context.Context, p *BookmarkPayload) (res *SavedBookmark, err error)
- func (c *Client) Data(ctx context.Context, p *DataPayload) (res *DataResult, err error)
- func (c *Client) Meta(ctx context.Context) (res *MetaResult, err error)
- func (c *Client) Recently(ctx context.Context, p *RecentlyPayload) (res *RecentlyResult, err error)
- func (c *Client) Resolve(ctx context.Context, p *ResolvePayload) (res *SavedBookmark, err error)
- func (c *Client) SensorMeta(ctx context.Context) (res *SensorMetaResult, err error)
- func (c *Client) StationMeta(ctx context.Context, p *StationMetaPayload) (res *StationMetaResult, err error)
- func (c *Client) Tail(ctx context.Context, p *TailPayload) (res *TailResult, err error)
- type DataPayload
- type DataResult
- type Endpoints
- type MetaResult
- type RecentlyPayload
- type RecentlyResult
- type ResolvePayload
- type SavedBookmark
- type SensorMetaResult
- type Service
- type StationMetaPayload
- type StationMetaResult
- type TailPayload
- type TailResult
Constants ¶
const ServiceName = "sensor"
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 = [8]string{"meta", "station meta", "sensor meta", "data", "tail", "recently", "bookmark", "resolve"}
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 NewBookmarkEndpoint ¶
func NewBookmarkEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewBookmarkEndpoint returns an endpoint function that calls the method "bookmark" of service "sensor".
func NewDataEndpoint ¶
func NewDataEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDataEndpoint returns an endpoint function that calls the method "data" of service "sensor".
func NewMetaEndpoint ¶
NewMetaEndpoint returns an endpoint function that calls the method "meta" of service "sensor".
func NewRecentlyEndpoint ¶
func NewRecentlyEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewRecentlyEndpoint returns an endpoint function that calls the method "recently" of service "sensor".
func NewResolveEndpoint ¶
func NewResolveEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewResolveEndpoint returns an endpoint function that calls the method "resolve" of service "sensor".
func NewSensorMetaEndpoint ¶
NewSensorMetaEndpoint returns an endpoint function that calls the method "sensor meta" of service "sensor".
func NewStationMetaEndpoint ¶
NewStationMetaEndpoint returns an endpoint function that calls the method "station meta" of service "sensor".
func NewTailEndpoint ¶
func NewTailEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewTailEndpoint returns an endpoint function that calls the method "tail" of service "sensor".
func NewViewedSavedBookmark ¶
func NewViewedSavedBookmark(res *SavedBookmark, view string) *sensorviews.SavedBookmark
NewViewedSavedBookmark initializes viewed result type SavedBookmark from result type SavedBookmark 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 BookmarkPayload ¶
BookmarkPayload is the payload type of the sensor service bookmark method.
type Client ¶
type Client struct { MetaEndpoint goa.Endpoint StationMetaEndpoint goa.Endpoint SensorMetaEndpoint goa.Endpoint DataEndpoint goa.Endpoint TailEndpoint goa.Endpoint RecentlyEndpoint goa.Endpoint BookmarkEndpoint goa.Endpoint ResolveEndpoint goa.Endpoint }
Client is the "sensor" service client.
func NewClient ¶
func NewClient(meta, stationMeta, sensorMeta, data, tail, recently, bookmark, resolve goa.Endpoint) *Client
NewClient initializes a "sensor" service client given the endpoints.
func (*Client) Bookmark ¶
func (c *Client) Bookmark(ctx context.Context, p *BookmarkPayload) (res *SavedBookmark, err error)
Bookmark calls the "bookmark" endpoint of the "sensor" service.
func (*Client) Data ¶
func (c *Client) Data(ctx context.Context, p *DataPayload) (res *DataResult, err error)
Data calls the "data" endpoint of the "sensor" service.
func (*Client) Meta ¶
func (c *Client) Meta(ctx context.Context) (res *MetaResult, err error)
Meta calls the "meta" endpoint of the "sensor" service.
func (*Client) Recently ¶
func (c *Client) Recently(ctx context.Context, p *RecentlyPayload) (res *RecentlyResult, err error)
Recently calls the "recently" endpoint of the "sensor" service.
func (*Client) Resolve ¶
func (c *Client) Resolve(ctx context.Context, p *ResolvePayload) (res *SavedBookmark, err error)
Resolve calls the "resolve" endpoint of the "sensor" service.
func (*Client) SensorMeta ¶
func (c *Client) SensorMeta(ctx context.Context) (res *SensorMetaResult, err error)
SensorMeta calls the "sensor meta" endpoint of the "sensor" service.
func (*Client) StationMeta ¶
func (c *Client) StationMeta(ctx context.Context, p *StationMetaPayload) (res *StationMetaResult, err error)
StationMeta calls the "station meta" endpoint of the "sensor" service.
func (*Client) Tail ¶
func (c *Client) Tail(ctx context.Context, p *TailPayload) (res *TailResult, err error)
Tail calls the "tail" endpoint of the "sensor" service.
type DataPayload ¶
type DataPayload struct { Auth *string Start *int64 End *int64 Stations *string Sensors *string Resolution *int32 Aggregate *string Complete *bool Tail *int32 Backend *string }
DataPayload is the payload type of the sensor service data method.
type DataResult ¶
type DataResult struct {
Object interface{}
}
DataResult is the result type of the sensor service data method.
type Endpoints ¶
type Endpoints struct { Meta goa.Endpoint StationMeta goa.Endpoint SensorMeta goa.Endpoint Data goa.Endpoint Tail goa.Endpoint Recently goa.Endpoint Bookmark goa.Endpoint Resolve goa.Endpoint }
Endpoints wraps the "sensor" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "sensor" service with endpoints.
type MetaResult ¶
type MetaResult struct {
Object interface{}
}
MetaResult is the result type of the sensor service meta method.
type RecentlyPayload ¶
RecentlyPayload is the payload type of the sensor service recently method.
type RecentlyResult ¶
type RecentlyResult struct {
Object interface{}
}
RecentlyResult is the result type of the sensor service recently method.
type ResolvePayload ¶
ResolvePayload is the payload type of the sensor service resolve method.
type SavedBookmark ¶
SavedBookmark is the result type of the sensor service bookmark method.
func NewSavedBookmark ¶
func NewSavedBookmark(vres *sensorviews.SavedBookmark) *SavedBookmark
NewSavedBookmark initializes result type SavedBookmark from viewed result type SavedBookmark.
type SensorMetaResult ¶
type SensorMetaResult struct {
Object interface{}
}
SensorMetaResult is the result type of the sensor service sensor meta method.
type Service ¶
type Service interface { // Meta implements meta. Meta(context.Context) (res *MetaResult, err error) // StationMeta implements station meta. StationMeta(context.Context, *StationMetaPayload) (res *StationMetaResult, err error) // SensorMeta implements sensor meta. SensorMeta(context.Context) (res *SensorMetaResult, err error) // Data implements data. Data(context.Context, *DataPayload) (res *DataResult, err error) // Tail implements tail. Tail(context.Context, *TailPayload) (res *TailResult, err error) // Recently implements recently. Recently(context.Context, *RecentlyPayload) (res *RecentlyResult, err error) // Bookmark implements bookmark. Bookmark(context.Context, *BookmarkPayload) (res *SavedBookmark, err error) // Resolve implements resolve. Resolve(context.Context, *ResolvePayload) (res *SavedBookmark, err error) }
Service is the sensor service interface.
type StationMetaPayload ¶
type StationMetaPayload struct {
Stations *string
}
StationMetaPayload is the payload type of the sensor service station meta method.
type StationMetaResult ¶
type StationMetaResult struct {
Object interface{}
}
StationMetaResult is the result type of the sensor service station meta method.
type TailPayload ¶
TailPayload is the payload type of the sensor service tail method.
type TailResult ¶
type TailResult struct {
Object interface{}
}
TailResult is the result type of the sensor service tail method.