Versions in this module Expand all Collapse all v0 v0.3.0 Apr 2, 2013 Changes in this version + const BooleanDataType + const FactorDataType + const FloatDataType + const IntegerDataType + const LuaHeader + const QueryConditionUnitSeconds + const QueryConditionUnitSessions + const QueryConditionUnitSteps + const QueryStepTypeCondition + const QueryStepTypeSelection + const StringDataType + const Version + func CondenseUint64Even(value uint64) uint32 + func CondenseUint64Odd(value uint64) uint32 + func ConvertToStringKeys(value interface{}) interface + func NewFactorNotFound(text string) error + func ShiftTime(value time.Time) int64 + func TablePrefix(tableName string) ([]byte, error) + func UnshiftTime(value int64) time.Time + type Event struct + Data map[int64]interface{} + Timestamp time.Time + func NewEvent(timestamp string, data map[int64]interface{}) *Event + func (e *Event) DecodeRaw(reader io.Reader) error + func (e *Event) Dedupe(a *Event) + func (e *Event) EncodeRaw(writer io.Writer) error + func (e *Event) Equal(x *Event) bool + func (e *Event) MarshalRaw() ([]byte, error) + func (e *Event) Merge(a *Event) + func (e *Event) MergePermanent(a *Event) + func (e *Event) UnmarshalRaw(data []byte) error + type EventList []*Event + func (s EventList) Len() int + func (s EventList) Less(i, j int) bool + func (s EventList) Swap(i, j int) + type ExecutionEngine struct + func NewExecutionEngine(table *Table, source string) (*ExecutionEngine, error) + func (e *ExecutionEngine) Aggregate() (interface{}, error) + func (e *ExecutionEngine) Destroy() + func (e *ExecutionEngine) FullAnnotatedSource() string + func (e *ExecutionEngine) FullSource() string + func (e *ExecutionEngine) Header() string + func (e *ExecutionEngine) Merge(results interface{}, data interface{}) (interface{}, error) + func (e *ExecutionEngine) SetIterator(iterator *levigo.Iterator) error + func (e *ExecutionEngine) Source() string + type FactorNotFound struct + func (e *FactorNotFound) Error() string + type Factors struct + func NewFactors(path string) *Factors + func (f *Factors) Close() + func (f *Factors) Defactorize(namespace string, id string, value uint64) (string, error) + func (f *Factors) Factorize(namespace string, id string, value string, createIfMissing bool) (uint64, error) + func (f *Factors) IsOpen() bool + func (f *Factors) Open() error + func (f *Factors) Path() string + type Property struct + DataType string + Id int64 + Name string + Transient bool + func NewProperty(id int64, name string, transient bool, dataType string) (*Property, error) + type PropertyFile struct + func NewPropertyFile(path string) *PropertyFile + func (p *PropertyFile) Close() + func (p *PropertyFile) CreateProperty(name string, transient bool, dataType string) (*Property, error) + func (p *PropertyFile) DbPath() string + func (p *PropertyFile) Decode(reader io.Reader) error + func (p *PropertyFile) DeleteProperty(property *Property) + func (p *PropertyFile) DenormalizeMap(m map[int64]interface{}) (map[string]interface{}, error) + func (p *PropertyFile) Encode(writer io.Writer) error + func (p *PropertyFile) Factorize(property *Property, value interface{}) (interface{}, error) + func (p *PropertyFile) GetAllProperties() []*Property + func (p *PropertyFile) GetProperties() []*Property + func (p *PropertyFile) GetProperty(id int64) *Property + func (p *PropertyFile) GetPropertyByName(name string) *Property + func (p *PropertyFile) IsOpen() bool + func (p *PropertyFile) NextIdentifiers() (int64, int64) + func (p *PropertyFile) NormalizeMap(m map[string]interface{}) (map[int64]interface{}, error) + func (p *PropertyFile) Open() error + func (p *PropertyFile) Path() string + func (p *PropertyFile) Reset() + func (p *PropertyFile) Save() error + type PropertyList []*Property + func (s PropertyList) Len() int + func (s PropertyList) Less(i, j int) bool + func (s PropertyList) Swap(i, j int) + type Query struct + SessionIdleTime int + Steps QueryStepList + func NewQuery(table *Table, factors *Factors) *Query + func (q *Query) Codegen() (string, error) + func (q *Query) CodegenAggregateFunction() string + func (q *Query) CodegenMergeFunction() string + func (q *Query) Decode(reader io.Reader) error + func (q *Query) Defactorize(data interface{}) error + func (q *Query) Deserialize(obj map[string]interface{}) error + func (q *Query) Encode(writer io.Writer) error + func (q *Query) Factors() *Factors + func (q *Query) NextIdentifier() int + func (q *Query) Serialize() map[string]interface{} + func (q *Query) Table() *Table + type QueryCondition struct + Expression string + Steps QueryStepList + WithinRangeEnd int + WithinRangeStart int + WithinUnits string + func NewQueryCondition(query *Query) *QueryCondition + func (c *QueryCondition) CodegenAggregateFunction() (string, error) + func (c *QueryCondition) CodegenExpression() (string, error) + func (c *QueryCondition) CodegenMergeFunction() (string, error) + func (c *QueryCondition) Defactorize(data interface{}) error + func (c *QueryCondition) Deserialize(obj map[string]interface{}) error + func (c *QueryCondition) FunctionName() string + func (c *QueryCondition) GetSteps() QueryStepList + func (c *QueryCondition) MergeFunctionName() string + func (c *QueryCondition) Query() *Query + func (c *QueryCondition) Serialize() map[string]interface{} + type QuerySelection struct + Dimensions []string + Fields []*QuerySelectionField + Name string + func NewQuerySelection(query *Query) *QuerySelection + func (s *QuerySelection) CodegenAggregateFunction() (string, error) + func (s *QuerySelection) CodegenInnerMergeFunction(index int) (string, error) + func (s *QuerySelection) CodegenMergeFunction() (string, error) + func (s *QuerySelection) Defactorize(data interface{}) error + func (s *QuerySelection) Deserialize(obj map[string]interface{}) error + func (s *QuerySelection) FunctionName() string + func (s *QuerySelection) GetSteps() QueryStepList + func (s *QuerySelection) MergeFunctionName() string + func (s *QuerySelection) Query() *Query + func (s *QuerySelection) Serialize() map[string]interface{} + type QuerySelectionField struct + Expression string + Name string + func NewQuerySelectionField(name string, expression string) *QuerySelectionField + func (f *QuerySelectionField) CodegenExpression() (string, error) + func (f *QuerySelectionField) CodegenMergeExpression() (string, error) + func (f *QuerySelectionField) Deserialize(obj map[string]interface{}) error + func (f *QuerySelectionField) Serialize() map[string]interface{} + type QueryStep interface + CodegenAggregateFunction func() (string, error) + CodegenMergeFunction func() (string, error) + Defactorize func(data interface{}) error + Deserialize func(map[string]interface{}) error + FunctionName func() string + GetSteps func() QueryStepList + MergeFunctionName func() string + Serialize func() map[string]interface{} + type QueryStepList []QueryStep + func DeserializeQueryStepList(obj interface{}, q *Query) (QueryStepList, error) + func (l QueryStepList) CodegenAggregateFunctions() (string, error) + func (l QueryStepList) CodegenMergeFunctions() (string, error) + func (l QueryStepList) CodegenMergeInvoke() string + func (l QueryStepList) Defactorize(data interface{}) error + func (l QueryStepList) Serialize() []interface{} + type Server struct + func NewServer(port uint, path string) *Server + func (s *Server) ApiHandleFunc(route string, ...) *mux.Route + func (s *Server) DataPath() string + func (s *Server) DeleteTable(name string) error + func (s *Server) FactorsPath() string + func (s *Server) GetAllTables() ([]*Table, error) + func (s *Server) GetObjectContext(tableName string, objectId string) (*Table, *Servlet, error) + func (s *Server) GetObjectServletIndex(t *Table, objectId string) (uint32, error) + func (s *Server) GetTable(name string) *Table + func (s *Server) ListenAndServe(shutdownChannel chan bool) error + func (s *Server) OpenTable(name string) (*Table, error) + func (s *Server) Path() string + func (s *Server) RunQuery(table *Table, query *Query) (interface{}, error) + func (s *Server) Running() bool + func (s *Server) Shutdown() error + func (s *Server) Silence() + func (s *Server) TablePath(name string) string + func (s *Server) TablesPath() string + type Servlet struct + func NewServlet(path string, factors *Factors) *Servlet + func (s *Servlet) Close() + func (s *Servlet) DeleteEvent(table *Table, objectId string, timestamp time.Time) error + func (s *Servlet) DeleteEvents(table *Table, objectId string) error + func (s *Servlet) GetEvent(table *Table, objectId string, timestamp time.Time) (*Event, error) + func (s *Servlet) GetEvents(table *Table, objectId string) ([]*Event, *Event, error) + func (s *Servlet) GetState(table *Table, objectId string) (*Event, []byte, error) + func (s *Servlet) Lock() + func (s *Servlet) Open() error + func (s *Servlet) PutEvent(table *Table, objectId string, event *Event, replace bool) error + func (s *Servlet) SetEvents(table *Table, objectId string, events []*Event, state *Event) error + func (s *Servlet) SetRawEvents(table *Table, objectId string, data []byte, state *Event) error + func (s *Servlet) Unlock() + type Table struct + Name string + func NewTable(name string, path string) *Table + func (t *Table) Close() + func (t *Table) Create() error + func (t *Table) CreateProperty(name string, transient bool, dataType string) (*Property, error) + func (t *Table) DefactorizeEvent(event *Event, factors *Factors) error + func (t *Table) Delete() error + func (t *Table) DeleteProperty(property *Property) error + func (t *Table) DenormalizeMap(m map[int64]interface{}) (map[string]interface{}, error) + func (t *Table) DeserializeEvent(m map[string]interface{}) (*Event, error) + func (t *Table) EncodeObjectId(objectId string) ([]byte, error) + func (t *Table) Exists() bool + func (t *Table) FactorizeEvent(event *Event, factors *Factors, createIfMissing bool) error + func (t *Table) GetProperties() ([]*Property, error) + func (t *Table) GetProperty(id int64) (*Property, error) + func (t *Table) GetPropertyByName(name string) (*Property, error) + func (t *Table) IsOpen() bool + func (t *Table) NormalizeMap(m map[string]interface{}) (map[int64]interface{}, error) + func (t *Table) Open() error + func (t *Table) Path() string + func (t *Table) SavePropertyFile() error + func (t *Table) SerializeEvent(event *Event) (map[string]interface{}, error) + type TextPlainContentTypeError struct + func (e *TextPlainContentTypeError) Error() string