Versions in this module Expand all Collapse all v0 v0.0.9 Oct 20, 2024 v0.0.7 Oct 18, 2024 Changes in this version + func EntityKindStringFromProto(e *npb.Entity) string + func ReadFragmentFiles(fragmentFilenames []string) (*npb.Fragment, error) + type Collection struct + Entities map[string]*npb.Entity + InEdges map[string]*RelationshipSet + OutEdges map[string]*RelationshipSet + func NewCollection() *Collection + func (erColl *Collection) EntityExists(key string) bool + func (erColl *Collection) InsertEntity(entity *npb.Entity) error + func (erColl *Collection) InsertRelationship(r Relationship) error + func (erColl *Collection) InsertRelationshipProto(relationship *npb.Relationship) error + func (erColl *Collection) NumEntities() int + func (erColl *Collection) NumRelationships() int + type CollectionBuilder struct + func NewCollectionBuilder(v Validator) *CollectionBuilder + func NewNonValidatingCollectionBuilder() *CollectionBuilder + func (builder *CollectionBuilder) Build() (*Collection, error) + func (builder *CollectionBuilder) InsertFragments(fragments ...*npb.Fragment) error + type Relationship struct + A string + Kind npb.RK + Z string + func RelationshipFromProto(r *npb.Relationship) Relationship + func (r *Relationship) String() string + type RelationshipSet struct + Relations map[Relationship]struct{} + func NewRelationshipSet() *RelationshipSet + func (rset *RelationshipSet) Insert(r Relationship) error + type Validator interface + ValidateCollection func(*Collection) error + ValidateEntity func(*Collection, *npb.Entity) error + ValidateRelationship func(*Collection, Relationship) error