design

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Forecast = Type("Forecast", func() {
	Description("Weather forecast")
	Attribute("location", Location, "Forecast location")
	Attribute("periods", ArrayOf(Period), "Weather forecast periods")
	Required("location", "periods")
})
View Source
var Location = Type("Location", func() {
	Description("Geographical location")
	Attribute("lat", Float64, "Latitude", func() {
		Example(34.4237458)
	})
	Attribute("long", Float64, "Longitude", func() {
		Example(-119.7049146)
	})
	Attribute("city", String, "City", func() {
		Example("Santa Barbara")
	})
	Attribute("state", String, "State", func() {
		Example("CA")
	})
	Required("lat", "long", "city", "state")
})
View Source
var Period = Type("Period", func() {
	Description("Weather forecast period")
	Attribute("name", String, "Period name", func() {
		Example("Morning")
	})
	Attribute("startTime", String, "Start time", func() {
		Format(FormatDateTime)
		Example("2020-01-01T00:00:00Z")
	})
	Attribute("endTime", String, "End time", func() {
		Format(FormatDateTime)
		Example("2020-01-01T00:00:00Z")
	})
	Attribute("temperature", Int, "Temperature", func() {
		Example(70)
	})
	Attribute("temperatureUnit", String, "Temperature unit", func() {
		Example("F")
	})
	Attribute("summary", String, "Summary", func() {
		Example("Clear")
	})
	Required("name", "startTime", "endTime", "temperature", "temperatureUnit", "summary")
})

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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