Documentation ¶
Index ¶
Constants ¶
View Source
const Collection = "patterns"
Collection is the Mongo collection containing pattern metadata.
Variables ¶
View Source
var ErrNotFound = errors.New("Pattern Not found")
ErrNotFound is an error variable thrown when no results are returned from a Mongo query.
Functions ¶
Types ¶
type Inference ¶
type Inference struct { RelIDField string `bson:"related_ID_field" json:"related_ID_field" validate:"required,min=2"` RelType string `bson:"related_type,omitempty" json:"related_type,omitempty"` Predicate string `bson:"predicate" json:"predicate" validate:"required,min=2"` Direction string `bson:"direction" json:"direction" validate:"required,min=2"` Required bool `bson:"required" json:"required"` }
Inference includes information used to infer a particular relationship within an item.
type Pattern ¶
type Pattern struct { Type string `bson:"type" json:"type" validate:"required,min=2"` Inferences []Inference `bson:"inferences" json:"inferences" validate:"required,min=1"` }
Pattern includes information used to infer relationships given an item of an certain type.
Click to show internal directories.
Click to hide internal directories.