Documentation
¶
Index ¶
- Variables
- func Module(c *di.Container)
- type Service
- type UserSerice
- func (s *UserSerice) CreateWithPassword(ctx context.Context, name, password, email string) (*users.User, error)
- func (s *UserSerice) GetByEmail(_ context.Context, email string) (*users.User, error)
- func (s *UserSerice) GetByID(_ context.Context, id string) (*users.User, error)
- func (s *UserSerice) GetByIDs(ctx context.Context, ids ...string) ([]*users.User, error)
- func (s *UserSerice) GetFirstUser(ctx context.Context) (*users.User, error)
- func (s *UserSerice) UsersCount(ctx context.Context) (uint64, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExists = fmt.Errorf("user already exists") ErrNotFound = fmt.Errorf("user not found") )
View Source
var (
ErrExceeded = fmt.Errorf("maximum number of users exceeded")
)
Functions ¶
Types ¶
type Service ¶
type Service interface { CreateWithPassword(ctx context.Context, name, password, email string) (*users.User, error) GetByIDs(ctx context.Context, ids ...string) ([]*users.User, error) GetByID(_ context.Context, id string) (*users.User, error) GetByEmail(_ context.Context, email string) (*users.User, error) UsersCount(context.Context) (uint64, error) GetFirstUser(ctx context.Context) (*users.User, error) }
type UserSerice ¶
type UserSerice struct {
// contains filtered or unexported fields
}
func New ¶
func New( logger *zap.Logger, userRepo db_user.Repository, analyticsClient analytics.Client, ) *UserSerice
func (*UserSerice) CreateWithPassword ¶
func (*UserSerice) GetByEmail ¶
func (*UserSerice) GetFirstUser ¶
func (*UserSerice) UsersCount ¶
func (s *UserSerice) UsersCount(ctx context.Context) (uint64, error)
Click to show internal directories.
Click to hide internal directories.