Documentation ¶
Index ¶
- type Repository
- func (_m *Repository) Create(ctx context.Context, post posts.Post) (posts.Post, error)
- func (_m *Repository) CreateComment(ctx context.Context, postID string, comment posts.Comment) (posts.Comment, error)
- func (_m *Repository) CreateLike(ctx context.Context, postID string, like posts.Like) (posts.Like, error)
- func (_m *Repository) CreateShare(ctx context.Context, postID string, share posts.Share) (posts.Share, error)
- func (_m *Repository) Delete(ctx context.Context, id string) error
- func (_m *Repository) DeleteComment(ctx context.Context, id string) error
- func (_m *Repository) DeleteLike(ctx context.Context, postID string, userID string) error
- func (_m *Repository) DeleteShare(ctx context.Context, id string) error
- func (_m *Repository) RetrieveAll(ctx context.Context, page posts.Page) (posts.PostsPage, error)
- func (_m *Repository) RetrieveAllComments(ctx context.Context, page posts.Page) (posts.CommentsPage, error)
- func (_m *Repository) RetrieveAllLikes(ctx context.Context, page posts.Page) (posts.LikesPage, error)
- func (_m *Repository) RetrieveAllShares(ctx context.Context, page posts.Page) (posts.SharesPage, error)
- func (_m *Repository) RetrieveByID(ctx context.Context, id string) (posts.Post, error)
- func (_m *Repository) RetrieveCommentByID(ctx context.Context, id string) (posts.Comment, error)
- func (_m *Repository) RetrieveShareByID(ctx context.Context, id string) (posts.Share, error)
- func (_m *Repository) Update(ctx context.Context, post posts.Post) (posts.Post, error)
- func (_m *Repository) UpdateComment(ctx context.Context, comment posts.Comment) (posts.Comment, error)
- func (_m *Repository) UpdateContent(ctx context.Context, post posts.Post) (posts.Post, error)
- func (_m *Repository) UpdateImageURL(ctx context.Context, post posts.Post) (posts.Post, error)
- func (_m *Repository) UpdateTags(ctx context.Context, post posts.Post) (posts.Post, error)
- func (_m *Repository) UpdateVisibility(ctx context.Context, post posts.Post) (posts.Post, error)
- type Service
- func (_m *Service) CreateComment(ctx context.Context, token string, postID string, comment posts.Comment) (posts.Comment, error)
- func (_m *Service) CreateLike(ctx context.Context, token string, postID string, like posts.Like) (posts.Like, error)
- func (_m *Service) CreatePost(ctx context.Context, token string, post posts.Post) (posts.Post, error)
- func (_m *Service) CreateShare(ctx context.Context, token string, postID string, share posts.Share) (posts.Share, error)
- func (_m *Service) DeleteComment(ctx context.Context, roken string, id string) error
- func (_m *Service) DeleteLike(ctx context.Context, token string, postID string) error
- func (_m *Service) DeletePost(ctx context.Context, token string, id string) error
- func (_m *Service) DeleteShare(ctx context.Context, token string, postID string) error
- func (_m *Service) RetrieveAllComments(ctx context.Context, token string, page posts.Page) (posts.CommentsPage, error)
- func (_m *Service) RetrieveAllLikes(ctx context.Context, token string, page posts.Page) (posts.LikesPage, error)
- func (_m *Service) RetrieveAllPosts(ctx context.Context, token string, page posts.Page) (posts.PostsPage, error)
- func (_m *Service) RetrieveAllShares(ctx context.Context, token string, page posts.Page) (posts.SharesPage, error)
- func (_m *Service) RetrieveCommentByID(ctx context.Context, token string, id string) (posts.Comment, error)
- func (_m *Service) RetrievePostByID(ctx context.Context, token string, id string) (posts.Post, error)
- func (_m *Service) UpdateComment(ctx context.Context, token string, comment posts.Comment) (posts.Comment, error)
- func (_m *Service) UpdatePost(ctx context.Context, token string, post posts.Post) (posts.Post, error)
- func (_m *Service) UpdatePostContent(ctx context.Context, token string, post posts.Post) (posts.Post, error)
- func (_m *Service) UpdatePostImageURL(ctx context.Context, token string, post posts.Post) (posts.Post, error)
- func (_m *Service) UpdatePostTags(ctx context.Context, token string, post posts.Post) (posts.Post, error)
- func (_m *Service) UpdatePostVisibility(ctx context.Context, token string, post posts.Post) (posts.Post, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
Repository is an autogenerated mock type for the Repository type
func NewRepository ¶
func NewRepository(t interface { mock.TestingT Cleanup(func()) }) *Repository
NewRepository creates a new instance of Repository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Repository) CreateComment ¶
func (_m *Repository) CreateComment(ctx context.Context, postID string, comment posts.Comment) (posts.Comment, error)
CreateComment provides a mock function with given fields: ctx, postID, comment
func (*Repository) CreateLike ¶
func (_m *Repository) CreateLike(ctx context.Context, postID string, like posts.Like) (posts.Like, error)
CreateLike provides a mock function with given fields: ctx, postID, like
func (*Repository) CreateShare ¶
func (_m *Repository) CreateShare(ctx context.Context, postID string, share posts.Share) (posts.Share, error)
CreateShare provides a mock function with given fields: ctx, postID, share
func (*Repository) Delete ¶
func (_m *Repository) Delete(ctx context.Context, id string) error
Delete provides a mock function with given fields: ctx, id
func (*Repository) DeleteComment ¶
func (_m *Repository) DeleteComment(ctx context.Context, id string) error
DeleteComment provides a mock function with given fields: ctx, id
func (*Repository) DeleteLike ¶
DeleteLike provides a mock function with given fields: ctx, postID, userID
func (*Repository) DeleteShare ¶
func (_m *Repository) DeleteShare(ctx context.Context, id string) error
DeleteShare provides a mock function with given fields: ctx, id
func (*Repository) RetrieveAll ¶
RetrieveAll provides a mock function with given fields: ctx, page
func (*Repository) RetrieveAllComments ¶
func (_m *Repository) RetrieveAllComments(ctx context.Context, page posts.Page) (posts.CommentsPage, error)
RetrieveAllComments provides a mock function with given fields: ctx, page
func (*Repository) RetrieveAllLikes ¶
func (_m *Repository) RetrieveAllLikes(ctx context.Context, page posts.Page) (posts.LikesPage, error)
RetrieveAllLikes provides a mock function with given fields: ctx, page
func (*Repository) RetrieveAllShares ¶
func (_m *Repository) RetrieveAllShares(ctx context.Context, page posts.Page) (posts.SharesPage, error)
RetrieveAllShares provides a mock function with given fields: ctx, page
func (*Repository) RetrieveByID ¶
RetrieveByID provides a mock function with given fields: ctx, id
func (*Repository) RetrieveCommentByID ¶
RetrieveCommentByID provides a mock function with given fields: ctx, id
func (*Repository) RetrieveShareByID ¶
RetrieveShareByID provides a mock function with given fields: ctx, id
func (*Repository) UpdateComment ¶
func (_m *Repository) UpdateComment(ctx context.Context, comment posts.Comment) (posts.Comment, error)
UpdateComment provides a mock function with given fields: ctx, comment
func (*Repository) UpdateContent ¶
UpdateContent provides a mock function with given fields: ctx, post
func (*Repository) UpdateImageURL ¶
UpdateImageURL provides a mock function with given fields: ctx, post
func (*Repository) UpdateTags ¶
UpdateTags provides a mock function with given fields: ctx, post
func (*Repository) UpdateVisibility ¶
UpdateVisibility provides a mock function with given fields: ctx, post
type Service ¶
Service is an autogenerated mock type for the Service type
func NewService ¶
NewService creates a new instance of Service. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Service) CreateComment ¶
func (_m *Service) CreateComment(ctx context.Context, token string, postID string, comment posts.Comment) (posts.Comment, error)
CreateComment provides a mock function with given fields: ctx, token, postID, comment
func (*Service) CreateLike ¶
func (_m *Service) CreateLike(ctx context.Context, token string, postID string, like posts.Like) (posts.Like, error)
CreateLike provides a mock function with given fields: ctx, token, postID, like
func (*Service) CreatePost ¶
func (_m *Service) CreatePost(ctx context.Context, token string, post posts.Post) (posts.Post, error)
CreatePost provides a mock function with given fields: ctx, token, post
func (*Service) CreateShare ¶
func (_m *Service) CreateShare(ctx context.Context, token string, postID string, share posts.Share) (posts.Share, error)
CreateShare provides a mock function with given fields: ctx, token, postID, share
func (*Service) DeleteComment ¶
DeleteComment provides a mock function with given fields: ctx, roken, id
func (*Service) DeleteLike ¶
DeleteLike provides a mock function with given fields: ctx, token, postID
func (*Service) DeletePost ¶
DeletePost provides a mock function with given fields: ctx, token, id
func (*Service) DeleteShare ¶
DeleteShare provides a mock function with given fields: ctx, token, postID
func (*Service) RetrieveAllComments ¶
func (_m *Service) RetrieveAllComments(ctx context.Context, token string, page posts.Page) (posts.CommentsPage, error)
RetrieveAllComments provides a mock function with given fields: ctx, token, page
func (*Service) RetrieveAllLikes ¶
func (_m *Service) RetrieveAllLikes(ctx context.Context, token string, page posts.Page) (posts.LikesPage, error)
RetrieveAllLikes provides a mock function with given fields: ctx, token, page
func (*Service) RetrieveAllPosts ¶
func (_m *Service) RetrieveAllPosts(ctx context.Context, token string, page posts.Page) (posts.PostsPage, error)
RetrieveAllPosts provides a mock function with given fields: ctx, token, page
func (*Service) RetrieveAllShares ¶
func (_m *Service) RetrieveAllShares(ctx context.Context, token string, page posts.Page) (posts.SharesPage, error)
RetrieveAllShares provides a mock function with given fields: ctx, token, page
func (*Service) RetrieveCommentByID ¶
func (_m *Service) RetrieveCommentByID(ctx context.Context, token string, id string) (posts.Comment, error)
RetrieveCommentByID provides a mock function with given fields: ctx, token, id
func (*Service) RetrievePostByID ¶
func (_m *Service) RetrievePostByID(ctx context.Context, token string, id string) (posts.Post, error)
RetrievePostByID provides a mock function with given fields: ctx, token, id
func (*Service) UpdateComment ¶
func (_m *Service) UpdateComment(ctx context.Context, token string, comment posts.Comment) (posts.Comment, error)
UpdateComment provides a mock function with given fields: ctx, token, comment
func (*Service) UpdatePost ¶
func (_m *Service) UpdatePost(ctx context.Context, token string, post posts.Post) (posts.Post, error)
UpdatePost provides a mock function with given fields: ctx, token, post
func (*Service) UpdatePostContent ¶
func (_m *Service) UpdatePostContent(ctx context.Context, token string, post posts.Post) (posts.Post, error)
UpdatePostContent provides a mock function with given fields: ctx, token, post
func (*Service) UpdatePostImageURL ¶
func (_m *Service) UpdatePostImageURL(ctx context.Context, token string, post posts.Post) (posts.Post, error)
UpdatePostImageURL provides a mock function with given fields: ctx, token, post