postModel

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Post

type Post struct {
	ID          int32  `db:"id"`
	AuthorId    int32  `db:"author_id"`
	ParentId    int32  `db:"parent_id"`
	Title       string `db:"title"`
	Published   bool   `db:"published"`
	UpVote      int32  `db:"up_vote"`
	Content     string `db:"content"`
	CreatedAt   int32  `db:"created_at"`
	UpdatedAt   int32  `db:"updated_at"`
	PublishedAt int32  `db:"published_at"`
}

func GetCategoryPosts

func GetCategoryPosts(categoryId int32, offset int32, limit int32) (success bool, foundPosts []*Post, err error)

GetCategoryPosts func

func GetFeed

func GetFeed(offset int32, limit int32) (success bool, foundPosts []*Post, err error)

GetFeed func

func GetPostById

func GetPostById(requesterId int32, postId int32) (bool, *Post, error)

GetPostById func

func GetUserAllPosts

func GetUserAllPosts(ownerId int32, offset int32, limit int32) (success bool, foundPosts []*Post, err error)

GetUserAllPosts func

func GetUserPublishedPosts

func GetUserPublishedPosts(requesterId int32, userId int32, offset int32, limit int32) (success bool, foundPosts []*Post, err error)

GetUserPublishedPosts func

func GetUserUnPublishedPosts

func GetUserUnPublishedPosts(ownerId int32, offset int32, limit int32) (success bool, foundPosts []*Post, err error)

GetUserUnPublishedPosts func

Jump to

Keyboard shortcuts

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