Documentation ¶
Index ¶
- type AuthService
- type AuthServiceImpl
- type PostService
- type PostServiceImpl
- func (p *PostServiceImpl) CreatePost(post *models.CreatePostRequest) (*models.DBPost, error)
- func (p *PostServiceImpl) DeletePost(id string) error
- func (p *PostServiceImpl) FindPostById(id string) (*models.DBPost, error)
- func (p *PostServiceImpl) FindPosts(page int, limit int) ([]*models.DBPost, error)
- func (p *PostServiceImpl) UpdatePost(id string, data *models.UpdatePost) (*models.DBPost, error)
- type UserService
- type UserServiceImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService interface { SignUpUser(*models.SignUpInput) (*models.DBResponse, error) SignInUser(*models.SignInInput) (*models.DBResponse, error) }
func NewAuthService ¶
func NewAuthService(collection *mongo.Collection, ctx context.Context) AuthService
type AuthServiceImpl ¶
type AuthServiceImpl struct {
// contains filtered or unexported fields
}
func (*AuthServiceImpl) SignInUser ¶
func (uc *AuthServiceImpl) SignInUser(*models.SignInInput) (*models.DBResponse, error)
func (*AuthServiceImpl) SignUpUser ¶
func (uc *AuthServiceImpl) SignUpUser(user *models.SignUpInput) (*models.DBResponse, error)
type PostService ¶
type PostService interface { CreatePost(*models.CreatePostRequest) (*models.DBPost, error) UpdatePost(string, *models.UpdatePost) (*models.DBPost, error) FindPostById(string) (*models.DBPost, error) FindPosts(page int, limit int) ([]*models.DBPost, error) DeletePost(string) error }
func NewPostService ¶
func NewPostService(postCollection *mongo.Collection, ctx context.Context) PostService
type PostServiceImpl ¶
type PostServiceImpl struct {
// contains filtered or unexported fields
}
func (*PostServiceImpl) CreatePost ¶
func (p *PostServiceImpl) CreatePost(post *models.CreatePostRequest) (*models.DBPost, error)
func (*PostServiceImpl) DeletePost ¶
func (p *PostServiceImpl) DeletePost(id string) error
func (*PostServiceImpl) FindPostById ¶
func (p *PostServiceImpl) FindPostById(id string) (*models.DBPost, error)
func (*PostServiceImpl) UpdatePost ¶
func (p *PostServiceImpl) UpdatePost(id string, data *models.UpdatePost) (*models.DBPost, error)
type UserService ¶
type UserService interface { FindUserById(id string) (*models.DBResponse, error) FindUserByEmail(email string) (*models.DBResponse, error) UpdateUserById(id string, data *models.UpdateInput) (*models.DBResponse, error) }
func NewUserServiceImpl ¶
func NewUserServiceImpl(collection *mongo.Collection, ctx context.Context) UserService
type UserServiceImpl ¶
type UserServiceImpl struct {
// contains filtered or unexported fields
}
func (*UserServiceImpl) FindUserByEmail ¶
func (us *UserServiceImpl) FindUserByEmail(email string) (*models.DBResponse, error)
func (*UserServiceImpl) FindUserById ¶
func (us *UserServiceImpl) FindUserById(id string) (*models.DBResponse, error)
func (*UserServiceImpl) UpdateUserById ¶
func (uc *UserServiceImpl) UpdateUserById(id string, data *models.UpdateInput) (*models.DBResponse, error)
Click to show internal directories.
Click to hide internal directories.