Documentation
¶
Overview ¶
Package postgres contains a client for a PostgreSQL Cloudburst backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
Client is an extended Postgres pool.
func NewClient ¶
func NewClient(config *ClientConfig) (*Client, error)
NewClient returns a Client for the given configuration.
type ClientConfig ¶
ClientConfig contains Postgres client configuration.
type SenMLRow ¶
type SenMLRow struct {
Host string
Name string
Time time.Time
UpdateTime float64
Unit string
Bool *bool
Data []byte
String *string
Sum *float64
Value *float64
}
SenMLRow contains a database row representing a SenML measurement.
func NewSenMLRow ¶
func NewSenMLRow(measurement senml.Measurement) *SenMLRow
NewSenMLRow returns a SenMLRow for a senml.Measurement.
func (*SenMLRow) Attrs ¶
func (r *SenMLRow) Attrs() senml.Attributes
Attrs returns the SenML attributes for a SenMLRow.
Click to show internal directories.
Click to hide internal directories.