Documentation ¶
Index ¶
- Variables
- type ImageUsecases
- type PostUsecases
- func (interactor *PostUsecases) FindNewestPosts(limit, offset int64) ([]*domain.Post, error)
- func (interactor *PostUsecases) FindPostByID(postID int64) (domain.Post, error)
- func (interactor *PostUsecases) FindPostsByUserID(userID int64, limit, offset int64) ([]*domain.Post, error)
- func (interactor *PostUsecases) PublishPost(userID int64, text string, time time.Time) (id int64, err error)
- type UserUsecases
- func (interactor *UserUsecases) CreateUser(name, email, passwordPlain string) (id int64, err error)
- func (interactor *UserUsecases) DeleteUser(id int64, executingUser domain.User) error
- func (interactor *UserUsecases) FindUserById(id int64) (domain.User, error)
- func (interactor *UserUsecases) FindUserIdByEmail(email string) (int64, error)
- func (interactor *UserUsecases) LoginUser(userId int64, passwordPlain string) (bool, error)
- func (interactor *UserUsecases) UpdateUserExceptPassword(user domain.User) error
- func (interactor *UserUsecases) UpdateUserPasswordOnly(userID int64, curPassPlain, newPassPlain string) error
- func (interactor *UserUsecases) VerifyEmailAndActivateUser(userId int64, tokenFromUrl string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmailInUse = errors.New("The mail address is already registered")
TODO: Validate mail address (is there an "@", etc.)
View Source
var ErrInvalidZipCode = errors.New("Invalid ZipCode length")
View Source
var ErrPasswordNotMatch = errors.New("The password was not correct")
View Source
var ErrUserDisabled = errors.New("User is disabled")
Functions ¶
This section is empty.
Types ¶
type ImageUsecases ¶
type ImageUsecases struct {
// contains filtered or unexported fields
}
func NewImageUsecases ¶
func NewImageUsecases(imageRepository imageRepositoryInterface) ImageUsecases
func (*ImageUsecases) RetrieveUserProfilePicture ¶
func (interactor *ImageUsecases) RetrieveUserProfilePicture(userId int64) ([]byte, error)
func (*ImageUsecases) StoreUserProfilePicture ¶
func (interactor *ImageUsecases) StoreUserProfilePicture(userId int64, dat []byte) error
type PostUsecases ¶
type PostUsecases struct {
// contains filtered or unexported fields
}
func NewPostUsecases ¶
func NewPostUsecases(postRepository postRepositoryInterface) PostUsecases
func (*PostUsecases) FindNewestPosts ¶
func (interactor *PostUsecases) FindNewestPosts(limit, offset int64) ([]*domain.Post, error)
func (*PostUsecases) FindPostByID ¶
func (interactor *PostUsecases) FindPostByID(postID int64) (domain.Post, error)
func (*PostUsecases) FindPostsByUserID ¶
func (*PostUsecases) PublishPost ¶
type UserUsecases ¶
type UserUsecases struct {
// contains filtered or unexported fields
}
func NewUserUsecases ¶
func NewUserUsecases(userRepository userRepositoryInterface) UserUsecases
func (*UserUsecases) CreateUser ¶
func (interactor *UserUsecases) CreateUser(name, email, passwordPlain string) (id int64, err error)
func (*UserUsecases) DeleteUser ¶
func (interactor *UserUsecases) DeleteUser(id int64, executingUser domain.User) error
func (*UserUsecases) FindUserById ¶
func (interactor *UserUsecases) FindUserById(id int64) (domain.User, error)
func (*UserUsecases) FindUserIdByEmail ¶
func (interactor *UserUsecases) FindUserIdByEmail(email string) (int64, error)
func (*UserUsecases) LoginUser ¶
func (interactor *UserUsecases) LoginUser(userId int64, passwordPlain string) (bool, error)
func (*UserUsecases) UpdateUserExceptPassword ¶
func (interactor *UserUsecases) UpdateUserExceptPassword(user domain.User) error
func (*UserUsecases) UpdateUserPasswordOnly ¶
func (interactor *UserUsecases) UpdateUserPasswordOnly(userID int64, curPassPlain, newPassPlain string) error
func (*UserUsecases) VerifyEmailAndActivateUser ¶
func (interactor *UserUsecases) VerifyEmailAndActivateUser(userId int64, tokenFromUrl string) error
Click to show internal directories.
Click to hide internal directories.