Documentation ¶
Index ¶
Constants ¶
View Source
const Collection = "items"
Collection is the Mongo collection containing item values.
Variables ¶
View Source
var ErrNotFound = errors.New("Set Not found")
ErrNotFound is an error variable thrown when no results are returned from a Mongo query.
Functions ¶
Types ¶
type Item ¶
type Item struct { ID string `bson:"item_id" json:"item_id" validate:"required,min=1"` Type string `bson:"type" json:"type" validate:"required,min=2"` Version int `bson:"version" json:"version" validate:"required,min=1"` Data map[string]interface{} `bson:"data" json:"data"` }
Item is data, properties and behavior associated with one of a comment, asset, action, etc. Regardless of type (comment, asset, etc.), all Items are formatted with an ID, Type, and Version, and asssociated data (which may differ greatly between items) is encoded into the Data interface.
func (*Item) InferIDFromData ¶ added in v0.4.1
InferIDFromData infers an item_id from type and source id.
Click to show internal directories.
Click to hide internal directories.