design

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BugMedia = MediaType("application/vnd.bug_media", func() {
	Attributes(func() {
		Required("bug")
		View("test")
	})
	Required("bug")
})
View Source
var BugType = Type("bug", func() {
	Attributes(func() {
		View("bug")
		Example("ng")
	})

	Example("ng")
	View("bug")
})
View Source
var DescriptionMedia = MediaType("application/vnd.description_media", func() {
	Attribute("ok")
	Attribute("ok", String, func() {
		Description("ok")
	})
	Attribute("ng", String, func() {
		Example("ng")
	})
})

DescriptionMedia is media type for sample

View Source
var NameMedia = MediaType("application/vnd.name_media", func() {
	Attribute("this_is_ok")
	Attribute("this-is-ng", String, func() {})
	Attribute("NgCase", String, func() {})
	Attribute("ngCase", String, func() {})
})

NameMedia is media type for sample

View Source
var SampleMedia = MediaType("application/vnd.sample_media", func() {
	Attribute("ok")
	Attribute("ok", String, func() {
		Example("OK")
	})
	Attribute("ng", String, func() {
		NoExample()
	})
	Attribute("ng", String, func() {
		Description("no example in Attribute()")
	})
	Attributes(func() {
		Attribute("ok")
		View("ng")
	})
})

SampleMedia is media type for sample

View Source
var TestMedia = MediaType("application/vnd.test_media", func() {
	Attribute("AbcDefID")
	Attribute("zzzXXX-ss", String, func() {
		NoExample()
	})
	Attribute("no_example", String, func() {
		Description("no example in Attribute()")
	})
	Attribute("with_example", String, func() {
		Example("Ok case")
		Enum("ng")
	})

	Attributes(func() {
		Attribute("test")
		View("ng")
		Default("ng")
		Enum("ng")
		Attribute("array_ok", ArrayOf(String))
		Attribute("array_ng", ArrayOf(String))
		Required("array_ok")
	})
	Default("ng")
})

TestMedia is media type for test

View Source
var TestType = Type("TestType", func() {
	Default("ng")
	View("ng")
})

TestType is type

View Source
var ViewMedia = MediaType("application/vnd.view_media", func() {
	View("ok")
	Attributes(func() {
		Attribute("test")
		View("ng")
	})
})

ViewMedia is media type for test

View Source
var ViewType = Type("ViewType", func() {
	View("ng")
})

ViewType is type

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