handlers

package
v0.0.0-...-e6e7638 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORS

func CORS(w http.ResponseWriter, r *http.Request)

func DeployLatestDishyDashboard

func DeployLatestDishyDashboard(w http.ResponseWriter, r *http.Request)

func DeployLatestPublicDashboards

func DeployLatestPublicDashboards(w http.ResponseWriter, r *http.Request)

func DishyFromTokenContext

func DishyFromTokenContext(r *http.Request) *dishytypes.Dishy

func Healthz

func Healthz(w http.ResponseWriter, r *http.Request)

Healthz route is UNAUTHENTICATED

func JSON

func JSON(w http.ResponseWriter, code int, payload interface{})

func ListDishies

func ListDishies(w http.ResponseWriter, r *http.Request)

func RequireValidInternalAuthQuietMiddleware

func RequireValidInternalAuthQuietMiddleware(next http.Handler) http.Handler

func RequireValidTokenQuietMiddleware

func RequireValidTokenQuietMiddleware(next http.Handler) http.Handler

func StoreData

func StoreData(w http.ResponseWriter, r *http.Request)

func StoreSpeed

func StoreSpeed(w http.ResponseWriter, r *http.Request)

func StreamJSON

func StreamJSON(c *websocket.Conn, payload interface{})

func Subscribe

func Subscribe(w http.ResponseWriter, r *http.Request)

func WhoAmI

func WhoAmI(w http.ResponseWriter, r *http.Request)

Types

type DeployLatestDishyDashboardResponse

type DeployLatestDishyDashboardResponse struct {
	Error string `json:"error,omitempty"`
}

type DeployLatestPublicDashboardsResponse

type DeployLatestPublicDashboardsResponse struct {
	Error string `json:"error,omitempty"`
}

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type HealthzResponse

type HealthzResponse struct {
	Version string         `json:"version"`
	GitSHA  string         `json:"gitSha"`
	Status  StatusResponse `json:"status"`
}

type ListDishiesResponse

type ListDishiesResponse struct {
	Dishies []*dishytypes.DishyWithStats `json:"dishies"`
	Error   string                       `json:"error,omitempty"`
}

type StatusResponse

type StatusResponse struct {
}

type StoreDataRequest

type StoreDataRequest struct {
	When   string                 `json:"when"`
	Status StoreDataStatusRequest `json:"status"`
}

type StoreDataResponse

type StoreDataResponse struct {
	Error string `json:"error,omitempty"`
}

type StoreDataStatusDeviceInfoRequest

type StoreDataStatusDeviceInfoRequest struct {
	HardwareVersion string `json:"hardwareVersion"`
	SoftwareVersion string `json:"softwareVersion"`
}

type StoreDataStatusDeviceStateRequest

type StoreDataStatusDeviceStateRequest struct {
	UptimeSeconds int `json:"uptimeSeconds"`
}

type StoreDataStatusRequest

type StoreDataStatusRequest struct {
	DeviceInfo            StoreDataStatusDeviceInfoRequest  `json:"deviceInfo"`
	DeviceState           StoreDataStatusDeviceStateRequest `json:"deviceState"`
	SNR                   float64                           `json:"snr"`
	DownlinkThroughputBps float64                           `json:"downlinkThroughputBps"`
	UplinkThroughputBps   float64                           `json:"uplinkThroughputBps"`
	PopPingLatencyMs      float64                           `json:"popPingLatencyMs"`
	PopPingDropRate       float64                           `json:"popPingDropRate"`
	PercentObstructed     float64                           `json:"percentObstructed"`
	SecondsObstructed     float64                           `json:"secondsObstructed"`
}

type StoreSpeedRequest

type StoreSpeedRequest struct {
	When            string                 `json:"when"`
	Speed           StoreSpeedSpeedRequest `json:"speed"`
	SoftwareVersion string                 `json:"softwareVersion"`
	HardwareVersion string                 `json:"hardwareVersion"`
}

type StoreSpeedResponse

type StoreSpeedResponse struct {
	Error string `json:"error,omitempty"`
}

type StoreSpeedSpeedRequest

type StoreSpeedSpeedRequest struct {
	Download float64 `json:"download"`
	Upload   float64 `json:"upload"`
}

type SubscribeRequest

type SubscribeRequest struct {
	EmailAddress string `json:"emailAddress"`
}

type SubscribeResponse

type SubscribeResponse struct {
	Error string `json:"error,omitempty"`
}

type WhoAmIResponse

type WhoAmIResponse struct {
	Error string          `json:"error,omitempty"`
	User  *usertypes.User `json:"user,omitempty"`
}

Jump to

Keyboard shortcuts

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