handlers

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddProjectMemberRole

func AddProjectMemberRole(db *sqlx.DB) echo.HandlerFunc

func AddTimeseriesToCollectionGroup

func AddTimeseriesToCollectionGroup(db *sqlx.DB) echo.HandlerFunc

AddTimeseriesToCollectionGroup adds a timeseries from a collection group

func AllTimeseriesWithMeasurements added in v1.5.1

func AllTimeseriesWithMeasurements(db *sqlx.DB) echo.HandlerFunc

This is an endpoint for debugging at this time

func CreateCalculation added in v1.4.0

func CreateCalculation(db *sqlx.DB) echo.HandlerFunc

CreateCalculation creates a calculation.

Parameters: - Body should be a calculation model in the database.

func CreateCollectionGroup

func CreateCollectionGroup(db *sqlx.DB) echo.HandlerFunc

CreateCollectionGroup creates a new collection group

func CreateInstrumentAlertConfigs

func CreateInstrumentAlertConfigs(db *sqlx.DB) echo.HandlerFunc

CreateInstrumentAlertConfigs creates one or more alerts

func CreateInstrumentConstants

func CreateInstrumentConstants(db *sqlx.DB) echo.HandlerFunc

CreateInstrumentConstants creates instrument constants (i.e. timeseries)

func CreateInstrumentGroup

func CreateInstrumentGroup(db *sqlx.DB) echo.HandlerFunc

CreateInstrumentGroup accepts an array of instruments for bulk upload to the database

func CreateInstrumentGroupInstruments

func CreateInstrumentGroupInstruments(db *sqlx.DB) echo.HandlerFunc

CreateInstrumentGroupInstruments adds an instrument to an instrument group

func CreateInstrumentNote

func CreateInstrumentNote(db *sqlx.DB) echo.HandlerFunc

CreateInstrumentNote creates instrument notes

func CreateInstruments

func CreateInstruments(db *sqlx.DB) echo.HandlerFunc

CreateInstruments accepts an array of instruments for bulk upload to the database

func CreateOrUpdateDataLoggerMeasurements added in v1.5.2

func CreateOrUpdateDataLoggerMeasurements(db *sqlx.DB) echo.HandlerFunc

func CreateOrUpdateInstrumentStatus

func CreateOrUpdateInstrumentStatus(db *sqlx.DB) echo.HandlerFunc

CreateOrUpdateInstrumentStatus creates a Status for an instrument

func CreateOrUpdateProjectInclinometerMeasurements

func CreateOrUpdateProjectInclinometerMeasurements(db *sqlx.DB) echo.HandlerFunc

CreateOrUpdateProjectInclinometerMeasurements Creates or Updates a InclinometerMeasurement object or array of objects All timeseries must belong to the same project

func CreateOrUpdateProjectTimeseriesMeasurements

func CreateOrUpdateProjectTimeseriesMeasurements(db *sqlx.DB) echo.HandlerFunc

CreateOrUpdateProjectTimeseriesMeasurements Creates or Updates a TimeseriesMeasurement object or array of objects All timeseries must belong to the same project

func CreateOrUpdateTimeseriesMeasurements

func CreateOrUpdateTimeseriesMeasurements(db *sqlx.DB) echo.HandlerFunc

CreateOrUpdateTimeseriesMeasurements Creates or Updates a TimeseriesMeasurement object or array of objects Timeseries may belong to one or more projects

func CreatePlotConfiguration

func CreatePlotConfiguration(db *sqlx.DB) echo.HandlerFunc

CreatePlotConfiguration add plot configuration for a project

func CreateProfile

func CreateProfile(db *sqlx.DB) echo.HandlerFunc

CreateProfile creates a user profile

func CreateProjectBulk

func CreateProjectBulk(db *sqlx.DB) echo.HandlerFunc

CreateProjectBulk accepts an array of instruments for bulk upload to the database

func CreateProjectTimeseries

func CreateProjectTimeseries(db *sqlx.DB) echo.HandlerFunc

CreateProjectTimeseries exposes a timeseries at the project level

