post

package
v0.0.0-...-9305a47 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorPostNotFound = errors.New("post not found")
)

Functions

This section is empty.

Types

type IPost

type IPost interface {
	Feed(ctx context.Context, req *dto.FeedPostDTO) ([]*entity.Post, int64, error)
	PublicGet(ctx context.Context, id int64) (*entity.Post, error)

	Create(ctx context.Context, req *dto.CreatePostDTO, userID int64) (*entity.Post, error)
	Edit(ctx context.Context, req *dto.EditPostDTO, userID int64) (*entity.Post, error)
	List(ctx context.Context, req *dto.ListPostDTO, userID int64) ([]*entity.Post, int64, error)
}

type Post

type Post struct {
	// contains filtered or unexported fields
}

func New

func (*Post) Create

func (p *Post) Create(ctx context.Context, req *dto.CreatePostDTO, userID int64) (*entity.Post, error)

func (*Post) Edit

func (p *Post) Edit(ctx context.Context, req *dto.EditPostDTO, userID int64) (*entity.Post, error)

func (*Post) Feed

func (p *Post) Feed(ctx context.Context, req *dto.FeedPostDTO) ([]*entity.Post, int64, error)

func (*Post) List

func (p *Post) List(ctx context.Context, req *dto.ListPostDTO, userID int64) ([]*entity.Post, int64, error)

func (*Post) PublicGet

func (p *Post) PublicGet(ctx context.Context, id int64) (*entity.Post, error)

Jump to

Keyboard shortcuts

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