Documentation ¶
Index ¶
- Variables
- type DeleteComment
- type DeleteCommentUseCaseInterface
- type DeleteFollow
- type DeleteFollowUseCaseInterface
- type DeleteLike
- type DeleteLikeUseCaseInterface
- type DeletePosting
- type DeletePostingUseCaseInterface
- type DeleteUser
- type DeleteUserUseCaseInterface
- type GetComments
- type GetCommentsUseCaseInterface
- type GetNotifications
- type GetNotificationsUseCaseInterface
- type GetPostings
- type GetPostingsUseCaseInterface
- type GetUser
- type GetUserUseCaseInterface
- type Login
- type LoginUseCaseInterface
- type PasswordReset
- type PasswordResetEmail
- type PasswordResetEmailUseCaseInterface
- type PasswordResetUseCaseInterface
- type RegisterComment
- type RegisterCommentUseCaseInterface
- type RegisterFollow
- type RegisterFollowUseCaseInterface
- type RegisterLike
- type RegisterLikeUseCaseInterface
- type RegisterPosting
- type RegisterPostingUseCaseInterface
- type RegisterUser
- type RegisterUserUseCaseInterface
- type UpdateActivationUseCaseInterface
- type UpdateUser
- type UpdateUserUseCaseInterface
- type UserActivation
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDecodeImage = errors.New("image decode failure")
View Source
var ErrLikeYourSelf = errors.New("you can't like your posting")
View Source
var ErrNotCorrectPassword = errors.New("not correct password")
View Source
var ErrOverPasswordResetCount = errors.New("you can't reset password as it exceeds limit counts")
Functions ¶
This section is empty.
Types ¶
type DeleteComment ¶
type DeleteComment struct {
// contains filtered or unexported fields
}
func NewDeleteComment ¶
func NewDeleteComment(ctx context.Context, tx mysql.DBTransaction, tokenUserName string, commentID int64, userRepo *repository.UserRepository, commentRepo *repository.CommentRepository) *DeleteComment
func (*DeleteComment) DeleteCommentUseCase ¶
func (comment *DeleteComment) DeleteCommentUseCase() error
type DeleteFollow ¶
type DeleteFollow struct {
// contains filtered or unexported fields
}
func NewDeleteFollow ¶
func NewDeleteFollow(ctx context.Context, tx mysql.DBTransaction, followUserName, followedUserName string, userRepo *repository.UserRepository, followRepo *repository.FollowRepository) *DeleteFollow
func (*DeleteFollow) DeleteFollowUseCase ¶
func (follow *DeleteFollow) DeleteFollowUseCase() error
type DeleteLike ¶
type DeleteLike struct {
// contains filtered or unexported fields
}
func NewDeleteLike ¶
func NewDeleteLike(ctx context.Context, tx mysql.DBTransaction, tokenUserName string, likeID int64, userRepo *repository.UserRepository, postingRepo *repository.PostingRepository, likeRepo *repository.LikeRepository) *DeleteLike
func (*DeleteLike) DeleteLikeUseCase ¶
func (like *DeleteLike) DeleteLikeUseCase() error
type DeletePosting ¶
type DeletePosting struct {
// contains filtered or unexported fields
}
func NewDeletePosting ¶
func NewDeletePosting(ctx context.Context, tx mysql.DBTransaction, postingID int64, tokenUserName string, userRepo *repository.UserRepository, postingRepo *repository.PostingRepository) *DeletePosting
func (*DeletePosting) DeletePostingUseCase ¶
func (posting *DeletePosting) DeletePostingUseCase() error
type DeletePostingUseCaseInterface ¶
type DeletePostingUseCaseInterface interface {
DeletePostingUseCase() error
}
type DeleteUser ¶
type DeleteUser struct {
// contains filtered or unexported fields
}
func NewDeleteUser ¶
func NewDeleteUser(ctx context.Context, tx mysql.DBTransaction, userName string, userRepo *repository.UserRepository, postingRepo *repository.PostingRepository, likeRepo *repository.LikeRepository, commentRepo *repository.CommentRepository, followRepo *repository.FollowRepository) *DeleteUser
func (*DeleteUser) DeleteUserUseCase ¶
func (user *DeleteUser) DeleteUserUseCase() error
type GetComments ¶
type GetComments struct {
// contains filtered or unexported fields
}
func NewGetComments ¶
func NewGetComments(ctx context.Context, tx mysql.DBTransaction, tokenUserName string, postingID int64, userRepo *repository.UserRepository, postingRepo *repository.PostingRepository, commentRepo *repository.CommentRepository) *GetComments
func (*GetComments) GetCommentsUseCase ¶
func (c *GetComments) GetCommentsUseCase() (comments []model.Comment, err error)
type GetNotifications ¶
type GetNotifications struct {
// contains filtered or unexported fields
}
func NewGetNotifications ¶
func NewGetNotifications(ctx context.Context, tx mysql.DBTransaction, tokenUserName, visitedName string, userRepo *repository.UserRepository, notificationRepo *repository.NotificationRepository) *GetNotifications
func (*GetNotifications) GetNotificationsUseCase ¶
func (n *GetNotifications) GetNotificationsUseCase() (notifications []model.Notification, err error)
type GetNotificationsUseCaseInterface ¶
type GetNotificationsUseCaseInterface interface {
GetNotificationsUseCase() (*model.Notification, error)
}
type GetPostings ¶
type GetPostings struct {
// contains filtered or unexported fields
}
func NewGetPostings ¶
func NewGetPostings(ctx context.Context, tx mysql.DBTransaction, tokenUserName string, sinceAt time.Time, limit int8, userName string, userRepo *repository.UserRepository, postingRepo *repository.PostingRepository) *GetPostings
func (*GetPostings) GetPostingsUseCase ¶
func (p *GetPostings) GetPostingsUseCase() (postings []model.Posting, err error)
type GetUser ¶
type GetUser struct {
// contains filtered or unexported fields
}
func NewGetUser ¶
func NewGetUser(ctx context.Context, tx mysql.DBTransaction, tokenUserName, userName string, userRepo *repository.UserRepository) *GetUser
type GetUserUseCaseInterface ¶
type Login ¶
type Login struct {
// contains filtered or unexported fields
}
func NewLogin ¶
func NewLogin(ctx context.Context, tx mysql.DBTransaction, reqLogin *modelHTTP.RequestLogin, userRepo *repository.UserRepository) *Login
func (*Login) LoginUseCase ¶
type LoginUseCaseInterface ¶
type PasswordReset ¶
type PasswordReset struct {
// contains filtered or unexported fields
}
func NewPasswordReset ¶
func NewPasswordReset(ctx context.Context, tx mysql.DBTransaction, reqPasswordReset *modelHTTP.RequestResetPassword, userRepo *repository.UserRepository) *PasswordReset
func (*PasswordReset) PasswordResetUseCase ¶
func (reset *PasswordReset) PasswordResetUseCase() (err error)
type PasswordResetEmail ¶
type PasswordResetEmail struct {
// contains filtered or unexported fields
}
func NewPasswordResetEmail ¶
func NewPasswordResetEmail(ctx context.Context, tx mysql.DBTransaction, reqPasswordResetEmail *modelHTTP.Email, userRepo *repository.UserRepository) *PasswordResetEmail
func (*PasswordResetEmail) PasswordResetEmailUseCase ¶
func (re *PasswordResetEmail) PasswordResetEmailUseCase() (err error)
type PasswordResetEmailUseCaseInterface ¶
type PasswordResetEmailUseCaseInterface interface {
PasswordResetEmailUseCase() error
}
type PasswordResetUseCaseInterface ¶
type PasswordResetUseCaseInterface interface {
PasswordResetUseCase() error
}
type RegisterComment ¶
type RegisterComment struct {
// contains filtered or unexported fields
}
func NewRegisterComment ¶
func NewRegisterComment(ctx context.Context, tx mysql.DBTransaction, tokenUserName string, reqRegisterComment *modelHTTP.Comment, userRepo *repository.UserRepository, postingRepo *repository.PostingRepository, commentRepo *repository.CommentRepository, notificationRepo *repository.NotificationRepository) *RegisterComment
func (*RegisterComment) RegisterCommentUseCase ¶
func (comment *RegisterComment) RegisterCommentUseCase() error
type RegisterFollow ¶
type RegisterFollow struct {
// contains filtered or unexported fields
}
func NewRegisterFollow ¶
func NewRegisterFollow(ctx context.Context, tx mysql.DBTransaction, tokenUserName string, reqRegisterFollow *modelHTTP.Follow, userRepo *repository.UserRepository, followRepo *repository.FollowRepository, notificationRepo *repository.NotificationRepository) *RegisterFollow
func (*RegisterFollow) RegisterFollowUseCase ¶
func (follow *RegisterFollow) RegisterFollowUseCase() error
type RegisterLike ¶
type RegisterLike struct {
// contains filtered or unexported fields
}
func NewRegisterLike ¶
func NewRegisterLike(ctx context.Context, tx mysql.DBTransaction, tokenUserName string, reqRegisterLike *modelHTTP.Like, userRepo *repository.UserRepository, postingRepo *repository.PostingRepository, likeRepo *repository.LikeRepository, notificationRepo *repository.NotificationRepository) *RegisterLike
func (*RegisterLike) RegisterLikeUseCase ¶
func (like *RegisterLike) RegisterLikeUseCase() error
type RegisterPosting ¶
type RegisterPosting struct {
// contains filtered or unexported fields
}
func NewRegisterPosting ¶
func NewRegisterPosting(ctx context.Context, tx mysql.DBTransaction, tokenUserName string, reqRegisterPosting *modelHTTP.RequestRegisterPosting, userRepo *repository.UserRepository, postingRepo *repository.PostingRepository) *RegisterPosting
func (*RegisterPosting) RegisterPostingUseCase ¶
func (posting *RegisterPosting) RegisterPostingUseCase() error
type RegisterUser ¶
type RegisterUser struct {
// contains filtered or unexported fields
}
func NewRegisterUser ¶
func NewRegisterUser(ctx context.Context, tx mysql.DBTransaction, reqRegisterUser *modelHTTP.RequestRegisterUser, userRepo *repository.UserRepository) *RegisterUser
func (*RegisterUser) RegisterUserUseCase ¶
func (user *RegisterUser) RegisterUserUseCase() error
type UpdateUser ¶
type UpdateUser struct {
// contains filtered or unexported fields
}
func NewUpdateUser ¶
func NewUpdateUser(ctx context.Context, tx mysql.DBTransaction, userName string, reqUpdateUser *modelHTTP.RequestUpdateUser, userRepo *repository.UserRepository) *UpdateUser
func (*UpdateUser) UpdateUserUseCase ¶
func (user *UpdateUser) UpdateUserUseCase() error
type UserActivation ¶
type UserActivation struct {
// contains filtered or unexported fields
}
func NewUserActivation ¶
func NewUserActivation(ctx context.Context, tx mysql.DBTransaction, userName, activationKey string, userRepo *repository.UserRepository) *UserActivation
func (*UserActivation) UserActivationUseCase ¶
func (ua *UserActivation) UserActivationUseCase() error
Source Files ¶
- comment_delete_usecase.go
- comment_register_usecase.go
- comments_get_usecase.go
- errors.go
- follow_delete_usecase.go
- follow_register_usecase.go
- like_delete_usecase.go
- like_register_usecase.go
- login_usecase.go
- notifications_get_usecase.go
- password_reset_email_usecase.go
- password_reset_usecase.go
- posting_delete_usecase.go
- posting_register_usecase.go
- postings_get_usecase.go
- user_activation_usecase.go
- user_delete_usecase.go
- user_get_usecase.go
- user_register_usecase.go
- user_update_usecase.go
Click to show internal directories.
Click to hide internal directories.