Documentation ¶
Index ¶
- Constants
- Variables
- func MakeBadRequest(err error) *goa.ServiceError
- func MakeForbidden(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func MakeStationOwnerConflict(err error) *goa.ServiceError
- func MakeUnauthorized(err error) *goa.ServiceError
- func NewAddEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewAdminSearchEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewDefaultPhotoEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewDeleteEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewDownloadPhotoEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewGetEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewListAllEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewListAssociatedEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewListMineEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewListProjectAssociatedEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewListProjectEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewProgressEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewTransferEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewUpdateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewUpdateModuleEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewViewedAssociatedStations(res *AssociatedStations, view string) *stationviews.AssociatedStations
- func NewViewedDownloadedPhoto(res *DownloadedPhoto, view string) *stationviews.DownloadedPhoto
- func NewViewedPageOfStations(res *PageOfStations, view string) *stationviews.PageOfStations
- func NewViewedStationFull(res *StationFull, view string) *stationviews.StationFull
- func NewViewedStationProgress(res *StationProgress, view string) *stationviews.StationProgress
- func NewViewedStationsFull(res *StationsFull, view string) *stationviews.StationsFull
- type AddPayload
- type AdminSearchPayload
- type AssociatedStation
- type AssociatedStationCollection
- type AssociatedStations
- type AssociatedViaLocation
- type AssociatedViaManual
- type AssociatedViaProject
- type Auther
- type Client
- func (c *Client) Add(ctx context.Context, p *AddPayload) (res *StationFull, err error)
- func (c *Client) AdminSearch(ctx context.Context, p *AdminSearchPayload) (res *PageOfStations, err error)
- func (c *Client) DefaultPhoto(ctx context.Context, p *DefaultPhotoPayload) (err error)
- func (c *Client) Delete(ctx context.Context, p *DeletePayload) (err error)
- func (c *Client) DownloadPhoto(ctx context.Context, p *DownloadPhotoPayload) (res *DownloadedPhoto, err error)
- func (c *Client) Get(ctx context.Context, p *GetPayload) (res *StationFull, err error)
- func (c *Client) ListAll(ctx context.Context, p *ListAllPayload) (res *PageOfStations, err error)
- func (c *Client) ListAssociated(ctx context.Context, p *ListAssociatedPayload) (res *AssociatedStations, err error)
- func (c *Client) ListMine(ctx context.Context, p *ListMinePayload) (res *StationsFull, err error)
- func (c *Client) ListProject(ctx context.Context, p *ListProjectPayload) (res *StationsFull, err error)
- func (c *Client) ListProjectAssociated(ctx context.Context, p *ListProjectAssociatedPayload) (res *AssociatedStations, err error)
- func (c *Client) Progress(ctx context.Context, p *ProgressPayload) (res *StationProgress, err error)
- func (c *Client) Transfer(ctx context.Context, p *TransferPayload) (err error)
- func (c *Client) Update(ctx context.Context, p *UpdatePayload) (res *StationFull, err error)
- func (c *Client) UpdateModule(ctx context.Context, p *UpdateModulePayload) (res *StationFull, err error)
- type DefaultPhotoPayload
- type DeletePayload
- type DownloadPhotoPayload
- type DownloadedPhoto
- type Endpoints
- type EssentialStation
- type GetPayload
- type ListAllPayload
- type ListAssociatedPayload
- type ListMinePayload
- type ListProjectAssociatedPayload
- type ListProjectPayload
- type PageOfStations
- type ProgressPayload
- type SensorRange
- type SensorReading
- type Service
- type StationConfiguration
- type StationConfigurations
- type StationDataSummary
- type StationFull
- type StationFullCollection
- type StationFullModel
- type StationInterestingness
- type StationInterestingnessWindow
- type StationJob
- type StationLocation
- type StationModule
- type StationOwner
- type StationPhotos
- type StationProgress
- type StationProjectAttribute
- type StationProjectAttributes
- type StationRegion
- type StationSensor
- type StationUpload
- type StationsFull
- type TransferPayload
- type UpdateModulePayload
- type UpdatePayload
- type UserPhoto
Constants ¶
const ServiceName = "station"
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 = [15]string{"add", "get", "transfer", "default photo", "update", "list mine", "list project", "list associated", "list project associated", "download photo", "list all", "delete", "admin search", "progress", "update module"}
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 MakeStationOwnerConflict ¶
func MakeStationOwnerConflict(err error) *goa.ServiceError
MakeStationOwnerConflict builds a goa.ServiceError from an error.
func MakeUnauthorized ¶
func MakeUnauthorized(err error) *goa.ServiceError
MakeUnauthorized builds a goa.ServiceError from an error.
func NewAddEndpoint ¶
func NewAddEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewAddEndpoint returns an endpoint function that calls the method "add" of service "station".
func NewAdminSearchEndpoint ¶
func NewAdminSearchEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewAdminSearchEndpoint returns an endpoint function that calls the method "admin search" of service "station".
func NewDefaultPhotoEndpoint ¶
func NewDefaultPhotoEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDefaultPhotoEndpoint returns an endpoint function that calls the method "default photo" of service "station".
func NewDeleteEndpoint ¶
func NewDeleteEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDeleteEndpoint returns an endpoint function that calls the method "delete" of service "station".
func NewDownloadPhotoEndpoint ¶
func NewDownloadPhotoEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDownloadPhotoEndpoint returns an endpoint function that calls the method "download photo" of service "station".
func NewGetEndpoint ¶
func NewGetEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewGetEndpoint returns an endpoint function that calls the method "get" of service "station".
func NewListAllEndpoint ¶
func NewListAllEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewListAllEndpoint returns an endpoint function that calls the method "list all" of service "station".
func NewListAssociatedEndpoint ¶
func NewListAssociatedEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewListAssociatedEndpoint returns an endpoint function that calls the method "list associated" of service "station".
func NewListMineEndpoint ¶
func NewListMineEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewListMineEndpoint returns an endpoint function that calls the method "list mine" of service "station".
func NewListProjectAssociatedEndpoint ¶
func NewListProjectAssociatedEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewListProjectAssociatedEndpoint returns an endpoint function that calls the method "list project associated" of service "station".
func NewListProjectEndpoint ¶
func NewListProjectEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewListProjectEndpoint returns an endpoint function that calls the method "list project" of service "station".
func NewProgressEndpoint ¶
func NewProgressEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewProgressEndpoint returns an endpoint function that calls the method "progress" of service "station".
func NewTransferEndpoint ¶
func NewTransferEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewTransferEndpoint returns an endpoint function that calls the method "transfer" of service "station".
func NewUpdateEndpoint ¶
func NewUpdateEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewUpdateEndpoint returns an endpoint function that calls the method "update" of service "station".
func NewUpdateModuleEndpoint ¶
func NewUpdateModuleEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewUpdateModuleEndpoint returns an endpoint function that calls the method "update module" of service "station".
func NewViewedAssociatedStations ¶
func NewViewedAssociatedStations(res *AssociatedStations, view string) *stationviews.AssociatedStations
NewViewedAssociatedStations initializes viewed result type AssociatedStations from result type AssociatedStations using the given view.
func NewViewedDownloadedPhoto ¶
func NewViewedDownloadedPhoto(res *DownloadedPhoto, view string) *stationviews.DownloadedPhoto
NewViewedDownloadedPhoto initializes viewed result type DownloadedPhoto from result type DownloadedPhoto using the given view.
func NewViewedPageOfStations ¶
func NewViewedPageOfStations(res *PageOfStations, view string) *stationviews.PageOfStations
NewViewedPageOfStations initializes viewed result type PageOfStations from result type PageOfStations using the given view.
func NewViewedStationFull ¶
func NewViewedStationFull(res *StationFull, view string) *stationviews.StationFull
NewViewedStationFull initializes viewed result type StationFull from result type StationFull using the given view.
func NewViewedStationProgress ¶
func NewViewedStationProgress(res *StationProgress, view string) *stationviews.StationProgress
NewViewedStationProgress initializes viewed result type StationProgress from result type StationProgress using the given view.
func NewViewedStationsFull ¶
func NewViewedStationsFull(res *StationsFull, view string) *stationviews.StationsFull
NewViewedStationsFull initializes viewed result type StationsFull from result type StationsFull using the given view.
Types ¶
type AddPayload ¶
type AddPayload struct { Auth string Name string DeviceID string LocationName *string StatusPb *string Description *string }
AddPayload is the payload type of the station service add method.
type AdminSearchPayload ¶
AdminSearchPayload is the payload type of the station service admin search method.
type AssociatedStation ¶
type AssociatedStation struct { Station *StationFull Project []*AssociatedViaProject Location []*AssociatedViaLocation Manual []*AssociatedViaManual Hidden bool }
type AssociatedStationCollection ¶
type AssociatedStationCollection []*AssociatedStation
type AssociatedStations ¶
type AssociatedStations struct {
Stations AssociatedStationCollection
}
AssociatedStations is the result type of the station service list associated method.
func NewAssociatedStations ¶
func NewAssociatedStations(vres *stationviews.AssociatedStations) *AssociatedStations
NewAssociatedStations initializes result type AssociatedStations from viewed result type AssociatedStations.
type AssociatedViaLocation ¶
type AssociatedViaManual ¶
type AssociatedViaProject ¶
type AssociatedViaProject struct {
ID int32
}
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 { AddEndpoint goa.Endpoint GetEndpoint goa.Endpoint TransferEndpoint goa.Endpoint DefaultPhotoEndpoint goa.Endpoint UpdateEndpoint goa.Endpoint ListMineEndpoint goa.Endpoint ListProjectEndpoint goa.Endpoint ListAssociatedEndpoint goa.Endpoint ListProjectAssociatedEndpoint goa.Endpoint DownloadPhotoEndpoint goa.Endpoint ListAllEndpoint goa.Endpoint DeleteEndpoint goa.Endpoint AdminSearchEndpoint goa.Endpoint ProgressEndpoint goa.Endpoint UpdateModuleEndpoint goa.Endpoint }
Client is the "station" service client.
func NewClient ¶
func NewClient(add, get, transfer, defaultPhoto, update, listMine, listProject, listAssociated, listProjectAssociated, downloadPhoto, listAll, delete_, adminSearch, progress, updateModule goa.Endpoint) *Client
NewClient initializes a "station" service client given the endpoints.
func (*Client) Add ¶
func (c *Client) Add(ctx context.Context, p *AddPayload) (res *StationFull, err error)
Add calls the "add" endpoint of the "station" service.
func (*Client) AdminSearch ¶
func (c *Client) AdminSearch(ctx context.Context, p *AdminSearchPayload) (res *PageOfStations, err error)
AdminSearch calls the "admin search" endpoint of the "station" service.
func (*Client) DefaultPhoto ¶
func (c *Client) DefaultPhoto(ctx context.Context, p *DefaultPhotoPayload) (err error)
DefaultPhoto calls the "default photo" endpoint of the "station" service.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, p *DeletePayload) (err error)
Delete calls the "delete" endpoint of the "station" service.
func (*Client) DownloadPhoto ¶
func (c *Client) DownloadPhoto(ctx context.Context, p *DownloadPhotoPayload) (res *DownloadedPhoto, err error)
DownloadPhoto calls the "download photo" endpoint of the "station" service.
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, p *GetPayload) (res *StationFull, err error)
Get calls the "get" endpoint of the "station" service.
func (*Client) ListAll ¶
func (c *Client) ListAll(ctx context.Context, p *ListAllPayload) (res *PageOfStations, err error)
ListAll calls the "list all" endpoint of the "station" service.
func (*Client) ListAssociated ¶
func (c *Client) ListAssociated(ctx context.Context, p *ListAssociatedPayload) (res *AssociatedStations, err error)
ListAssociated calls the "list associated" endpoint of the "station" service.
func (*Client) ListMine ¶
func (c *Client) ListMine(ctx context.Context, p *ListMinePayload) (res *StationsFull, err error)
ListMine calls the "list mine" endpoint of the "station" service.
func (*Client) ListProject ¶
func (c *Client) ListProject(ctx context.Context, p *ListProjectPayload) (res *StationsFull, err error)
ListProject calls the "list project" endpoint of the "station" service.
func (*Client) ListProjectAssociated ¶
func (c *Client) ListProjectAssociated(ctx context.Context, p *ListProjectAssociatedPayload) (res *AssociatedStations, err error)
ListProjectAssociated calls the "list project associated" endpoint of the "station" service.
func (*Client) Progress ¶
func (c *Client) Progress(ctx context.Context, p *ProgressPayload) (res *StationProgress, err error)
Progress calls the "progress" endpoint of the "station" service.
func (*Client) Transfer ¶
func (c *Client) Transfer(ctx context.Context, p *TransferPayload) (err error)
Transfer calls the "transfer" endpoint of the "station" service.
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, p *UpdatePayload) (res *StationFull, err error)
Update calls the "update" endpoint of the "station" service.
func (*Client) UpdateModule ¶
func (c *Client) UpdateModule(ctx context.Context, p *UpdateModulePayload) (res *StationFull, err error)
UpdateModule calls the "update module" endpoint of the "station" service.
type DefaultPhotoPayload ¶
DefaultPhotoPayload is the payload type of the station service default photo method.
type DeletePayload ¶
DeletePayload is the payload type of the station service delete method.
type DownloadPhotoPayload ¶
DownloadPhotoPayload is the payload type of the station service download photo method.
type DownloadedPhoto ¶
DownloadedPhoto is the result type of the station service download photo method.
func NewDownloadedPhoto ¶
func NewDownloadedPhoto(vres *stationviews.DownloadedPhoto) *DownloadedPhoto
NewDownloadedPhoto initializes result type DownloadedPhoto from viewed result type DownloadedPhoto.
type Endpoints ¶
type Endpoints struct { Add goa.Endpoint Get goa.Endpoint Transfer goa.Endpoint DefaultPhoto goa.Endpoint Update goa.Endpoint ListMine goa.Endpoint ListProject goa.Endpoint ListAssociated goa.Endpoint ListProjectAssociated goa.Endpoint DownloadPhoto goa.Endpoint ListAll goa.Endpoint Delete goa.Endpoint AdminSearch goa.Endpoint Progress goa.Endpoint UpdateModule goa.Endpoint }
Endpoints wraps the "station" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "station" service with endpoints.
type EssentialStation ¶
type GetPayload ¶
GetPayload is the payload type of the station service get method.
type ListAllPayload ¶
type ListAllPayload struct { Auth string Page *int32 PageSize *int32 OwnerID *int32 Query *string SortBy *string }
ListAllPayload is the payload type of the station service list all method.
type ListAssociatedPayload ¶
ListAssociatedPayload is the payload type of the station service list associated method.
type ListMinePayload ¶
type ListMinePayload struct {
Auth string
}
ListMinePayload is the payload type of the station service list mine method.
type ListProjectAssociatedPayload ¶
ListProjectAssociatedPayload is the payload type of the station service list project associated method.
type ListProjectPayload ¶
ListProjectPayload is the payload type of the station service list project method.
type PageOfStations ¶
type PageOfStations struct { Stations []*EssentialStation Total int32 }
PageOfStations is the result type of the station service list all method.
func NewPageOfStations ¶
func NewPageOfStations(vres *stationviews.PageOfStations) *PageOfStations
NewPageOfStations initializes result type PageOfStations from viewed result type PageOfStations.
type ProgressPayload ¶
ProgressPayload is the payload type of the station service progress method.
type SensorRange ¶
type SensorReading ¶
type Service ¶
type Service interface { // Add implements add. Add(context.Context, *AddPayload) (res *StationFull, err error) // Get implements get. Get(context.Context, *GetPayload) (res *StationFull, err error) // Transfer implements transfer. Transfer(context.Context, *TransferPayload) (err error) // DefaultPhoto implements default photo. DefaultPhoto(context.Context, *DefaultPhotoPayload) (err error) // Update implements update. Update(context.Context, *UpdatePayload) (res *StationFull, err error) // ListMine implements list mine. ListMine(context.Context, *ListMinePayload) (res *StationsFull, err error) // ListProject implements list project. ListProject(context.Context, *ListProjectPayload) (res *StationsFull, err error) // ListAssociated implements list associated. ListAssociated(context.Context, *ListAssociatedPayload) (res *AssociatedStations, err error) // ListProjectAssociated implements list project associated. ListProjectAssociated(context.Context, *ListProjectAssociatedPayload) (res *AssociatedStations, err error) // DownloadPhoto implements download photo. DownloadPhoto(context.Context, *DownloadPhotoPayload) (res *DownloadedPhoto, err error) // ListAll implements list all. ListAll(context.Context, *ListAllPayload) (res *PageOfStations, err error) // Delete implements delete. Delete(context.Context, *DeletePayload) (err error) // AdminSearch implements admin search. AdminSearch(context.Context, *AdminSearchPayload) (res *PageOfStations, err error) // Progress implements progress. Progress(context.Context, *ProgressPayload) (res *StationProgress, err error) // UpdateModule implements update module. UpdateModule(context.Context, *UpdateModulePayload) (res *StationFull, err error) }
Service is the station service interface.
type StationConfiguration ¶
type StationConfigurations ¶
type StationConfigurations struct {
All []*StationConfiguration
}
type StationDataSummary ¶
type StationFull ¶
type StationFull struct { ID int32 Name string Model *StationFullModel Owner *StationOwner DeviceID string Interestingness *StationInterestingness Attributes *StationProjectAttributes Uploads []*StationUpload Photos *StationPhotos ReadOnly bool Status *string Hidden *bool Description *string Battery *float32 RecordingStartedAt *int64 MemoryUsed *int32 MemoryAvailable *int32 FirmwareNumber *int32 FirmwareTime *int64 Configurations *StationConfigurations UpdatedAt int64 LastReadingAt *int64 LocationName *string PlaceNameOther *string PlaceNameNative *string Location *StationLocation SyncedAt *int64 IngestionAt *int64 Data *StationDataSummary }
StationFull is the result type of the station service add method.
func NewStationFull ¶
func NewStationFull(vres *stationviews.StationFull) *StationFull
NewStationFull initializes result type StationFull from viewed result type StationFull.
type StationFullCollection ¶
type StationFullCollection []*StationFull
type StationFullModel ¶
type StationInterestingness ¶
type StationInterestingness struct {
Windows []*StationInterestingnessWindow
}
type StationJob ¶
type StationLocation ¶
type StationLocation struct { Precise []float64 Regions []*StationRegion URL *string }
type StationModule ¶
type StationOwner ¶
type StationPhotos ¶
type StationPhotos struct {
Small string
}
type StationProgress ¶
type StationProgress struct {
Jobs []*StationJob
}
StationProgress is the result type of the station service progress method.
func NewStationProgress ¶
func NewStationProgress(vres *stationviews.StationProgress) *StationProgress
NewStationProgress initializes result type StationProgress from viewed result type StationProgress.
type StationProjectAttribute ¶
type StationProjectAttributes ¶
type StationProjectAttributes struct {
Attributes []*StationProjectAttribute
}
type StationRegion ¶
type StationSensor ¶
type StationSensor struct { Name string UnitOfMeasure string Reading *SensorReading Key string FullKey string Ranges []*SensorRange Meta map[string]interface{} }
type StationUpload ¶
type StationsFull ¶
type StationsFull struct {
Stations StationFullCollection
}
StationsFull is the result type of the station service list mine method.
func NewStationsFull ¶
func NewStationsFull(vres *stationviews.StationsFull) *StationsFull
NewStationsFull initializes result type StationsFull from viewed result type StationsFull.
type TransferPayload ¶
TransferPayload is the payload type of the station service transfer method.
type UpdateModulePayload ¶
UpdateModulePayload is the payload type of the station service update module method.