http

package
v1.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadTimeseriesDataFileResponse

type DownloadTimeseriesDataFileResponse struct {
	FileID string `json:"file_id"`
}

DownloadTimeseriesDataFileResponse is the response format for DownloadTimeseriesDataFile

type Handler

type Handler struct {
	AllowedOrigins    string
	LogTimeseriesData bool
	Logger            *log.Logger
	Database          internal.Database
}

func (*Handler) DownloadTimeseriesDataFile

func (h *Handler) DownloadTimeseriesDataFile(w http.ResponseWriter, r *http.Request)

DownloadTimeseriesDataFile responds with the timeseries data file, and deletes it after.

func (*Handler) GetTrackActivitiesSetting

func (h *Handler) GetTrackActivitiesSetting(w http.ResponseWriter, r *http.Request)

GetTrackActivitiesSetting retrieves the track_activities postgres setting.

func (*Handler) GetUserTables

func (h *Handler) GetUserTables(w http.ResponseWriter, r *http.Request)

GetUserTables retrieves all the existing user tables (pg_stats_user_tables)

func (*Handler) Handler

func (h *Handler) Handler() http.Handler

Handler sets up the router for APIs

func (*Handler) ListenAndServe

func (h *Handler) ListenAndServe(addr string) error

ListenAndServe is analogous to http.ListenAndServe, blocks and receives incoming requests.

func (*Handler) StartTimeseriesConnection

func (h *Handler) StartTimeseriesConnection(w http.ResponseWriter, r *http.Request)

StartTimeseriesConnection establishes a websocket connection for sending realtime database states in timeseries data

func (*Handler) StartTimeseriesReplayConnection

func (h *Handler) StartTimeseriesReplayConnection(w http.ResponseWriter, r *http.Request)

StartTimeseriesReplayConnection establishes a websocket connection for sending timeseries replay data

func (*Handler) UploadTimeseriesDataFile

func (h *Handler) UploadTimeseriesDataFile(w http.ResponseWriter, r *http.Request)

UploadTimeseriesDataFile persists the temporary file.

type TimeseriesParams

type TimeseriesParams struct {
	Interval  time.Duration
	Relations []string
	SaveAs    string
}

TimeseriesParams specifies the optional parameters for fetching timeseries data.

type TimeseriesReplayParams

type TimeseriesReplayParams struct {
	Interval time.Duration
	FileID   string
}

TimeseriesReplayParams specifies the optional parameters for setting up timeseries replay websocket connection.

Jump to

Keyboard shortcuts

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