Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GoodSample = Datam{ Table: "test", Data: map[Alphabetic]Field{ Alphabetic("float"): Field{Value: 1.0, /* contains filtered or unexported fields */}, Alphabetic("string"): Field{Value: "str", /* contains filtered or unexported fields */}, Alphabetic("int"): Field{Value: 1, /* contains filtered or unexported fields */}, Alphabetic("bool"): Field{Value: false, /* contains filtered or unexported fields */}, }, }
GoodSample is a sample of a good Datam
Functions ¶
This section is empty.
Types ¶
type Alphabetic ¶
type Alphabetic string
Alphabetic is something from a-z and A-Z
func (Alphabetic) Valid ¶
func (a Alphabetic) Valid() bool
Valid returns true only if it contains valid characters
type Attendant ¶
type Attendant interface { Use(Backend) //where do we aim messages Stop() //cease operations and exit }
An Attendant performs the function of listening for data messages and forwarding them to a backend to store
type Backend ¶
type Backend interface { Register(Datam) error //registers a datam Store(Datam) error //Stores datam Stop() //cease operations }
A Backend supports multiple attendants that gather messages by various means
type Datam ¶
type Datam struct { Table Alphabetic `json:"table"` Data map[Alphabetic]Field `json:"data"` }
Datam is what all insertable things should map to
func (*Datam) NamedExec ¶
NamedExec returns a SQL statement can be be fed into a sqlx.NamedExec along with a set of matching values, and a non-nil error if it cannot form such a statement.
func (*Datam) SqlCreate ¶
SQLCreate forms a SQL statement to store the datam into somde database. It will prepend a primary key 'rowid' key, timestamp as createdat and any additional data. Dialect should be one of the following:
- "sqlite3"
- "postgres"
Others have yet to be defined, but should be added to fieldmode.sqltype()
type Field ¶
type Field struct { Value interface{} // contains filtered or unexported fields }
Field is a JSON parsable
func (*Field) UnmarshalJSON ¶
UnmarshalJSON conforms to the json.Unmarshaller interface
Directories ¶
Path | Synopsis |
---|---|
Package attendants holds various wrappers around various protocols in order to expose easier access to storage mechanisms.
|
Package attendants holds various wrappers around various protocols in order to expose easier access to storage mechanisms. |
mangos
Package mango holds various wrappers around various protocols in order to expose easier access to storage mechanisms.
|
Package mango holds various wrappers around various protocols in order to expose easier access to storage mechanisms. |
Package backends are a collection of homehub.Backends that register and store incoming homehub.Datam fields.
|
Package backends are a collection of homehub.Backends that register and store incoming homehub.Datam fields. |