example

package
v0.0.0-...-d4aa6c0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2016 License: BSD-2-Clause Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKeyValidator

func APIKeyValidator(r *vertex.Request) error

Types

type Banana

type Banana struct {
	Foo string
	Bar string
}

func (Banana) UnmarshalRequestData

func (b Banana) UnmarshalRequestData(data string) interface{}

type BaseHandler

type BaseHandler struct {
	APIKey string `schema:"apiKey" maxlen:"64" required:"true" doc:"Client API Key" global:"true"`
}

type User

type User struct {
	Name   string `json:"name"`
	Id     string `json:"id"`
	Banana Banana `json:"banana"`
	Foo    int    `json:"foo"`
}

type UserHandler

type UserHandler struct {
	BaseHandler
	Id   string   `schema:"id" maxlen:"100" pattern:"[a-zA-Z]+" required:"true" doc:"The Id Of the user" in:"path"`
	Name string   `schema:"name" maxlen:"100" minlen:"1" required:"true" doc:"The Name Of the user"`
	Foo  int      `schema:"foo" default:"500"`
	Bars []string `schema:"bars" in:"query" hidden:"true" global:"true"`
}

func (UserHandler) Handle

func (h UserHandler) Handle(w http.ResponseWriter, r *vertex.Request) (interface{}, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL