design

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppCredentialsPayload = Type("AppCredentialsPayload", func() {
	Description("App ID+secret credentials")
	Attribute("id", String, "The app ID")
	Attribute("secret", String, "The app secret")
	Required("id", "secret")
})

AppCredentialsPayload holds the app credentials: app ID and app secret.

View Source
var AppMedia = MediaType("application/vnd.goa.apps+json", func() {
	TypeName("apps")
	Reference(AppPayload)

	Attributes(func() {
		Attribute("id", String, "Unique app ID")
		Attribute("name")
		Attribute("description")
		Attribute("domain")
		Attribute("owner", String, "User ID")
		Attribute("secret", String, "Client secret")
		Attribute("registeredAt", Integer, "Time when app is registered")
		Required("id", "name", "description", "domain", "owner", "registeredAt")
	})

	View("default", func() {
		Attribute("id")
		Attribute("name")
		Attribute("description")
		Attribute("domain")
		Attribute("owner")
		Attribute("registeredAt")
	})
})

AppMedia defines the media type used to render client apps.

View Source
var AppPayload = Type("AppPayload", func() {
	Description("Payload for the client apps")

	Attribute("name", String, "Name of the app", func() {
		MaxLength(50)
	})
	Attribute("description", String, "Description of the app", func() {
		MaxLength(300)
	})
	Attribute("domain", String, "App domain")

	Required("name")
})

AppsPayload defines the payload for the client apps.

View Source
var RegAppMedia = MediaType("application/vnd.goa.reg.apps+json", func() {
	TypeName("reg-apps")

	Attributes(func() {
		Attribute("id", String, "App ID")
		Attribute("secret", String, "Client secret")
		Required("id", "secret")
	})

	View("default", func() {
		Attribute("id")
		Attribute("secret")
	})
})

RegAppMedia defines the media type used to render client apps.

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