x

package
v0.0.0-...-f02d831 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	E_ERROR            = "E_ERROR"
	E_INVALID_METHOD   = "E_INVALID_METHOD"
	E_INVALID_REQUEST  = "E_INVALID_REQUEST"
	E_INVALID_USER     = "E_INVALID_USER"
	E_MISSING_REQUIRED = "E_MISSING_REQUIRED"
	E_OK               = "E_OK"
	E_UNAUTHORIZED     = "E_UNAUTHORIZED"
)

Variables

This section is empty.

Functions

func Log

func Log(p string) *logrus.Entry

func LogErr

func LogErr(entry *logrus.Entry, err error) *logrus.Entry

func ParseIdFromUrl

func ParseIdFromUrl(r *http.Request, urlToken string) (uid string, ok bool)

func ParseRequest

func ParseRequest(w http.ResponseWriter, r *http.Request, data interface{}) bool

func Reply

func Reply(w http.ResponseWriter, rep interface{})

func SetStatus

func SetStatus(w http.ResponseWriter, code, msg string)

func UniqueString

func UniqueString(alpha int) string

Types

type Instruction

type Instruction struct {
	SubjectId   string `json:"subject_id,omitempty"`
	SubjectType string `json:"subject_type,omitempty"`
	Predicate   string `json:"predicate,omitempty"`
	Object      []byte `json:"object,omitempty"`
	ObjectId    string `json:"object_id,omitempty"`
	NanoTs      int64  `json:"nano_ts,omitempty"`
	Source      string `json:"source,omitempty"`
}

func (*Instruction) GobDecode

func (i *Instruction) GobDecode(buf []byte) error

func (*Instruction) GobEncode

func (i *Instruction) GobEncode() ([]byte, error)

type Its

type Its []Instruction

func (Its) Len

func (its Its) Len() int

func (Its) Less

func (its Its) Less(i, j int) bool

func (Its) Swap

func (its Its) Swap(i, j int)

type Status

type Status struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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