Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadSchema ¶
LoadSchema makes sure the DGraph schema is loaded into the database on starting
Types ¶
type ContentNode ¶
type ContentNode struct { // title Title string `json:"title,omitempty"` // body Body string `json:"body,omitempty"` // children // Required: true Children []*ContentNode `json:"~parent,omitempty"` // created // Required: true Created time.Time `json:"created,omitempty"` // edited // Required: true Edited time.Time `json:"edited,omitempty"` // image Uri ImageURI *url.URL `json:"imageUri,omitempty"` // score // Required: true Score float64 `json:"score,omitempty"` // sentiment // Required: true Sentiment float64 `json:"sentiment,omitempty"` // tags Tags []Tag `json:"tags,omitempty"` // type DgraphType []string `json:"dgraph.type,omitempty"` // uid UID string `json:"uid,omitempty"` }
ContentNode content node
type Edge ¶
type Edge struct {
UID string `json:"uid"`
}
Edge handles the fact that DGraph expects edges to be sub objects, not fields
type Invite ¶
type Invite struct { // code Code string `json:"code,omitempty"` // created by CreatedBy *User `json:"createdBy,omitempty"` // uid UID *string `json:"uid,omitempty"` // type DgraphType []string `json:"dgraph.type,omitempty"` }
Invite invite swagger:model Invite
type NewContentNodeNode ¶
type NewContentNodeNode struct { ContentNode ParentUID *Edge `json:"parent,omitempty"` }
NewContentNodeNode is a struct designed to handle special parameters for creating a node in DGraph
type Role ¶
type Role struct { // text // Required: true Text string `json:"text,omitempty"` // uid UID *string `json:"uid,omitempty"` // type DgraphType []string `json:"dgraph.type,omitempty"` }
Role role
type Tag ¶
type Tag struct { // text // Required: true Text string `json:"text,omitempty"` // uid UID string `json:"uid,omitempty"` }
Tag tag
type User ¶
type User struct { // avi img Uri AviImgURI *string `json:"aviImgUri,omitempty"` // commented Posted []ContentNode `json:"~author,omitempty"` // email // Required: true Email string `json:"email,omitempty"` // invited by InvitedBy []*User `json:"invitedBy,omitempty"` // joined // Required: true Joined *time.Time `json:"joined,omitempty"` // name // Required: true Name string `json:"name,omitempty"` // reputation // Required: true Reputation float64 `json:"reputation,omitempty"` // role // Required: true Role []*Role `json:"role,omitempty"` // spent Spent float64 `json:"spent,omitempty"` // uid UID *string `json:"uid,omitempty"` // type DgraphType []string `json:"dgraph.type,omitempty"` }
Click to show internal directories.
Click to hide internal directories.