Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Post ¶
type Post struct { UID string `json:"uid"` ID store.ID `json:"Post.id"` Creation time.Time `json:"Post.creation"` Author []User `json:"Post.author"` Title string `json:"Post.title"` Contents string `json:"Post.contents"` Reactions []Reaction `json:"Post.reactions"` }
Post represents a database model for the Post entity
type Reaction ¶
type Reaction struct { UID string `json:"uid"` ID store.ID `json:"Reaction.id"` Subject []ReactionSubject `json:"Reaction.subject"` Creation time.Time `json:"Reaction.creation"` Author []User `json:"Reaction.author"` Message string `json:"Reaction.message"` Emotion emotion.Emotion `json:"Reaction.emotion"` Reactions []Reaction `json:"Reaction.reactions"` }
Reaction represents a database model for the Reaction entity
type ReactionSubject ¶
type ReactionSubject struct {
V interface{}
}
ReactionSubject represents a union (Post | Reaction) type wrapper
func (ReactionSubject) MarshalJSON ¶
func (u ReactionSubject) MarshalJSON() ([]byte, error)
MarshalJSON implements the Marshaler interface
func (ReactionSubject) UID ¶
func (u ReactionSubject) UID() *string
UID returns the unique entity node ID
func (*ReactionSubject) UnmarshalJSON ¶
func (u *ReactionSubject) UnmarshalJSON(d []byte) error
UnmarshalJSON implements the Unmarshaler interface
type Session ¶
type Session struct { UID string `json:"uid"` Key string `json:"Session.key"` Creation time.Time `json:"Session.creation"` User []User `json:"Session.user"` RSessions []UID `json:"~sessions"` }
Session represents a database model for the Session entity
type User ¶
type User struct { UID string `json:"uid"` ID store.ID `json:"User.id"` Creation time.Time `json:"User.creation"` Email string `json:"User.email"` DisplayName string `json:"User.displayName"` Password string `json:"User.password"` Posts []Post `json:"User.posts"` Sessions []Session `json:"User.sessions"` PublishedReactions []Reaction `json:"User.publishedReactions"` }
User represents the database model for the User entity
Click to show internal directories.
Click to hide internal directories.