func CreateTimeseries

func CreateTimeseries(db *sqlx.DB) echo.HandlerFunc

CreateTimeseries accepts a timeseries object or array of timeseries objects Can handle objects with or without TimeseriesMeasurements

func CreateToken

func CreateToken(db *sqlx.DB) echo.HandlerFunc

CreateToken returns a list of all products

func DeleteCalculation added in v1.4.0

func DeleteCalculation(db *sqlx.DB) echo.HandlerFunc

DeleteCalculation deletes a calculation.

Parameters: - `formula_id` should refer to the ID of a calculation in the database.

func DeleteCollectionGroup

func DeleteCollectionGroup(db *sqlx.DB) echo.HandlerFunc

DeleteCollectionGroup deletes a collection group using the id of the collection group

func DeleteFlagInstrument

func DeleteFlagInstrument(db *sqlx.DB) echo.HandlerFunc

DeleteFlagInstrument changes deleted flag true for an instrument

func DeleteFlagInstrumentGroup

func DeleteFlagInstrumentGroup(db *sqlx.DB) echo.HandlerFunc

DeleteFlagInstrumentGroup sets the instrument group deleted flag true

func DeleteFlagProject

func DeleteFlagProject(db *sqlx.DB) echo.HandlerFunc

DeleteFlagProject sets the instrument group deleted flag true

func DeleteInclinometerMeasurements

func DeleteInclinometerMeasurements(db *sqlx.DB) echo.HandlerFunc

DeleteInclinometerMeasurements deletes a single inclinometer measurement

func DeleteInstrumentAlertConfig

func DeleteInstrumentAlertConfig(db *sqlx.DB) echo.HandlerFunc

DeleteInstrumentAlertConfig Deletes an Alert

func DeleteInstrumentConstant

func DeleteInstrumentConstant(db *sqlx.DB) echo.HandlerFunc

DeleteInstrumentConstant removes a timeseries as an Instrument Constant

func DeleteInstrumentGroupInstruments

func DeleteInstrumentGroupInstruments(db *sqlx.DB) echo.HandlerFunc

DeleteInstrumentGroupInstruments removes an instrument from an instrument group

func DeleteInstrumentNote

func DeleteInstrumentNote(db *sqlx.DB) echo.HandlerFunc

DeleteInstrumentNote deletes an instrument note

func DeleteInstrumentStatus

func DeleteInstrumentStatus(db *sqlx.DB) echo.HandlerFunc

DeleteInstrumentStatus deletes a Status for an instrument

func DeletePlotConfiguration

func DeletePlotConfiguration(db *sqlx.DB) echo.HandlerFunc

DeletePlotConfiguration delete plot configuration for a project

func DeleteProjectTimeseries

func DeleteProjectTimeseries(db *sqlx.DB) echo.HandlerFunc

DeleteProjectTimeseries removes a timeseries from the project level

func DeleteTimeserieMeasurements

func DeleteTimeserieMeasurements(db *sqlx.DB) echo.HandlerFunc

DeleteTimeserieMeasurements deletes a single timeseries measurement

func DeleteTimeseries

func DeleteTimeseries(db *sqlx.DB) echo.HandlerFunc

DeleteTimeseries deletes a single timeseries

func DeleteToken

func DeleteToken(db *sqlx.DB) echo.HandlerFunc

DeleteToken deletes a token

func DoAlertRead

func DoAlertRead(db *sqlx.DB) echo.HandlerFunc

DoAlertRead marks an alert as read for a profile

func DoAlertUnread

func DoAlertUnread(db *sqlx.DB) echo.HandlerFunc

DoAlertUnread marks an alert as unread for a profile

func DoHeartbeat

func DoHeartbeat(db *sqlx.DB) echo.HandlerFunc

DoHeartbeat triggers regular-interval tasks

func GetAlertConfig

func GetAlertConfig(db *sqlx.DB) echo.HandlerFunc

GetAlertConfig gets a single alert

func GetCollectionGroupDetails

func GetCollectionGroupDetails(db *sqlx.DB) echo.HandlerFunc

