base

package
v0.2.4-0...-bb5b233 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConditionalOr int = iota
	ConditionalAnd
)

Where parser mode

View Source
const BytesPrefix string = "__bytes__."
View Source
const FieldPrefix string = "content."

field prefix: this is necessary because a BFS file format is as follows {"__header__":{...}, "__bytes__":{...}, "content": {...}} hence mongodb queries would require the 'content.' prefix

View Source
const HeaderPrefix string = "__header__."

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseFunction

type DatabaseFunction func(db, ctx string)

type FunctionRegistry

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

func NewFunctionRegistry

func NewFunctionRegistry() *FunctionRegistry

func (*FunctionRegistry) GetDatabaseItem

func (r *FunctionRegistry) GetDatabaseItem(name string) (DatabaseFunction, string)

func (*FunctionRegistry) GetServerItem

func (r *FunctionRegistry) GetServerItem(name string) (ServerFunction, string)

func (*FunctionRegistry) GetUserItem

func (r *FunctionRegistry) GetUserItem(name string) (UserFunction, string)

func (*FunctionRegistry) NewDatabaseItem

func (r *FunctionRegistry) NewDatabaseItem(name, alias string, fn DatabaseFunction)

func (*FunctionRegistry) NewServerItem

func (r *FunctionRegistry) NewServerItem(name, alias string, fn ServerFunction)

func (*FunctionRegistry) NewUserItem

func (r *FunctionRegistry) NewUserItem(name, alias string, fn UserFunction)

type Parser

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

Parser scans job.Request.Script for commands and adds them to job.CommandQueue.

func NewParser

func NewParser() *Parser

Create a new parser pointer.

func (*Parser) Parse

func (p *Parser) Parse(s string) (c []bytengine.Command, err error)

type ServerFunction

type ServerFunction func(ctx string)

parser handler functions

type UserFunction

type UserFunction func(ctx string)

Jump to

Keyboard shortcuts

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