web

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Id    string      `json:"id"`
	Type  string      `json:"type"`
	Value interface{} `json:"value"`
}

type Form

type Form struct {
	Id     string   `json:"id"`
	Method string   `json:"method"`
	Action string   `json:"action"`
	Fields []*Field `json:"fields"`
}

func NewForm

func NewForm(id, action string) *Form

func (*Form) Email

func (p *Form) Email(id string)

func (*Form) Password

func (p *Form) Password(id string)

func (*Form) Text

func (p *Form) Text(id, val string)

func (*Form) TextArea

func (p *Form) TextArea(id, val string)

type Response

type Response struct {
	Ok        bool        `json:"ok"`
	Payload   interface{} `json:"payload"`
	Messages  []string    `json:"messages"`
	CreatedAt time.Time   `json:"created_at"`
}

func NewResponse

func NewResponse(ok bool, payload interface{}, messages ...string) *Response

func (*Response) AddMessages

func (p *Response) AddMessages(messages ...string)

func (*Response) Check

func (p *Response) Check(err error)

Jump to

Keyboard shortcuts

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