Documentation ¶
Index ¶
- func New(dbURI, dbName string) (ytlibrarian.Thinger, error)
- type MongoDBThinger
- func (m *MongoDBThinger) AddThing(t ytlibrarian.Thing) error
- func (m *MongoDBThinger) BreakRelationship(parentID, childID string) error
- func (m *MongoDBThinger) Close() error
- func (m *MongoDBThinger) GetAllThings() ([]ytlibrarian.Thing, error)
- func (m *MongoDBThinger) GetAllThingsByType(thingType string) ([]ytlibrarian.Thing, error)
- func (m *MongoDBThinger) GetChildren(parentID string) ([]ytlibrarian.Thing, error)
- func (m *MongoDBThinger) GetParents(childID string) ([]ytlibrarian.Thing, error)
- func (m *MongoDBThinger) GetRelationshipData(parentID, childID string) (string, error)
- func (m *MongoDBThinger) GetThing(id string) (ytlibrarian.Thing, error)
- func (m *MongoDBThinger) GetThingByReferenceID(referenceID string) (ytlibrarian.Thing, error)
- func (m *MongoDBThinger) GetThingsByReferenceIDs(ids []string) ([]ytlibrarian.Thing, error)
- func (m *MongoDBThinger) MakeRelationship(parentID, childID, data string) error
- func (m *MongoDBThinger) RemoveThing(id string) error
- func (m *MongoDBThinger) UpdateRelationshipData(parentID, childID, data string) error
- func (m *MongoDBThinger) UpdateThing(t ytlibrarian.Thing) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MongoDBThinger ¶
type MongoDBThinger struct {
// contains filtered or unexported fields
}
func (*MongoDBThinger) AddThing ¶
func (m *MongoDBThinger) AddThing(t ytlibrarian.Thing) error
func (*MongoDBThinger) BreakRelationship ¶
func (m *MongoDBThinger) BreakRelationship(parentID, childID string) error
BreakRelationship removes a relational entry between two Things
func (*MongoDBThinger) Close ¶
func (m *MongoDBThinger) Close() error
Close closes the MongoDB client
func (*MongoDBThinger) GetAllThings ¶
func (m *MongoDBThinger) GetAllThings() ([]ytlibrarian.Thing, error)
func (*MongoDBThinger) GetAllThingsByType ¶
func (m *MongoDBThinger) GetAllThingsByType(thingType string) ([]ytlibrarian.Thing, error)
func (*MongoDBThinger) GetChildren ¶
func (m *MongoDBThinger) GetChildren(parentID string) ([]ytlibrarian.Thing, error)
GetChildren returns IDs of all Things which are children of the identified Thing
func (*MongoDBThinger) GetParents ¶
func (m *MongoDBThinger) GetParents(childID string) ([]ytlibrarian.Thing, error)
GetParents returns IDs of all Things which are parents of the identified Thing
func (*MongoDBThinger) GetRelationshipData ¶
func (m *MongoDBThinger) GetRelationshipData(parentID, childID string) (string, error)
GetRelationshipData retrieves the data associated with the matching parent/child relationships
func (*MongoDBThinger) GetThing ¶
func (m *MongoDBThinger) GetThing(id string) (ytlibrarian.Thing, error)
func (*MongoDBThinger) GetThingByReferenceID ¶
func (m *MongoDBThinger) GetThingByReferenceID(referenceID string) (ytlibrarian.Thing, error)
func (*MongoDBThinger) GetThingsByReferenceIDs ¶
func (m *MongoDBThinger) GetThingsByReferenceIDs(ids []string) ([]ytlibrarian.Thing, error)
func (*MongoDBThinger) MakeRelationship ¶
func (m *MongoDBThinger) MakeRelationship(parentID, childID, data string) error
MakeRelationship creates a relational entry between two Things
func (*MongoDBThinger) RemoveThing ¶
func (m *MongoDBThinger) RemoveThing(id string) error
func (*MongoDBThinger) UpdateRelationshipData ¶
func (m *MongoDBThinger) UpdateRelationshipData(parentID, childID, data string) error
UpdateRelationshipData updates the data associated with the matching parent/child relationships
func (*MongoDBThinger) UpdateThing ¶
func (m *MongoDBThinger) UpdateThing(t ytlibrarian.Thing) error
Click to show internal directories.
Click to hide internal directories.