GetCollectionGroupDetails gets all data needed to render collection group form

func GetDomains

func GetDomains(db *sqlx.DB) echo.HandlerFunc

GetDomains returns all database domains in a single endpoint

func GetHome

func GetHome(db *sqlx.DB) echo.HandlerFunc

GetHome returns information for the homepage

func GetInstrument

func GetInstrument(db *sqlx.DB) echo.HandlerFunc

GetInstrument returns a single instrument

func GetInstrumentCalculations added in v1.4.0

func GetInstrumentCalculations(db *sqlx.DB) echo.HandlerFunc

GetInstrumentCalculations retrieves an array of `Calculation`s associated with a particular instrument ID.

Query Parameters: - `instrument_id`: string

func GetInstrumentCount

func GetInstrumentCount(db *sqlx.DB) echo.HandlerFunc

GetInstrumentCount returns the total number of non deleted instruments in the system

func GetInstrumentGroup

func GetInstrumentGroup(db *sqlx.DB) echo.HandlerFunc

GetInstrumentGroup returns single instrument group

func GetInstrumentNote

func GetInstrumentNote(db *sqlx.DB) echo.HandlerFunc

GetInstrumentNote returns a single instrument note

func GetInstrumentStatus

func GetInstrumentStatus(db *sqlx.DB) echo.HandlerFunc

GetInstrumentStatus returns a single Status

func GetLatestHeartbeat

func GetLatestHeartbeat(db *sqlx.DB) echo.HandlerFunc

GetLatestHeartbeat returns the latest heartbeat entry

func GetMedia

func GetMedia(awsCfg *aws.Config, bucket *string, bucketPrefix string, routePrefix *string) echo.HandlerFunc

GetMedia serves media, files, etc for a given project

func GetMyProfile

func GetMyProfile(db *sqlx.DB) echo.HandlerFunc

GetMyProfile returns profile for current authenticated user or 404

func GetPlotConfiguration

func GetPlotConfiguration(db *sqlx.DB) echo.HandlerFunc

GetPlotConfiguration returns single instrument group

func GetProject

func GetProject(db *sqlx.DB) echo.HandlerFunc

GetProject returns single project

func GetProjectCount

func GetProjectCount(db *sqlx.DB) echo.HandlerFunc

GetProjectCount returns the total number of non deleted projects in the system

func GetTimeseries

func GetTimeseries(db *sqlx.DB) echo.HandlerFunc

GetTimeseries returns a single timeseries

func ListAlertsForInstrument

func ListAlertsForInstrument(db *sqlx.DB) echo.HandlerFunc

ListAlertsForInstrument lists alerts for a single instrument

func ListAwareParameters

func ListAwareParameters(db *sqlx.DB) echo.HandlerFunc

func ListAwarePlatformParameterConfig

func ListAwarePlatformParameterConfig(db *sqlx.DB) echo.HandlerFunc

func ListCollectionGroups

func ListCollectionGroups(db *sqlx.DB) echo.HandlerFunc

ListCollectionGroups returns instrument groups

func ListEmailAutocomplete

func ListEmailAutocomplete(db *sqlx.DB) echo.HandlerFunc

ListEmailAutocomplete lists results of email autocomplete

func ListHeartbeats

func ListHeartbeats(db *sqlx.DB) echo.HandlerFunc

ListHeartbeats returns all heartbeats

func ListInclinometerMeasurements

func ListInclinometerMeasurements(db *sqlx.DB) echo.HandlerFunc

ListInclinometerMeasurements returns a timeseries with inclinometer measurements

func ListInstrumentAlertConfigs

func ListInstrumentAlertConfigs(db *sqlx.DB) echo.HandlerFunc

ListInstrumentAlertConfigs lists alerts for a single instrument

func ListInstrumentConstants

func ListInstrumentConstants(db *sqlx.DB) echo.HandlerFunc

ListInstrumentConstants lists constants for a given instrument

func ListInstrumentGroupInstruments

func ListInstrumentGroupInstruments(db *sqlx.DB) echo.HandlerFunc

