feat: add resolver for token verification

Resolves #6
This commit is contained in:
Lakhan Samani
2021-07-14 01:36:11 +05:30
parent 04a522c947
commit eeb8f7d097
9 changed files with 454 additions and 59 deletions

View File

@@ -2,10 +2,6 @@
package model
type Response interface {
IsResponse()
}
type BasicAuthLoginInput struct {
Email string `json:"email"`
Password string `json:"password"`
@@ -20,8 +16,6 @@ type BasicAuthLoginResponse struct {
User *User `json:"user"`
}
func (BasicAuthLoginResponse) IsResponse() {}
type BasicAuthSignupInput struct {
FirstName *string `json:"firstName"`
LastName *string `json:"lastName"`
@@ -39,13 +33,18 @@ type BasicAuthSignupResponse struct {
User *User `json:"user"`
}
func (BasicAuthSignupResponse) IsResponse() {}
type Error struct {
Message string `json:"message"`
Reason string `json:"reason"`
}
type Response struct {
Success bool `json:"success"`
Message string `json:"message"`
Errors []*Error `json:"errors"`
StatusCode int `json:"statusCode"`
}
type User struct {
ID string `json:"id"`
Email string `json:"email"`
@@ -68,3 +67,7 @@ type VerificationRequest struct {
CreatedAt *int64 `json:"createdAt"`
UpdatedAt *int64 `json:"updatedAt"`
}
type VerifySignupTokenInput struct {
Token string `json:"token"`
}