Documentation ¶
Index ¶
- func CreateUserResolver(_ context.Context, userInput model.UserInput) (*model.AuthData, error)
- func JwtValidate(stringToken string, env *env.Env) (*jwt.Token, error)
- func LoginWithEmailAndPasswordResolver(_ context.Context, email string, password string) (*model.AuthData, error)
- type Repository
- type Service
- type SessionClaims
- type SessionKeyString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUserResolver ¶
func JwtValidate ¶
****** Method to validate and return *jwt.Token pointer
Types ¶
type Repository ¶
type Repository interface { SigninWithEmailAndPassword(email string, password string) (string, error) SignupWithEmailAndPassword(entities.User) (string, error) RestoreAccount(email string) error }
Repository interface allows us to access the CRUD Operations in mongo here.
type Service ¶
type Service interface { LoginWithEmailAndPassword(email string, password string) (string, error) RegisterWithEmailAndPassword(user entities.User) (string, error) RestoreAccount(email string) error }
Service is an interface from which our api module can access our repository of all our models
func NewService ¶
func NewService(r Repository) Service
NewService is used to create a single instance of the service
Click to show internal directories.
Click to hide internal directories.