data

package
v0.0.0-...-b9360c4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "data"

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 = [1]string{"device summary"}

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 NewDeviceSummaryEndpoint

func NewDeviceSummaryEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint

NewDeviceSummaryEndpoint returns an endpoint function that calls the method "device summary" of service "data".

func NewViewedDeviceDataSummaryResponse

func NewViewedDeviceDataSummaryResponse(res *DeviceDataSummaryResponse, view string) *dataviews.DeviceDataSummaryResponse

NewViewedDeviceDataSummaryResponse initializes viewed result type DeviceDataSummaryResponse from result type DeviceDataSummaryResponse 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

type Client struct {
	DeviceSummaryEndpoint goa.Endpoint
}

Client is the "data" service client.

func NewClient

func NewClient(deviceSummary goa.Endpoint) *Client

NewClient initializes a "data" service client given the endpoints.

func (*Client) DeviceSummary

func (c *Client) DeviceSummary(ctx context.Context, p *DeviceSummaryPayload) (res *DeviceDataSummaryResponse, err error)

DeviceSummary calls the "device summary" endpoint of the "data" service.

type DeviceDataSummary

type DeviceDataSummary struct {
	Size  int64
	First int64
	Last  int64
}

type DeviceDataSummaryResponse

type DeviceDataSummaryResponse struct {
	Provisions DeviceProvisionSummaryCollection
}

DeviceDataSummaryResponse is the result type of the data service device summary method.

func NewDeviceDataSummaryResponse

func NewDeviceDataSummaryResponse(vres *dataviews.DeviceDataSummaryResponse) *DeviceDataSummaryResponse

NewDeviceDataSummaryResponse initializes result type DeviceDataSummaryResponse from viewed result type DeviceDataSummaryResponse.

type DeviceMetaSummary

type DeviceMetaSummary struct {
	Size  int64
	First int64
	Last  int64
}

type DeviceProvisionSummary

type DeviceProvisionSummary struct {
	Generation string
	Created    int64
	Updated    int64
	Meta       *DeviceMetaSummary
	Data       *DeviceDataSummary
}

type DeviceProvisionSummaryCollection

type DeviceProvisionSummaryCollection []*DeviceProvisionSummary

type DeviceSummaryPayload

type DeviceSummaryPayload struct {
	Auth     *string
	DeviceID string
}

DeviceSummaryPayload is the payload type of the data service device summary method.

type Endpoints

type Endpoints struct {
	DeviceSummary goa.Endpoint
}

Endpoints wraps the "data" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

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

func (*Endpoints) Use

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

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

type Service

type Service interface {
	// DeviceSummary implements device summary.
	DeviceSummary(context.Context, *DeviceSummaryPayload) (res *DeviceDataSummaryResponse, err error)
}

Service is the data service interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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