Versions in this module Expand all Collapse all v0 v0.6.0 Jun 30, 2023 Changes in this version + var ErrNoUserInformation = errors.New("no user information") + func NewContext(ctx context.Context, usr User) context.Context + func ServiceWithStatsDReporter(statsdReporter *statsd.Reporter) func(*Service) + type Config struct + IdentityProviderDefaultName string + type DuplicateRecordError struct + Email string + UUID string + func (e DuplicateRecordError) Error() string + type InvalidError struct + UUID string + func (e InvalidError) Error() string + type NotFoundError struct + Email string + UUID string + func (e NotFoundError) Error() string + type Repository interface + Create func(ctx context.Context, ns *namespace.Namespace, u *User) (string, error) + GetByEmail func(ctx context.Context, email string) (User, error) + GetByUUID func(ctx context.Context, uuid string) (User, error) + UpsertByEmail func(ctx context.Context, ns *namespace.Namespace, u *User) (string, error) + type Service struct + func NewService(logger log.Logger, repository Repository, opts ...func(*Service)) *Service + func (s *Service) ValidateUser(ctx context.Context, ns *namespace.Namespace, uuid, email string) (string, error) + type User struct + CreatedAt time.Time + Email string + ID string + Provider string + UUID string + UpdatedAt time.Time + func FromContext(ctx context.Context) User + func (u *User) Validate() error