dal

package
v0.0.0-...-0a741b5 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandContentNode

func ExpandContentNode(db *dgo.Dgraph, uid string) (resp models.ContentNode, err error)

ExpandContentNode is a function to get the data for a node and its children

func GetInvite

func GetInvite(db *dgo.Dgraph, inviteCode string) (resp models.Invite, err error)

GetInvite will return the struct representing a particular invite matching the given code

func GetRole

func GetRole(db *dgo.Dgraph, uid string) (resp models.Role, err error)

GetRole returns a struct with a summary of the information for a role

func GetUser

func GetUser(db *dgo.Dgraph, uid string) (resp models.User, err error)

GetUser returns a struct with a summary of the information for a user

func Mutator

func Mutator(db *dgo.Dgraph, structToMutate interface{}) (uid string, err error)

Mutator is a wrapper to handle DGraph mutations

func NewContentNode

func NewContentNode(db *dgo.Dgraph, node models.NewContentNodeNode) (uid string, err error)

NewContentNode creates a new ContentNode based on the provided struct

func NewInvite

func NewInvite(db *dgo.Dgraph, invite models.Invite, currentUser models.User) (uid string, err error)

NewInvite creates a new invite owned by the current user

func NewRole

func NewRole(db *dgo.Dgraph, role models.Role) (uid string, err error)

NewRole creates a new User based on the provided struct

func NewUser

func NewUser(db *dgo.Dgraph, user models.User, inviteCode string) (uid string, err error)

NewUser creates a new User based on the provided struct

func SimpleQuery

func SimpleQuery(db *dgo.Dgraph, q string, match string) (resp []byte, err error)

SimpleQuery is a genericized function to wrap queries for a node by UID

Types

This section is empty.

Jump to

Keyboard shortcuts

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