Documentation
¶
Index ¶
- type Store
- func (store *Store) CheckOrCreatePredicate(ctx *context.Context, parentUid string, childUid string) (exists bool, err error)
- func (store *Store) CheckPredicate(ctx *context.Context, parentUid string, childUid string) (exists bool, err error)
- func (store *Store) Connect()
- func (store *Store) DeleteAll() (err error)
- func (store *Store) FindNode(ctx *context.Context, Url string, depth int) (currentPage *page.Page, err error)
- func (store *Store) FindOrCreateNode(ctx *context.Context, currentPage *page.Page) (uid string, err error)
- func (store *Store) SetSchema() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { DB *dgo.Dgraph Connection []*grpc.ClientConn }
Store holds dgraph client and connections
func (*Store) CheckOrCreatePredicate ¶
func (store *Store) CheckOrCreatePredicate(ctx *context.Context, parentUid string, childUid string) (exists bool, err error)
CheckOrCreatePredicate function checks for edge, creates if doesn't exist.
func (*Store) CheckPredicate ¶
func (store *Store) CheckPredicate(ctx *context.Context, parentUid string, childUid string) (exists bool, err error)
CheckPredicate function checks to see if edge exists
func (*Store) Connect ¶
func (store *Store) Connect()
Connect function initiates connections to database
func (*Store) FindNode ¶
func (store *Store) FindNode(ctx *context.Context, Url string, depth int) (currentPage *page.Page, err error)
FindNode function finds Page by URL and depth
Click to show internal directories.
Click to hide internal directories.