Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
AuthMiddleware is our middleware to check our token is valid. Returning a 401 status to the client if it is not valid.
Types ¶
type Endpoints ¶
func InitEndpoints ¶
type Handler ¶
type Handler interface { MainPageHandler(w http.ResponseWriter, r *http.Request) LoginPageHandler(w http.ResponseWriter, r *http.Request) }
type LoginRequest ¶
type LoginResponse ¶
type Repository ¶
type Repository interface { GetUserIDByEmail(ctx context.Context, email string) (string, error) CreateUser(ctx context.Context, c *User) error UpdateProfile(ctx context.Context, id string, updateMap map[string]interface{}) (*User, error) }
func InitRepository ¶
func InitRepository(db *gorm.DB) Repository
type Service ¶
func InitService ¶
Click to show internal directories.
Click to hide internal directories.