sensor

package
v0.0.0-...-d2cf98a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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

func NewMetaEndpoint(s Service) goa.Endpoint

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

func NewSensorMetaEndpoint(s Service) goa.Endpoint

NewSensorMetaEndpoint returns an endpoint function that calls the method "sensor meta" of service "sensor".

func NewStationMetaEndpoint

func NewStationMetaEndpoint(s Service) goa.Endpoint

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

type BookmarkPayload struct {
	Auth     *string
	Bookmark string
}

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

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "sensor" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "sensor" service endpoints.

type MetaResult

type MetaResult struct {
	Object interface{}
}

MetaResult is the result type of the sensor service meta method.

type RecentlyPayload

type RecentlyPayload struct {
	Auth     *string
	Stations *string
	Windows  *string
}

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

type ResolvePayload struct {
	Auth *string
	V    string
}

ResolvePayload is the payload type of the sensor service resolve method.

type SavedBookmark

type SavedBookmark struct {
	URL      string
	Bookmark string
	Token    string
}

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

type TailPayload struct {
	Auth     *string
	Stations *string
	Backend  *string
}

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL