design

package
v0.0.0-...-d8f6d10 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NeatThingMedia = ResultType("application/vnd.douthitlab.neatthing", func() {
	TypeName("NeatThing")
	Attributes(func() {
		Field(1, "name", String, "The neat thing")
		Field(2, "definition", String, "What the neat thing is")
		Field(3, "link", String, "Illustrative link for the neat thing", func() {
			Format(FormatURI)
		})
		Field(4, "date", String, "When this was a neat thing", func() {
			Format(FormatDateTime)
		})
		Field(5, "bibliography", ArrayOf(String))
	})

	View("default", func() {
		Attribute("name")
		Attribute("definition")
		Attribute("link")
	})
	View("full", func() {
		Attribute("name")
		Attribute("definition")
		Attribute("link")
		Attribute("date")
		Attribute("bibliography")
	})
	View("name", func() {
		Attribute("name")
	})
	View("name+definition", func() {
		Attribute("name")
		Attribute("definition")
	})
	View("name+link", func() {
		Attribute("name")
		Attribute("link")
	})
})

NeatThingMedia represents a neat thing with its name, description/definition, and a great illustrative link.

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