endpoint

package
v0.0.0-...-7efb10f Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConditions

func GetConditions(owm openweathermap.Interface) func(w http.ResponseWriter, req *http.Request)

func NotAllowed

func NotAllowed() func(w http.ResponseWriter, req *http.Request)

func NotFound

func NotFound() func(w http.ResponseWriter, req *http.Request)

Types

type ErrorResponse

type ErrorResponse struct {
	Message string `json:"message"`
}

type GetConditionsResponse

type GetConditionsResponse struct {
	Temperature float64 `json:"temperature"`
	Units       string  `json:"units"`
	Condition   string  `json:"condition"`
	FeelsLike   string  `json:"feelsLike"`
}

TODO I'm definitely not in love with the field names and would want to sync with the team/PM to pick better names :)

Jump to

Keyboard shortcuts

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