design

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CityAndState = Type("CityAndState", func() {
	Description("Location city and state.")
	Attribute("state", String, "State", func() {
		Example("CA")
		MinLength(2)
		MaxLength(2)
	})
	Attribute("city", String, "City", func() {
		Example("Santa Barbara")
	})
	Required("city", "state")
})
View Source
var Job = Type("Job", func() {
	Description("Location forecast poll job")
	Attribute("key", String, "Job key", func() {
		Example("1")
	})
	Attribute("payload", Bytes, "Job payload", func() {
		Example([]byte(`{"state":"CA","city":"Santa Barbara"}`))
	})
	Attribute("created_at", String, "Creation timestamp", func() {
		Example("2020-09-01T12:00:00Z")
	})
	Required("key", "payload", "created_at")
})
View Source
var PollerStatus = Type("PollerStatus", func() {
	Description("Poller status")
	Attribute("workers", ArrayOf(Worker), "Poller workers")
	Attribute("jobs", ArrayOf(Job), "Location poll jobs")
	Required("workers", "jobs")
})
View Source
var Worker = Type("Worker", func() {
	Description("Poller worker")
	Attribute("id", String, "Worker ID", func() {
		Example("1")
	})
	Attribute("jobs", ArrayOf(Job), "Worker poll jobs")
	Attribute("created_at", String, "Creation timestamp", func() {
		Example("2020-09-01T12:00:00Z")
	})
	Required("id", "jobs", "created_at")
})

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