Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CreateUserPayload = Type("CreateUserPayload", func() { Description("CreateUserPayload") 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("organizations", ArrayOf(String), "List of organizations to which this user belongs to") 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("token", String, "Token for email verification") Required("email") })
CreateUserPayload defines the payload for the user.
var CredentialsPayload = Type("Credentials", func() {
Description("Email and password credentials")
Attribute("email", String, "Email of user", func() {
Format("email")
})
Attribute("password", String, "Password of user", func() {
MinLength(6)
MaxLength(30)
})
Required("email", "password")
})
CredentialsPayload defines the payload for the credentials.
var EmailPayload = Type("EmailPayload", func() {
Description("Email payload")
Attribute("email", String, "Email of user", func() {
Format("email")
})
Required("email")
})
EmailPayload defines the payload for the email.
var FilterPayload = Type("FilterPayload", func() { Attribute("page", Integer, "Page number (1-based).") Attribute("pageSize", Integer, "Items per page.") Attribute("filter", ArrayOf(FilterProperty), "Users filter.") Attribute("sort", OrderSpec, "Sort specification.") Required("page", "pageSize") })
FilterPayload Users filter request payload.
var FilterProperty = Type("FilterProperty", func() {
Attribute("property", String, "Property name")
Attribute("value", String, "Property value to match")
Required("property", "value")
})
FilterProperty Single property filter. Holds the property name and the value to be matched for that property.
var ForgotPasswordPayload = Type("ForgotPasswordPayload", func() {
Description("Password Reset payload")
Attribute("email", String, "Email of the user", func() {
Format("email")
})
Attribute("password", String, "New password", func() {
MinLength(6)
MaxLength(30)
})
Attribute("token", String, "Forgot password token")
Required("password", "token")
})
ForgotPasswordPayload defines the payload for the password/forgot.
var OrderSpec = Type("OrderSpec", func() {
Attribute("property", String, "Sort by property")
Attribute("direction", String, "Sort order. Can be 'asc' or 'desc'.")
Required("property", "direction")
})
OrderSpec specifies the sorting - by which property and the direction, either 'asc' (ascending) or 'desc' (descending).
var ResetTokenMedia = MediaType("ResetTokenMedia", func() {
TypeName("ResetToken")
Attributes(func() {
Attribute("id", String, "User ID")
Attribute("email", String, "User email")
Attribute("token", String, "New token")
Required("id", "email", "token")
})
View("default", func() {
Attribute("id")
Attribute("email")
Attribute("token")
})
})
ResetTokenMedia is returned after successful reset of the verification token
var UpdateUserPayload = Type("UpdateUserPayload", func() { Description("UpdateUserPayload") 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("organizations", ArrayOf(String), "List of organizations to which this user belongs to") 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("token", String, "Token for email verification") })
UpdateUserPayload defines the payload for the user.
var UserMedia = MediaType("application/vnd.goa.user+json", func() { TypeName("users") Reference(CreateUserPayload) Attributes(func() { Attribute("id", String, "Unique user ID") Attribute("email") Attribute("roles") Attribute("externalId") Attribute("active") Attribute("organizations") Attribute("namespaces") Required("id", "email", "roles", "externalId", "active") }) View("default", func() { Attribute("id") Attribute("email") Attribute("roles") Attribute("externalId") Attribute("active") Attribute("organizations") Attribute("namespaces") }) })
UserMedia defines the media type used to render user.
var UsersPageMedia = MediaType("application/mt.ckan.users-page+json", func() { TypeName("UsersPage") Attributes(func() { Attribute("page", Integer, "Page number (1-based).") Attribute("pageSize", Integer, "Items per page.") Attribute("items", ArrayOf(UserMedia), "Users list") }) View("default", func() { Attribute("page") Attribute("pageSize") Attribute("items") }) })
UsersPageMedia result of filter-by. One result page along with items (array of Users).
Functions ¶
This section is empty.
Types ¶
This section is empty.