thread

package
v0.0.0-...-372bfc1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository interface {
	CreateThread(thread *model.NewThread) (*model.Thread, error)
	FindByIdOrSlug(id int, slug string) (*model.Thread, error)
	CreatePosts(thread *model.Thread, posts []*model.Post) ([]*model.Post, error)
	UpdateThread(id int, slug string, update *model.ThreadUpdate) (*model.Thread, error)
	GetThreadPosts(thread *model.Thread, limit, desc, since, sort string) ([]model.Post, error)
	Vote(thread *model.Thread, vote *model.Vote) (*model.Thread, error)
	FindPostId(id string, includeUser, includeForum, includeThread bool) (*model.PostFull, error)
	UpdatePost(id string, message string) (*model.Post, error)
	GetStatus() (*model.Status, error)
	ClearAll() error
}

type Usecase

type Usecase interface {
	CreatePosts(threadSlugOrId string, posts []*model.Post) ([]*model.Post, int, error)
	FindByIdOrSlug(threadSlugOrId string) (*model.Thread, error)
	UpdateThread(threadSlugOrId string, update *model.ThreadUpdate) (*model.Thread, error)
	GetThreadPosts(threadSlugOrId string, limit string, desc bool, since string, sort string) ([]model.Post, error)
	Vote(threadSlugOrId string, vote *model.Vote) (*model.Thread, error)
	FindPostId(id string, includeUser bool, includeForum bool, includeThread bool) (*model.PostFull, error)
	UpdatePost(id string, message string) (*model.Post, error)
	ClearAll() error
	GetStatus() (*model.Status, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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