ListInstrumentGroupInstruments returns a list of instruments for a provided instrument group

func ListInstrumentGroupTimeseries

func ListInstrumentGroupTimeseries(db *sqlx.DB) echo.HandlerFunc

ListInstrumentGroupTimeseries lists timeseries for instruments in an instrument group

func ListInstrumentGroups

func ListInstrumentGroups(db *sqlx.DB) echo.HandlerFunc

ListInstrumentGroups returns instrument groups

func ListInstrumentInstrumentNotes

func ListInstrumentInstrumentNotes(db *sqlx.DB) echo.HandlerFunc

ListInstrumentInstrumentNotes returns instrument notes for a single instrument

func ListInstrumentNotes

func ListInstrumentNotes(db *sqlx.DB) echo.HandlerFunc

ListInstrumentNotes returns instrument notes

func ListInstrumentStatus

func ListInstrumentStatus(db *sqlx.DB) echo.HandlerFunc

ListInstrumentStatus lists all Status for an instrument

func ListInstrumentTimeseries

func ListInstrumentTimeseries(db *sqlx.DB) echo.HandlerFunc

ListInstrumentTimeseries lists timeseries for an instrument

func ListInstruments

func ListInstruments(db *sqlx.DB) echo.HandlerFunc

ListInstruments returns instruments

func ListMyAlertSubscriptions

func ListMyAlertSubscriptions(db *sqlx.DB) echo.HandlerFunc

ListMyAlertSubscriptions returns all alerts you are subscribed to and settings

func ListMyAlerts

func ListMyAlerts(db *sqlx.DB) echo.HandlerFunc

ListMyAlerts returns all alerts a profile is subscribed to

func ListMyProjects

func ListMyProjects(db *sqlx.DB) echo.HandlerFunc

func ListOpendcsSites

func ListOpendcsSites(db *sqlx.DB) echo.HandlerFunc

ListOpendcsSites returns all Instruments, represented as Opendcs Sites

func ListPlotConfigurations

func ListPlotConfigurations(db *sqlx.DB) echo.HandlerFunc

ListPlotConfigurations returns plot groups

func ListProjectInstrumentGroups

func ListProjectInstrumentGroups(db *sqlx.DB) echo.HandlerFunc

ListProjectInstrumentGroups returns instrument groups associated with a project

func ListProjectInstrumentNames

func ListProjectInstrumentNames(db *sqlx.DB) echo.HandlerFunc

ListProjectInstrumentNames returns names of all instruments associated with a project

func ListProjectInstruments

func ListProjectInstruments(db *sqlx.DB) echo.HandlerFunc

ListProjectInstruments returns instruments associated with a project

func ListProjectMembers

func ListProjectMembers(db *sqlx.DB) echo.HandlerFunc

ListProjectMembers returns project members and their role information

func ListProjectTimeseries

func ListProjectTimeseries(db *sqlx.DB) echo.HandlerFunc

ListProjectTimeseries lists all timeseries for a single project

func ListProjects

func ListProjects(db *sqlx.DB) echo.HandlerFunc

ListProjects returns projects

func ListTimeseries

func ListTimeseries(db *sqlx.DB) echo.HandlerFunc

ListTimeseries returns an array of timeseries

func ListTimeseriesMeasurements

func ListTimeseriesMeasurements(db *sqlx.DB) echo.HandlerFunc

ListTimeseriesMeasurements returns a timeseries with measurements

func ListUnits

func ListUnits(db *sqlx.DB) echo.HandlerFunc

ListUnits returns an array of timeseries

func PostExplorer

func PostExplorer(db *sqlx.DB) echo.HandlerFunc

PostExplorer retrieves timeseries information for the explorer app component

func PostInclinometerExplorer

func PostInclinometerExplorer(db *sqlx.DB) echo.HandlerFunc

func RemoveProjectMemberRole

func RemoveProjectMemberRole(db *sqlx.DB) echo.HandlerFunc

func RemoveTimeseriesFromCollectionGroup

func RemoveTimeseriesFromCollectionGroup(db *sqlx.DB) echo.HandlerFunc

