controllers

package
v0.0.0-...-13729b1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForecastHandler

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

Get the first (current) air quality forecast for a specific area

func HistoricalHandler

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

Return historical data for Results: station name, from time, to time, value, unit,

func HistoryHandler

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

func IndexHandler

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

func LiveHandler

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

func NILUAqiHandler

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

func PostFileHandler

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

func PrecipitationHandler

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

func ResourcesHandler

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

func StudentAqisHandler

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

func StudentHandler

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

func UploadHandler

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

func ValidateFileHandler

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

Types

type FileInfo

type FileInfo struct {
	Filename    string
	Size        int64
	ContentType string
	Contents    string
}

type Measurement

type Measurement struct {
	Latitude    float64
	Longitude   float64
	PmTen       float64
	PmTwoFive   float64
	Humidity    float64
	Temperature float64
	Date        string `json:"Timestamp"`
}

type PostResponse

type PostResponse struct {
	StatusCode int
	Filename   string
}

type Record

type Record struct {
	Id         string      `json:"id"`
	Type       string      `json:"type"`
	Attributes Measurement `json:"attributes"`
}

type Result

type Result struct {
	Data []Record `json:"data"`
}

type StudentFilter

type StudentFilter struct {
	Area      string
	Within    string
	FromTime  time.Time
	ToTime    time.Time
	PlotMap   string
	PlotChart string
}

Jump to

Keyboard shortcuts

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