Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tracker ¶
type Tracker struct { Payload WCSPayload // payload structure kv pair Id string // id of what we're tracking. Subject string // ideally a way of associating page hits to a unique visit Timestamp time.Time // time stamp (of tracker creation) Version int // tracker version }
func Deserialize ¶
Deserialize takes an encoded string and returns a tracker.
func NewTracker ¶
func NewTracker(p *WCSPayload, id string, subject string) *Tracker
Allocate and return a new Tracker. Requires a payload, id and subject.
func (*Tracker) AddPayload ¶
func (t *Tracker) AddPayload(p *WCSPayload)
Add accepts a WCSPayload from a map[string]string kv pair and initializes the tracker's payload.
func (*Tracker) AddProperty ¶
AddProperty adds a property from the payload, if the property for the tracker exists. ex: t.AddProperty("Subject", "www.example.biz")
type UAReferenceTracker ¶
type UAReferenceTracker struct {
// contains filtered or unexported fields
}
UAReferenceTracker is a reference struct that is not used. This is not how we want to do things, and is only provided as a brief reference subset. For a similar set of values in katric, we may want to make use of gorilla scheme to save pairs to structs.
type WCSPayload ¶
type WCSPayload struct {
// contains filtered or unexported fields
}
WCSPayload provides the most flexibility to arbitrarily inject key/value pairs which ultimately go into a nosql store (a wide column store) for analytics.
func NewPayload ¶
func NewPayload(urldict map[string][]string) *WCSPayload
Allocate and return a new WCSPayload, accepts a map[string][]string from net/url ParseQuery.
func (*WCSPayload) Add ¶
func (p *WCSPayload) Add(key string, value string)
Add accepts a key value pair and adds them to the store. If either key or value is empty, discard the pair. If the key is not valid, discard.
func (*WCSPayload) AddDict ¶
func (p *WCSPayload) AddDict(wcs map[string]string)
AddDict accepts a map of key value pairs and adds them to the store
func (*WCSPayload) AddURLDict ¶
func (p *WCSPayload) AddURLDict(m map[string][]string)
AddURLDict takes a map[string][]string, (from net/url ParseQuery, for example) and adds the key value pair
func (*WCSPayload) Get ¶
func (p *WCSPayload) Get(key string) string
Get accepts a key and returns a value from the store.