Documentation ¶
Index ¶
- func New(projectID string) (ytlibrarian.Thinger, error)
- type GcpDatastoreThinger
- func (c *GcpDatastoreThinger) AddThing(t ytlibrarian.Thing) error
- func (c *GcpDatastoreThinger) BreakRelationship(parentID, childID string) error
- func (c *GcpDatastoreThinger) Close() error
- func (c *GcpDatastoreThinger) GetAllThings() ([]ytlibrarian.Thing, error)
- func (c *GcpDatastoreThinger) GetAllThingsByType(thingType string) ([]ytlibrarian.Thing, error)
- func (c *GcpDatastoreThinger) GetChildren(parentID string) ([]ytlibrarian.Thing, error)
- func (c *GcpDatastoreThinger) GetParents(childID string) ([]ytlibrarian.Thing, error)
- func (c *GcpDatastoreThinger) GetRelationshipData(parentID, childID string) (string, error)
- func (c *GcpDatastoreThinger) GetThing(id string) (ytlibrarian.Thing, error)
- func (c *GcpDatastoreThinger) GetThingByReferenceID(id string) (ytlibrarian.Thing, error)
- func (c *GcpDatastoreThinger) GetThingsByReferenceIDs(ids []string) ([]ytlibrarian.Thing, error)
- func (c *GcpDatastoreThinger) MakeRelationship(parentID, childID, data string) error
- func (c *GcpDatastoreThinger) RemoveThing(id string) error
- func (c *GcpDatastoreThinger) SaveThing(t ytlibrarian.Thing) error
- func (c *GcpDatastoreThinger) UpdateRelationshipData(parentID, childID, data string) error
- func (c *GcpDatastoreThinger) UpdateThing(t ytlibrarian.Thing) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GcpDatastoreThinger ¶
type GcpDatastoreThinger struct {
// contains filtered or unexported fields
}
GcpDatastoreThinger implements a Thinger interface using GCP Datastore
func (*GcpDatastoreThinger) AddThing ¶
func (c *GcpDatastoreThinger) AddThing(t ytlibrarian.Thing) error
AddThing creates a new entity
func (*GcpDatastoreThinger) BreakRelationship ¶
func (c *GcpDatastoreThinger) BreakRelationship(parentID, childID string) error
BreakRelationship removes a relational entry between two Things
func (*GcpDatastoreThinger) Close ¶
func (c *GcpDatastoreThinger) Close() error
Close closes the GCP Datastore client
func (*GcpDatastoreThinger) GetAllThings ¶
func (c *GcpDatastoreThinger) GetAllThings() ([]ytlibrarian.Thing, error)
GetAllThings retrieves all thing entities from the datastore
func (*GcpDatastoreThinger) GetAllThingsByType ¶
func (c *GcpDatastoreThinger) GetAllThingsByType(thingType string) ([]ytlibrarian.Thing, error)
GetAllThingsByType retrieves all thing entities from the datastore by type
func (*GcpDatastoreThinger) GetChildren ¶
func (c *GcpDatastoreThinger) GetChildren(parentID string) ([]ytlibrarian.Thing, error)
GetChildren returns IDs of all Things which are children of the identified Thing
func (*GcpDatastoreThinger) GetParents ¶
func (c *GcpDatastoreThinger) GetParents(childID string) ([]ytlibrarian.Thing, error)
GetParents returns IDs of all Things which are parents of the identified Thing
func (*GcpDatastoreThinger) GetRelationshipData ¶
func (c *GcpDatastoreThinger) GetRelationshipData(parentID, childID string) (string, error)
GetRelationshipData retrieves the data associated with the matching parent/child relationships
func (*GcpDatastoreThinger) GetThing ¶
func (c *GcpDatastoreThinger) GetThing(id string) (ytlibrarian.Thing, error)
GetThing retrieves a thing entity from the datastore by ID
func (*GcpDatastoreThinger) GetThingByReferenceID ¶
func (c *GcpDatastoreThinger) GetThingByReferenceID(id string) (ytlibrarian.Thing, error)
GetThingByReferenceID retrieves a thing entity from the datastore by reference ID
func (*GcpDatastoreThinger) GetThingsByReferenceIDs ¶
func (c *GcpDatastoreThinger) GetThingsByReferenceIDs(ids []string) ([]ytlibrarian.Thing, error)
GetThingsByReferenceIDs retrieves multiple thing entities from the datastore by reference IDs
func (*GcpDatastoreThinger) MakeRelationship ¶
func (c *GcpDatastoreThinger) MakeRelationship(parentID, childID, data string) error
MakeRelationship creates a relational entry between two Things
func (*GcpDatastoreThinger) RemoveThing ¶
func (c *GcpDatastoreThinger) RemoveThing(id string) error
RemoveThing deletes a thing entity from the datastore
func (*GcpDatastoreThinger) SaveThing ¶
func (c *GcpDatastoreThinger) SaveThing(t ytlibrarian.Thing) error
SaveThing saves a thing entity to the datastore
func (*GcpDatastoreThinger) UpdateRelationshipData ¶
func (c *GcpDatastoreThinger) UpdateRelationshipData(parentID, childID, data string) error
UpdateRelationshipData updates the data associated with the matching parent/child relationships
func (*GcpDatastoreThinger) UpdateThing ¶
func (c *GcpDatastoreThinger) UpdateThing(t ytlibrarian.Thing) error
UpdateThing updates a new entity