pezsearch

package
v0.0.0-...-1ef716f Latest Latest
Warning

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

Go to latest
Published: May 17, 2015 License: Apache-2.0, GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScopeKeyword  = "scope:"
	TypeResource  = "type"
	ItemResource  = "item"
	LimitDefault  = 10
	OffsetDefault = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	// contains filtered or unexported methods
}

type Item

type Item struct {
	ID          string `json:"_id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	TypeID      string `json:"type-id"`
}

Item - data for the item resource

type Record

type Record struct {
	ID      string      `json:"_id"`
	Type    string      `json:"_type"`
	URI     string      `json:"_uri"`
	Content interface{} `json:"_content"`
}

Record is a DB record

type ResponseMessage

type ResponseMessage struct {
	Status  string                 `json:"status"`
	Data    interface{}            `json:"data,omitempty"`
	Message string                 `json:"message,omitempty"`
	Meta    map[string]interface{} `json:"_meta,omitempty"`
	Links   map[string]interface{} `json:"_links,omitempty"`
}

ResponseMessage structures output into a standard format.

type Server

type Server *martini.ClassicMartini

Server wraps the Martini server struct

func NewServer

func NewServer(authHandler martini.Handler) (m Server)

NewServer configures and returns a Server. TODO: Parameterize DB

type Type

type Type struct {
	ID          string `json:"_id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Available   bool   `json:"status"`
}

Type - data for the type resource

Jump to

Keyboard shortcuts

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