view

package
v0.0.0-...-9ee4844 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoardCreate

type BoardCreate struct {
	Name       string `json:"name"`
	CreatorID  uint   `json:"creator_id"`
	CategoryID uint   `json:"category_id"`
}

type BoardPostsPreview

type BoardPostsPreview struct {
	Board BoardView     `json:"board"`
	Posts []PostPreview `json:"posts"`
}

type BoardPreview

type BoardPreview struct {
	ID   uint   `json:"id"`
	Name string `json:"name"`
}

type BoardView

type BoardView struct {
	ID                 uint   `json:"id"`
	Created            int64  `json:"created"`
	Name               string `json:"name"`
	Creator            string `json:"creator"`
	CreatorID          uint   `json:"creator_id"`
	IsSubscribed       bool   `json:"is_subscribed"`
	SubscriptionsCount int    `json:"subscriptions_count"`
}

type Category

type Category struct {
	ID     uint           `json:"id"`
	Name   string         `json:"name"`
	Boards []BoardPreview `json:"boards"`
}

type CommentCreate

type CommentCreate struct {
	PostID   uint            `json:"post_id"`
	Content  json.RawMessage `json:"content"`
	AuthorID uint            `json:"author"`
	ParentID uint            `json:"parent_id"`
}

type CommentPreview

type CommentPreview struct {
	ID       uint            `json:"id"`
	Content  json.RawMessage `json:"content"`
	Author   string          `json:"author"`
	Created  int64           `json:"created"`
	Likes    int             `json:"likes"`
	Dislikes int             `json:"dislikes"`
	ParentID uint            `json:"parent_id"`
	PostID   uint            `json:"post_id"`
	Reaction int             `json:"reaction"`
}

type CommentUpdate

type CommentUpdate struct {
	ID      uint
	Content json.RawMessage `json:"content"`
}

type File

type File struct {
	FileID   uuid.UUID
	Filename string
}

type NotificationCreate

type NotificationCreate struct {
	PostID  uint
	BoardID uint
}

type NotificationMarkAsRead

type NotificationMarkAsRead struct {
	NotificationID uint `json:"notification_id"`
}

type NotificationPreview

type NotificationPreview struct {
	ID        uint   `json:"id"`
	Type      string `json:"type"`
	PostID    uint   `json:"post_id"`
	BoardID   uint   `json:"board_id"`
	PostTitle string `json:"post_title"`
	Board     string `json:"board"`
}

type PostCreate

type PostCreate struct {
	Title    string          `json:"title"`
	Content  json.RawMessage `json:"content"`
	AuthorID uint            `json:"author_id"`
	BoardID  uint            `json:"board_id"`
}

type PostPreview

type PostPreview struct {
	ID       uint            `json:"id"`
	Title    string          `json:"title"`
	Content  json.RawMessage `json:"content"`
	Author   string          `json:"author"`
	Board    string          `json:"board"`
	Created  int64           `json:"created"`
	Likes    int             `json:"likes"`
	Dislikes int             `json:"dislikes"`
	Comments int             `json:"comments"`
	Reaction int             `json:"reaction"`
}

type PostUpdate

type PostUpdate struct {
	ID      uint
	Title   string          `json:"title"`
	Content json.RawMessage `json:"content"`
}

type PostView

type PostView struct {
	ID       uint             `json:"id"`
	Title    string           `json:"title"`
	Content  json.RawMessage  `json:"content"`
	Author   string           `json:"author"`
	Board    string           `json:"board"`
	Created  int64            `json:"created"`
	Likes    int              `json:"likes"`
	Dislikes int              `json:"dislikes"`
	Reaction int              `json:"reaction"`
	Comments []CommentPreview `json:"comments"`
}

type ReactionComment

type ReactionComment struct {
	CommentID uint `json:"comment_id"`
	Type      int  `json:"type"`
}

type ReactionPost

type ReactionPost struct {
	PostID uint `json:"post_id"`
	Type   int  `json:"type"`
}

type Subscription

type Subscription struct {
	BoardID uint `json:"board_id"`
}

type UserCreate

type UserCreate struct {
	Username string `json:"username"`
	Avatar   string `json:"avatar_url"`
	Login    string `json:"login"`
	Email    string `json:"email"`
	ID       uint   `json:"id"`
}

type UserInfo

type UserInfo struct {
	ID       uint   `json:"id"`
	Username string `json:"username"`
	Avatar   string `json:"avatar_url"`
	Login    string `json:"login"`
	Email    string `json:"email"`
	Role     string `json:"role"`
}

type UserProfile

type UserProfile struct {
	ID       uint   `json:"id"`
	Username string `json:"username"`
	Avatar   string `json:"avatar_url"`
	Email    string `json:"email"`
	Karma    int    `json:"karma"`
}

Jump to

Keyboard shortcuts

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