Documentation ¶
Index ¶
Constants ¶
View Source
const Collection = "views"
Collection is the Mongo collection containing view metadata.
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 Path ¶
type Path []PathSegment
Path is a slice of PathSegment.
type PathSegment ¶
type PathSegment struct { Level int `bson:"level" json:"level" validate:"required,min=1"` Direction string `bson:"direction" json:"direction" validate:"required,min=2"` Predicate string `bson:"predicate" json:"predicate" validate:"required,min=1"` Tag string `bson:"tag,omitempty" json:"tag,omitempty"` }
PathSegment contains metadata about a segment of a path, which path partially defines a View.
func (*PathSegment) Validate ¶
func (ps *PathSegment) Validate() error
Validate checks the PathSegment value for consistency.
type View ¶
type View struct { Name string `bson:"name" json:"name" validate:"required,min=3"` Collection string `bson:"collection" json:"collection" validate:"required,min=2"` StartType string `bson:"start_type" json:"start_type" validate:"required,min=3"` Path Path `bson:"path" json:"path" validate:"required,min=1"` }
View contains metadata about a view.
Click to show internal directories.
Click to hide internal directories.