Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrPostNotFound = errors.New("post not found")
)
Post data errors
Functions ¶
This section is empty.
Types ¶
type LikeRepository ¶
type LikeRepository interface { Create(ctx context.Context, postID int, userReferenceID string) error Delete(ctx context.Context, postID int, userReferenceID string) error }
LikeRepository is a high level interface used to manipulate persisted post like data.
func NewLikeRepository ¶
func NewLikeRepository(db database.Database) LikeRepository
NewLikeRepository returns a new instance of LikeRepository.
type PostRepository ¶
type PostRepository interface { Create(ctx context.Context, p *model.Post) error GetFeed(ctx context.Context, userReferenceID string) ([]*dto.FeedItem, error) Get(ctx context.Context, referenceID, userReferenceID string) (*model.Post, error) }
PostRepository is a high level interface used to manipulate post data.
func NewPostRepository ¶
func NewPostRepository(url string) PostRepository
NewPostRepository returns a new instance of PostRepository.
Click to show internal directories.
Click to hide internal directories.