Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateToken ¶
ValidateToken validates if a JWT is correct
Types ¶
type Claims ¶
type Claims struct { Username string jwt.StandardClaims }
Claims defines the values we will add to the JWT claims
type Credentials ¶
Credentials defines the necessary parameters for a user to sign in and sign up
func (*Credentials) Validate ¶
func (credentials *Credentials) Validate() bool
Validate checks that the required values of the credentials are filled and that they meet specific requirements
type User ¶
type User struct { ID uuid.UUID FullName string Username string Password string Email string Score int GitHubID string }
User is the domain entity that defines a user of the application
type UserRepo ¶
type UserRepo interface { FindByUsername(username string) (*User, error) FindByID(id uuid.UUID) (*User, error) Create(u *User) (*User, error) CheckEmail(email string) bool CheckUsername(username string) bool }
UserRepo is the interface that defines all of the operations the User entity can do with the persistance layer
Click to show internal directories.
Click to hide internal directories.