server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR = "ERROR"

	ITEMS_REQUEST = "ITEMS_REQUEST"
	ITEMS_RECEIVE = "ITEMS_RECEIVE"

	INDICES_REQUEST = "INDICES_REQUEST"
	INDICES_RECEIVE = "INDICES_RECEIVE"

	FIELDS_REQUEST = "FIELDS_REQUEST"
	FIELDS_RECEIVE = "FIELDS_RECEIVE"
)

Variables

This section is empty.

Functions

func Address

func Address(addr string) func(*Server)

func Debug

func Debug() func(*Server)

func Path

func Path(val string) func(*Server)

Types

type ErrorMessage

type ErrorMessage struct {
	Query   string `json:"query"`
	Color   string `json:"color"`
	Message string `json:"message"`
}

func (*ErrorMessage) MarshalJSON

func (em *ErrorMessage) MarshalJSON() ([]byte, error)

type FieldsMessage

type FieldsMessage struct {
	Server string      `json:"server"`
	Index  string      `json:"index"`
	Fields interface{} `json:"fields"`
}

func (*FieldsMessage) MarshalJSON

func (em *FieldsMessage) MarshalJSON() ([]byte, error)

type IndicesMessage

type IndicesMessage struct {
	Server  string      `json:"server"`
	Indices interface{} `json:"results"`
}

func (*IndicesMessage) MarshalJSON

func (em *IndicesMessage) MarshalJSON() ([]byte, error)

type ResultsMessage

type ResultsMessage struct {
	Server  string      `json:"server"`
	Query   string      `json:"query"`
	Color   string      `json:"color"`
	Results interface{} `json:"results"`
}

func (*ResultsMessage) MarshalJSON

func (em *ResultsMessage) MarshalJSON() ([]byte, error)

type Server

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

func New

func New(options ...func(*Server)) *Server

func (*Server) Run

func (server *Server) Run()

Jump to

Keyboard shortcuts

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