design

package
v0.0.0-...-6fa130f Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppointmentMedia = MediaType("application/vnd.mara.appointment", func() {
	Attributes(func() {
		Attribute("id", String, "The id of the appointment")
		Attribute("href", String, "The url of the appointment")
		Attribute("who", String, "Who is requesting the appointment", func() {
			Example("Pippo Pippis")
		})
		Attribute("email", String, "The email of who's requesting it", func() {
			Example("user@example.com")
			Format("email")
		})
		Attribute("send_email", Boolean, "Option to send email to the client", func() {
			Default(false)
		})
		Attribute("phone", String, "The phone of the client", func() {
			Example("3347662313")
		})
		Attribute("send_sms", Boolean, "Option to send sms to the client", func() {
			Default(false)
		})
		Attribute("what", String, "What is the purpose of the appointment", func() {
			Example("Convergenza")
		})
		Attribute("when", DateTime, "When is the appointment scheduled")
		Attribute("where", String, "Where is the appointment scheduled", func() {
			Example("Budrio")
		})
		Attribute("notes", String, "Internal notes about the Appointment")
		Attribute("urgent", Boolean, "Option specifying that the work is to be done now", func() {
			Default(false)
		})
		Attribute("problematic", Boolean, "Option specifying that the work is problematic for some reason", func() {
			Default(false)
		})
		Attribute("status", String, "The status of the work. Can be one of todo/doing/done", func() {
			Example("todo")
			Pattern("todo|doing|done")
		})
	})
	View("default", func() {
		Attribute("id")
		Attribute("href")
		Attribute("who")
		Attribute("email")
		Attribute("send_email")
		Attribute("phone")
		Attribute("send_sms")
		Attribute("what")
		Attribute("when")
		Attribute("where")
		Attribute("notes")
		Attribute("urgent")
		Attribute("problematic")
		Attribute("status")
	})
})
View Source
var AppointmentPayload = Type("Appointment", func() {
	Attribute("who", String, "Who is requesting the appointment", func() {
		Example("Pippo Pippis")
	})
	Attribute("email", String, "The email of who's requesting it", func() {
		Example("user@example.com")
		Format("email")
	})
	Attribute("send_email", Boolean, "Option to send email to the client", func() {
		Default(false)
	})
	Attribute("phone", String, "The phone of the client", func() {
		Example("3347662313")
	})
	Attribute("send_sms", Boolean, "Option to send sms to the client", func() {
		Default(false)
	})
	Attribute("what", String, "What is the purpose of the appointment", func() {
		Example("Convergenza")
	})
	Attribute("when", DateTime, "When is the appointment scheduled")
	Attribute("where", String, "Where is the appointment scheduled", func() {
		Example("Budrio")
	})
	Attribute("notes", String, "Internal notes about the Appointment")
	Attribute("urgent", Boolean, "Option specifying that the work is to be done now", func() {
		Default(false)
	})
	Attribute("problematic", Boolean, "Option specifying that the work is problematic for some reason", func() {
		Default(false)
	})
	Attribute("status", String, "The status of the work. Can be one of todo/doing/done", func() {
		Example("todo")
		Pattern("todo|doing|done")
	})
	Required("who", "what", "when", "where")
})
View Source
var JWT = JWTSecurity("jwt", func() {
	Header("Authorization")
})
View Source
var LoginPayload = Type("Login", func() {
	Attribute("user", String, "The username", func() {
		Example("user")
	})
	Attribute("password", String, "The password", func() {
		Example("password")
	})
	Required("user", "password")
})
View Source
var ResetPayload = Type("Reset", func() {
	Attribute("user", String, "The user that will receive the new password", func() {
		Example("user")
	})
	Required("user")
})
View Source
var TokenMedia = MediaType("application/vnd.mara.token", func() {
	Attributes(func() {
		Attribute("token", String, "The token to use in subsequent api calls", func() {
			Example("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ")
		})
	})
	View("default", func() {
		Attribute("token")
	})
})

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