post

package
v0.0.0-...-a7107f1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostsSortType

type PostsSortType string
const (
	FlatSort       PostsSortType = "flat"
	TreeSort       PostsSortType = "tree"
	ParentTreeSort PostsSortType = "parent_tree"
)

type Repository

type Repository interface {
	CreatePostsInThread(thread models.Thread, posts models.Posts) (models.Posts, error)
	GetPostByID(id int64) (models.Post, error)
	UpdatePostByID(post models.Post) (models.Post, error)
	GetSortedPostsByThreadSlugOrID(threadID int32, sincePostID *int64,
		sort PostsSortType, desc bool, limit int64) (models.Posts, error)
}

type UseCase

type UseCase interface {
	CreatePostsByThreadSlugOrID(threadSlugOrID string, posts models.Posts) (models.Posts, error)
	GetPostInfoByID(id int64, related []string) (models.PostFullInfo, error)
	UpdatePostByID(post models.Post) (models.Post, error)
	GetSortedPostsByThreadSlugOrID(threadSlugOrID, sincePostID,
		sort, desc, limit string) (models.Posts, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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