aapije

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code    int32  `json:"code"`
	Message string `json:"message"`
}

Error struct

type RestApi

type RestApi struct{}

RestApi is the main REST API structure

func NewRestApi

func NewRestApi() *RestApi

NewRestApi creates a new instance of the REST API

func (*RestApi) AddDataToTimeseries

func (ra *RestApi) AddDataToTimeseries(w http.ResponseWriter, r *http.Request, id rest.UuidParam, p rest.AddDataToTimeseriesParams)

AddDataToTimeseries adds data to a specific time series

func (*RestApi) AddDatasets

func (ra *RestApi) AddDatasets(w http.ResponseWriter, r *http.Request)

AddDatasets adds a new dataset

func (*RestApi) AddGroup

func (ra *RestApi) AddGroup(w http.ResponseWriter, r *http.Request)

AddGroup adds a new group

func (*RestApi) AddNewTokenToUser

func (ra *RestApi) AddNewTokenToUser(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

AddNewTokenToUser creates a new access token for a user

func (*RestApi) AddPolicy

func (ra *RestApi) AddPolicy(w http.ResponseWriter, r *http.Request)

AddPolicy adds a new policy

func (*RestApi) AddProgram

func (ra *RestApi) AddProgram(w http.ResponseWriter, r *http.Request)

AddProgram adds a new program

func (*RestApi) AddProgramCodeRevision

func (ra *RestApi) AddProgramCodeRevision(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

AddProgramCodeRevision adds a new revision of code to a program

func (*RestApi) AddThing

func (ra *RestApi) AddThing(w http.ResponseWriter, r *http.Request)

AddThing adds a new thing

func (*RestApi) AddTimeSeries

func (ra *RestApi) AddTimeSeries(w http.ResponseWriter, r *http.Request)

AddTimeSeries adds a new time series

func (*RestApi) AddUser

func (ra *RestApi) AddUser(w http.ResponseWriter, r *http.Request)

AddUser adds a new user

func (*RestApi) AssembleDatasetPartsByKey

func (ra *RestApi) AssembleDatasetPartsByKey(w http.ResponseWriter, r *http.Request, id rest.UuidParam, p rest.AssembleDatasetPartsByKeyParams)

AssembleDatasetPartsByKey combines all uploaded parts into a new dataset content

func (*RestApi) CreateAlert added in v0.1.2

func (ra *RestApi) CreateAlert(w http.ResponseWriter, r *http.Request)

CreateAlert creates a new alert

func (*RestApi) DeleteAlertByUuid added in v0.1.2

func (ra *RestApi) DeleteAlertByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

DeleteAlertByUuid deletes an alert

func (*RestApi) DeleteDataFromTimeSeries

func (ra *RestApi) DeleteDataFromTimeSeries(w http.ResponseWriter, r *http.Request, id rest.UuidParam, p rest.DeleteDataFromTimeSeriesParams)

DeleteDataFromTimeSeries deletes data from a time series

func (*RestApi) DeleteDatasetByUuid

func (ra *RestApi) DeleteDatasetByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

DeleteDatasetByUuid deletes a dataset by its UUID

func (*RestApi) DeleteDatasetUploadByKey

func (ra *RestApi) DeleteDatasetUploadByKey(w http.ResponseWriter, r *http.Request, id rest.UuidParam, p rest.DeleteDatasetUploadByKeyParams)

DeleteDatasetUploadByKey cancels a partially completed upload

func (*RestApi) DeleteGroupByUuid

func (ra *RestApi) DeleteGroupByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

DeleteGroupByUuid deletes a specific group by its UUID

func (*RestApi) DeletePolicyByUuid

func (ra *RestApi) DeletePolicyByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

DeletePolicyByUuid deletes a specific policy by its UUID

func (*RestApi) DeleteProgramByUuid

func (ra *RestApi) DeleteProgramByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

DeleteProgramByUuid deletes a specific program by its UUID

func (*RestApi) DeleteProgramCodeRevisions

func (ra *RestApi) DeleteProgramCodeRevisions(w http.ResponseWriter, r *http.Request, id rest.UuidParam, revision int)

DeleteProgramCodeRevisions deletes a specific code revision

func (*RestApi) DeleteThingByUuid

func (ra *RestApi) DeleteThingByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

DeleteThingByUuid deletes a specific thing by its UUID

func (*RestApi) DeleteTimeSeriesByUuid

func (ra *RestApi) DeleteTimeSeriesByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

DeleteTimeSeriesByUuid deletes a specific time series by its UUID

func (*RestApi) DeleteTokenForUser

func (ra *RestApi) DeleteTokenForUser(w http.ResponseWriter, r *http.Request, id rest.UuidParam, tokenId string)

DeleteTokenForUser deletes an access token for a user

func (*RestApi) DeleteUserByUuid

func (ra *RestApi) DeleteUserByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

DeleteUserByUuid deletes a specific user by its UUID

func (*RestApi) ExecuteProgramWebhook

func (ra *RestApi) ExecuteProgramWebhook(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

ExecuteProgramWebhook forwards a request to a webhook program

func (*RestApi) FindAlertByUuid added in v0.1.2

func (ra *RestApi) FindAlertByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

FindAlertByUuid gets the content of a specific alert

func (*RestApi) FindAlerts

func (ra *RestApi) FindAlerts(w http.ResponseWriter, r *http.Request, p rest.FindAlertsParams)

FindAlerts lists alerts

func (*RestApi) FindDatasetByUuid

func (ra *RestApi) FindDatasetByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

FindDatasetByUuid returns a specific dataset by its UUID

func (*RestApi) FindDatasets

func (ra *RestApi) FindDatasets(w http.ResponseWriter, r *http.Request, p rest.FindDatasetsParams)

FindDatasets lists all datasets

func (*RestApi) FindDatasetsForThing

func (ra *RestApi) FindDatasetsForThing(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

FindDatasetsForThing Find all datasets belonging to a thing

func (*RestApi) FindGroupByUuid

func (ra *RestApi) FindGroupByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

FindGroupByUuid returns a specific group by its UUID

func (*RestApi) FindGroups

func (ra *RestApi) FindGroups(w http.ResponseWriter, r *http.Request, p rest.FindGroupsParams)

FindGroups lists all groups

func (*RestApi) FindPolicies

func (ra *RestApi) FindPolicies(w http.ResponseWriter, r *http.Request, p rest.FindPoliciesParams)

FindPolicies list all policies

func (*RestApi) FindPoliciesForGroup

func (ra *RestApi) FindPoliciesForGroup(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

FindPoliciesForGroup lists all policies beloning to a specific group

func (*RestApi) FindPoliciesForUser

func (ra *RestApi) FindPoliciesForUser(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

FindPoliciesForUser lists all access policies assigned to a user via groups

func (*RestApi) FindPolicyByUuid

func (ra *RestApi) FindPolicyByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

func (*RestApi) FindProgramByUuid

func (ra *RestApi) FindProgramByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

FindProgramByUuid returns a specific program by its UUID

func (*RestApi) FindPrograms

func (ra *RestApi) FindPrograms(w http.ResponseWriter, r *http.Request, p rest.FindProgramsParams)

FindPrograms lists all programs

func (*RestApi) FindThingByUuid

func (ra *RestApi) FindThingByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

FindThingByUuid returns a specific thing by its UUID

func (*RestApi) FindThings

func (ra *RestApi) FindThings(w http.ResponseWriter, r *http.Request, p rest.FindThingsParams)

FindThings lists all things

func (*RestApi) FindTimeSeries

func (ra *RestApi) FindTimeSeries(w http.ResponseWriter, r *http.Request, p rest.FindTimeSeriesParams)

FindTimeSeries lists all time series

func (*RestApi) FindTimeSeriesByUuid

func (ra *RestApi) FindTimeSeriesByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

FindTimeSeriesByUuid returns a specific time series by its UUID

func (*RestApi) FindTimeSeriesForThing

func (ra *RestApi) FindTimeSeriesForThing(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

FindTimeSeriesForThing lists all time series belonging to a thing

func (*RestApi) FindTokensForUser

func (ra *RestApi) FindTokensForUser(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

FindTokensForUser lists all access tokens for a user

func (*RestApi) FindTsdataByQuery

func (ra *RestApi) FindTsdataByQuery(w http.ResponseWriter, r *http.Request, p rest.FindTsdataByQueryParams)

FindTsdataByQuery query multiple time series for data

func (*RestApi) FindUserByUuid

func (ra *RestApi) FindUserByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

FindUserByUuid returns a specific user by its UUID

func (*RestApi) FindUsers

func (ra *RestApi) FindUsers(w http.ResponseWriter, r *http.Request, p rest.FindUsersParams)

FindUsers lists all users

func (*RestApi) GetCodeFromProgram

func (ra *RestApi) GetCodeFromProgram(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

GetCodeFromProgram returns the newest, signed code for a program

func (*RestApi) GetDB

func (ra *RestApi) GetDB(r *http.Request) (*sql.DB, error)

GetDB gets the DB handle from the request context

func (*RestApi) GetProgramCodeRevisions

func (ra *RestApi) GetProgramCodeRevisions(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

GetProgramCodeRevisions returns all code revisions for a program

func (*RestApi) GetProgramCodeRevisionsDiff

func (ra *RestApi) GetProgramCodeRevisionsDiff(w http.ResponseWriter, r *http.Request, id rest.UuidParam, p rest.GetProgramCodeRevisionsDiffParams)

GetProgramCodeRevisionsDiff returns the difference between two code revisions for a program

func (*RestApi) GetRawDatasetByUuid

func (ra *RestApi) GetRawDatasetByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam, p rest.GetRawDatasetByUuidParams)

GetRawDatasetByUuid gets the "file" content from a dataset by its UUID

func (*RestApi) InitializeDatasetUploadByUuid

func (ra *RestApi) InitializeDatasetUploadByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

InitializeDatasetUploadByUuid initiates the upload of a larger dataset

func (*RestApi) ListDatasetPartsByKey

func (ra *RestApi) ListDatasetPartsByKey(w http.ResponseWriter, r *http.Request, id rest.UuidParam, p rest.ListDatasetPartsByKeyParams)

ListDatasetPartsByKey lists all uploaded parts of the dataset

func (*RestApi) QueryTimeseriesForData

func (ra *RestApi) QueryTimeseriesForData(w http.ResponseWriter, r *http.Request, id rest.UuidParam, p rest.QueryTimeseriesForDataParams)

QueryTimeseriesForData returns data from a specific time series

func (*RestApi) SetRequestRateForUser

func (ra *RestApi) SetRequestRateForUser(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

SetRequestRateForUser sets the allowed request rate for a user

func (*RestApi) SignProgramCodeRevisions

func (ra *RestApi) SignProgramCodeRevisions(w http.ResponseWriter, r *http.Request, id rest.UuidParam, revision int)

SignProgramCodeRevisions signs a specific code revision

func (*RestApi) UpdateAlertByUuid added in v0.1.2

func (ra *RestApi) UpdateAlertByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

UpdateAlertByUuid update an alert with new content

func (*RestApi) UpdateDatasetByUuid

func (ra *RestApi) UpdateDatasetByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

UpdateDatasetByUuid updates a dataset by its UUID

func (*RestApi) UpdateGroupByUuid

func (ra *RestApi) UpdateGroupByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

UpdateGroupByUuid updates a specific group by its UUID

func (*RestApi) UpdatePolicyByUuid

func (ra *RestApi) UpdatePolicyByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

UpdatePolicyByUuid updates a specific policy by its UUID

func (*RestApi) UpdateProgramByUuid

func (ra *RestApi) UpdateProgramByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

UpdateProgramByUuid updates a specific program by its UUID

func (*RestApi) UpdateThingByUuid

func (ra *RestApi) UpdateThingByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

UpdateThingByUuid updates a specific thing by its UUID

func (*RestApi) UpdateTimeseriesByUuid

func (ra *RestApi) UpdateTimeseriesByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

UpdateTimeseriesByUuid updates a specific time series by its UUID

func (*RestApi) UpdateUserByUuid

func (ra *RestApi) UpdateUserByUuid(w http.ResponseWriter, r *http.Request, id rest.UuidParam)

UpdateUserByUuid updates a specific user by its UUID

func (*RestApi) UploadDatasetContentByKey

func (ra *RestApi) UploadDatasetContentByKey(w http.ResponseWriter, r *http.Request, id rest.UuidParam, p rest.UploadDatasetContentByKeyParams)

UploadDatasetContentByKey uploads a (max 5MB) part of a new content update to a dataset

func (*RestApi) Whoami

func (ra *RestApi) Whoami(w http.ResponseWriter, r *http.Request)

Whoami returns the current user

Directories

Path Synopsis
Package rest provides primitives to interact with the openapi HTTP API.
Package rest provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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