gcpdatastore

package
v0.9.2-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(projectID string) (ytlibrarian.Thinger, error)

New creates a new GcpDatastoreThinger

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL