Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidPassword = errors.New("password provided did not match hash") ErrUserNotFound = errors.New("failed to find user") ErrUserConflict = errors.New("failed to register new user as email already used") ErrTokenRevoked = errors.New("token is revoked") ErrInvalidInvite = errors.New("invalid invite code provided") )
Functions ¶
func NewHTTPHandler ¶
Types ¶
type Reader ¶
type Reader interface { FindUserByEmailWithInstitution(ctx context.Context, email string) (*entity.User, error) FindInstitutionInviteLinkWithInstitution(ctx context.Context, code string) (*entity.InstitutionInviteLink, error) FindJWTRevocation(ctx context.Context, jti string) (*entity.JWTRevocation, error) }
type Repository ¶
func NewEntRepository ¶
func NewEntRepository(ent *ent.Client) Repository
type UseCase ¶
type UseCase interface { WhoAmI(ctx context.Context, token jwt.Token) (*entity.User, error) Login(ctx context.Context, email, password string) (*entity.Session, error) Register(ctx context.Context, inviteCode, firstName, lastName, email, password string) (*entity.Session, error) // CheckInviteCode retrieves an invite code and the associated institution from the repository CheckInviteCode(ctx context.Context, inviteCode string) (*entity.InstitutionInviteLink, error) }
func NewUseCase ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.