Documentation
¶
Index ¶
- type CreatePostParams
- type DeletePostParams
- type GetFeedParams
- type GetLastPostsParams
- type GetPostByIDParams
- type Service
- type ServiceImpl
- func (s *ServiceImpl) Create(ctx context.Context, params *CreatePostParams) (*model.Post, error)
- func (s *ServiceImpl) Delete(ctx context.Context, params *DeletePostParams) error
- func (s *ServiceImpl) GetFeed(ctx context.Context, params *GetFeedParams) ([]*model.Post, error)
- func (s *ServiceImpl) GetLastPosts(ctx context.Context, params *GetLastPostsParams) ([]*model.Post, error)
- func (s *ServiceImpl) GetPostByID(ctx context.Context, params *GetPostByIDParams) (*model.Post, error)
- func (s *ServiceImpl) Update(ctx context.Context, params *UpdatePostParams) error
- type UpdatePostParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreatePostParams ¶
type DeletePostParams ¶
type GetFeedParams ¶
type GetLastPostsParams ¶
type GetPostByIDParams ¶
type Service ¶
type Service interface { Create(ctx context.Context, params *CreatePostParams) (*model.Post, error) GetPostByID(ctx context.Context, params *GetPostByIDParams) (*model.Post, error) Update(ctx context.Context, params *UpdatePostParams) error Delete(ctx context.Context, params *DeletePostParams) error GetFeed(ctx context.Context, params *GetFeedParams) ([]*model.Post, error) GetLastPosts(ctx context.Context, params *GetLastPostsParams) ([]*model.Post, error) }
type ServiceImpl ¶
type ServiceImpl struct { Storage storage.Storage Cache cache.Service Logger *zap.Logger ProducerService *queue.ProducerService }
func (*ServiceImpl) Create ¶
func (s *ServiceImpl) Create(ctx context.Context, params *CreatePostParams) (*model.Post, error)
func (*ServiceImpl) Delete ¶
func (s *ServiceImpl) Delete(ctx context.Context, params *DeletePostParams) error
func (*ServiceImpl) GetFeed ¶
func (s *ServiceImpl) GetFeed(ctx context.Context, params *GetFeedParams) ([]*model.Post, error)
func (*ServiceImpl) GetLastPosts ¶
func (s *ServiceImpl) GetLastPosts(ctx context.Context, params *GetLastPostsParams) ([]*model.Post, error)
func (*ServiceImpl) GetPostByID ¶
func (s *ServiceImpl) GetPostByID(ctx context.Context, params *GetPostByIDParams) (*model.Post, error)
func (*ServiceImpl) Update ¶
func (s *ServiceImpl) Update(ctx context.Context, params *UpdatePostParams) error
type UpdatePostParams ¶
Click to show internal directories.
Click to hide internal directories.