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 ResendVerificationPayload = Type("ResendVerificationPayload", func() {
	Description("Payload for resending email verification. Contains user email")
	Attribute("email", String, "User email for verification")
	Required("email")
})

ResendVerificationPayload contains the email for the user to reset verification.

View Source
var UserMedia = MediaType("application/vnd.goa.user+json", func() {
	TypeName("users")
	Reference(UserPayload)

	Attributes(func() {
		Attribute("id", String, "Unique user ID")
		Attribute("fullname")
		Attribute("email")
		Attribute("roles")
		Attribute("externalId")
		Attribute("active")
		Required("id", "fullname", "email", "roles", "externalId", "active")
	})

	View("default", func() {
		Attribute("id")
		Attribute("fullname")
		Attribute("email")
		Attribute("roles")
		Attribute("externalId")
		Attribute("active")
	})
})

UserMedia defines the media type used to render user.

View Source
var UserPayload = Type("UserPayload", func() {
	Description("UserPayload")

	Attribute("fullname", String, "Full name of user", func() {
		Pattern("^([a-zA-Z0-9 ]{4,30})$")
	})
	Attribute("email", String, "Email of user", func() {
		Format("email")
	})
	Attribute("password", String, "Password of user", func() {
		MinLength(6)
		MaxLength(30)
	})
	Attribute("roles", ArrayOf(String), "Roles of user")
	Attribute("namespaces", ArrayOf(String), "List of namespaces this user belongs to")
	Attribute("externalId", String, "External id of user")
	Attribute("active", Boolean, "Status of user account", func() {
		Default(false)
	})
	Attribute("sendActivationMail", Boolean, "Status of user account", func() {
		Default(true)
	})
	Attribute("token", String, "Email verification token")

	Required("fullname", "email")
})

UserPayload defines the payload for the user.

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