model

package
v0.0.0-...-352c0ba Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddNewCommentResponse

type AddNewCommentResponse struct {
	Message   string `json:"message"`
	CommentID int    `json:"commentID"`
}

type AuthResponse

type AuthResponse struct {
	Message string `json:"message"`
	User    *User  `json:"user"`
}

type Category

type Category struct {
	ID        int    `json:"id"`
	Title     string `json:"title"`
	Slug      string `json:"slug"`
	Content   string `json:"content"`
	CreatedAt int    `json:"createdAt"`
	UpdatedAt int    `json:"updatedAt"`
}

type Comment

type Comment struct {
	ID        int    `json:"id"`
	PostID    int    `json:"postID"`
	AuthorID  int    `json:"authorID"`
	Content   string `json:"content"`
	UpVote    int    `json:"upVote"`
	CreatedAt int    `json:"createdAt"`
	UpdatedAt int    `json:"updatedAt"`
}

type DeleteUserResponse

type DeleteUserResponse struct {
	Message string `json:"message"`
	User    *User  `json:"user"`
}

type EditUserResponse

type EditUserResponse struct {
	Message string `json:"message"`
	User    *User  `json:"user"`
}

type EditedUser

type EditedUser struct {
	Username  string `json:"username"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
	Avatar    string `json:"avatar"`
	Birthday  int    `json:"birthday"`
	Bio       string `json:"bio"`
	Facebook  string `json:"facebook"`
	Instagram string `json:"instagram"`
	Twitter   string `json:"twitter"`
}

type GetAllUsersResponse

type GetAllUsersResponse struct {
	Message string  `json:"message"`
	Users   []*User `json:"users"`
}

type GetCategoriesResponse

type GetCategoriesResponse struct {
	Message    string      `json:"message"`
	Categories []*Category `json:"categories"`
}

type GetCategoryResponse

type GetCategoryResponse struct {
	Message  string    `json:"message"`
	Category *Category `json:"category"`
}

type GetCommentsResponse

type GetCommentsResponse struct {
	Message  string     `json:"message"`
	Comments []*Comment `json:"comments"`
}

type GetPostByIDResponse

type GetPostByIDResponse struct {
	Message string `json:"message"`
	Post    *Post  `json:"post"`
}

type GetPostsResponse

type GetPostsResponse struct {
	Message string  `json:"message"`
	Posts   []*Post `json:"posts"`
}

type GetUserByIDResponse

type GetUserByIDResponse struct {
	Message string `json:"message"`
	User    *User  `json:"user"`
}

type NewCategory

type NewCategory struct {
	ID      int    `json:"id"`
	Title   string `json:"title"`
	Slug    string `json:"slug"`
	Content string `json:"content"`
}

type NewComment

type NewComment struct {
	ID       int    `json:"id"`
	PostID   int    `json:"postID"`
	AuthorID int    `json:"authorID"`
	Content  string `json:"content"`
}

type NewPost

type NewPost struct {
	ID       int    `json:"id"`
	AuthorID int    `json:"authorID"`
	ParentID int    `json:"parentID"`
	Title    string `json:"title"`
	Content  string `json:"content"`
}

type Post

type Post struct {
	ID          int    `json:"id"`
	AuthorID    int    `json:"authorID"`
	ParentID    int    `json:"parentID"`
	Title       string `json:"title"`
	Published   bool   `json:"published"`
	UpVote      int    `json:"upVote"`
	Content     string `json:"content"`
	CreatedAt   int    `json:"createdAt"`
	UpdatedAt   int    `json:"updatedAt"`
	PublishedAt int    `json:"publishedAt"`
}

type PostCategory

type PostCategory struct {
	PostID     int `json:"postID"`
	CategoryID int `json:"categoryID"`
}

type PostCategoryResponse

type PostCategoryResponse struct {
	Message string `json:"message"`
	PostID  int    `json:"postID"`
}

type Token

type Token struct {
	Token    string `json:"token"`
	ExpireAt int    `json:"expireAt"`
}

type UpVotes

type UpVotes struct {
	Message    string `json:"message"`
	NewUpVotes int    `json:"newUpVotes"`
}

type User

type User struct {
	ID        int    `json:"id"`
	Username  string `json:"username"`
	Email     string `json:"email"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
	Avatar    string `json:"avatar"`
	Birthday  int    `json:"birthday"`
	Bio       string `json:"bio"`
	Facebook  string `json:"facebook"`
	Instagram string `json:"instagram"`
	Twitter   string `json:"twitter"`
	IsAdmin   bool   `json:"isAdmin"`
	CreatedAt int    `json:"createdAt"`
	UpdatedAt int    `json:"updatedAt"`
}

Jump to

Keyboard shortcuts

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