json

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleGetAll

func HandleGetAll(w http.ResponseWriter, r *http.Request)

func HandleGetById

func HandleGetById(w http.ResponseWriter, r *http.Request)

Types

type Collection

type Collection struct {
	// contains filtered or unexported fields
}

func CollectionLoad

func CollectionLoad(path string) (*Collection, error)

func (*Collection) AsBytes

func (c *Collection) AsBytes() ([]byte, error)

func (*Collection) AsJson

func (c *Collection) AsJson() map[string]interface{}

func (*Collection) Get

func (c *Collection) Get(key string) interface{}

func (*Collection) GetAsList

func (c *Collection) GetAsList(key string) []interface{}

func (*Collection) GetById

func (c *Collection) GetById(id float64) *Collection

func (*Collection) Name

func (c *Collection) Name() string

type Error

type Error struct {
	Code   int      `json:"code"`
	Errors []string `json:"errors"`
}

func NewError

func NewError(code int, err error) *Error

func (*Error) AsBytes

func (e *Error) AsBytes() []byte

Jump to

Keyboard shortcuts

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