RemoveTimeseriesFromCollectionGroup removes a timeseries from a collection group

func Search(db *sqlx.DB) echo.HandlerFunc

Search allows searching using a string on different entities

func SubscribeProfileToAlerts

func SubscribeProfileToAlerts(db *sqlx.DB) echo.HandlerFunc

SubscribeProfileToAlerts subscribes a profile to an alert

func UnsubscribeProfileToAlerts

func UnsubscribeProfileToAlerts(db *sqlx.DB) echo.HandlerFunc

UnsubscribeProfileToAlerts unsubscribes a profile to an alert

func UpdateCalculation added in v1.4.0

func UpdateCalculation(db *sqlx.DB) echo.HandlerFunc

UpdateCalculation updates a calculation.

Paramaters: - `formula_id` should refer to the ID of a calculation in the database.

func UpdateCollectionGroup

func UpdateCollectionGroup(db *sqlx.DB) echo.HandlerFunc

UpdateCollectionGroup updates an existing collection group

func UpdateInstrument

func UpdateInstrument(db *sqlx.DB) echo.HandlerFunc

UpdateInstrument modifies an existing instrument

func UpdateInstrumentAlertConfig

func UpdateInstrumentAlertConfig(db *sqlx.DB) echo.HandlerFunc

UpdateInstrumentAlertConfig updates an existing alert

func UpdateInstrumentGeometry

func UpdateInstrumentGeometry(db *sqlx.DB) echo.HandlerFunc

UpdateInstrumentGeometry updates only the geometry property of an instrument

func UpdateInstrumentGroup

func UpdateInstrumentGroup(db *sqlx.DB) echo.HandlerFunc

UpdateInstrumentGroup modifies an existing instrument_group

func UpdateInstrumentNote

func UpdateInstrumentNote(db *sqlx.DB) echo.HandlerFunc

UpdateInstrumentNote updates an instrument note

func UpdateMyAlertSubscription

func UpdateMyAlertSubscription(db *sqlx.DB) echo.HandlerFunc

UpdateMyAlertSubscription updates settings for an alert subscription

func UpdatePlotConfiguration

func UpdatePlotConfiguration(db *sqlx.DB) echo.HandlerFunc

UpdatePlotConfiguration updates a plot configuration for a project

func UpdateProject

func UpdateProject(db *sqlx.DB) echo.HandlerFunc

UpdateProject updates an existing project

func UpdateTimeseries

func UpdateTimeseries(db *sqlx.DB) echo.HandlerFunc

UpdateTimeseries updates a single timeseries

func UpdateTimeseriesMeasurements added in v1.5.1

func UpdateTimeseriesMeasurements(db *sqlx.DB) echo.HandlerFunc

UpdateTimeseriesMeasurements Overwrites measurements with the supplied payload within a TimeWindow (> after, < before)

Types

type ExplorerRow

type ExplorerRow struct {
	InstrumentID uuid.UUID `db:"instrument_id"`
	TimeseriesID uuid.UUID `db:"timeseries_id"`
	ParameterID  uuid.UUID `db:"parameter_id"`
	UnitID       uuid.UUID `db:"unit_id"`
	Time         time.Time `db:"time"`
	Value        float32   `db:"value"`
}

ExplorerRow is used for sql scanning

type Filter

type Filter struct {
	InstrumentID []uuid.UUID
	ParameterID  []uuid.UUID
	TimeWindow   timeseries.TimeWindow
}

Filter encapsulates SQL query filters from a request that are used to build SQL

type Home

type Home struct {
	InstrumentCount     int `json:"instrument_count" db:"instrument_count"`
	InstrumetGroupCount int `json:"instrument_group_count" db:"instrument_group_count"`
	ProjectCount        int `json:"project_count" db:"project_count"`
	NewInstruments7D    int `json:"new_instruments_7d" db:"new_instruments_7d"`
	NewMeasurements2H   int `json:"new_measurements_2h" db:"new_measurements_2h"`
}

Home is information for the homepage (landing page)

Jump to

Keyboard shortcuts

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