design

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserProfileMedia = MediaType("application/microkubes.user-profile+json", func() {
	TypeName("userProfile")
	Reference(UserProfilePayload)

	Attributes(func() {
		Attribute("userId", String, "Unique user ID")
		Attribute("fullName")
		Attribute("email")
		Attribute("createdOn", Integer, "User profile created timestamp")
		Required("userId", "createdOn")
	})

	View("default", func() {
		Attribute("userId")
		Attribute("fullName")
		Attribute("email")
		Attribute("createdOn")
	})
})

UserProfileMedia is the default media type for user-profile service

View Source
var UserProfilePayload = Type("UserProfilePayload", func() {
	Description("UserProfile data")

	Attribute("fullName", String, "Full name of the user")
	Attribute("email", String, "Email of user", func() {
		Format("email")
	})

	Required("fullName", "email")
})

UserProfilePayload is the payload specification

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