Documentation ¶
Index ¶
- Variables
- type UserService
- type UserServiceImpl
- func (s *UserServiceImpl) CreateUser(ctx context.Context, newUser *users.User) (*users.User, error)
- func (s *UserServiceImpl) GetUserFromJWT(ctx context.Context, jwtToken string) (*users.User, error)
- func (s *UserServiceImpl) GetUsers(ctx context.Context, afterId string, limit int32) ([]users.User, error)
- func (s *UserServiceImpl) LoginUser(ctx context.Context, email, password string) (*users.User, string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPaginationLimit = errors.New("pagination limit max is 100") ErrTryAgain = errors.New("an error occured, please try again later") )
Functions ¶
This section is empty.
Types ¶
type UserService ¶
type UserService interface { CreateUser(ctx context.Context, newUser *users.User) (*users.User, error) GetUsers(ctx context.Context, afterId string, limit int32) ([]users.User, error) LoginUser(ctx context.Context, email, password string) (*users.User, string, error) GetUserFromJWT(ctx context.Context, jwtToken string) (*users.User, error) }
type UserServiceImpl ¶
type UserServiceImpl struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(userRepo users.Repository, tracer opentracing.Tracer, natsConn *nats.Conn) *UserServiceImpl
NewUserService returns a new user service.
func (*UserServiceImpl) CreateUser ¶
CreateUser is the service handler to create new user.
func (*UserServiceImpl) GetUserFromJWT ¶
Click to show internal directories.
Click to hide internal directories.