Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUserServiceImpl ¶
func NewUserServiceImpl( userRepository user.UserRepository, threadRepository thread.ThreadRepository, idGenerator generator.IDGenerator, passwordGenerator generator.PasswordGenerator, tokenGenerator generator.TokenGenerator, ) *userServiceImpl
Types ¶
type UserService ¶
type UserService interface { Register(ctx context.Context, p payload.Register) (id string, err error) Login(ctx context.Context, p payload.Login) (r response.Login, err error) GetAll( ctx context.Context, accessorUserID, orderBy, status string, page, limit uint, keyword string, ) (r response.Pagination[response.User], err error) GetOwn( ctx context.Context, accessorUserID, accessorUsername string, ) (r response.User, err error) GetByUsername( ctx context.Context, accessorUserID, username string, ) (r response.User, err error) ChangeBannedState( ctx context.Context, accessorRole string, username string, ) (err error) ChangeFollowingState( ctx context.Context, accessorUserID, usernameToFollow string, ) (err error) GetAllThreadByUsername( ctx context.Context, accessorUserID, username string, page uint, limit uint, ) (rs response.Pagination[response.ManyThread], err error) }
Click to show internal directories.
Click to hide internal directories.