Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type Handler ¶
type Handler interface {
// Create handles a request to create a new user
Create(w http.ResponseWriter, r *http.Request)
// Update handles a request to update a user
Update(w http.ResponseWriter, r *http.Request)
// Delete handles a request to delete a user
Delete(w http.ResponseWriter, r *http.Request)
// Me handles a request to get the current user
Me(w http.ResponseWriter, r *http.Request)
// Login handles a request to login a user
Login(w http.ResponseWriter, r *http.Request)
// Verify handles a request to verify a user
Verify(w http.ResponseWriter, r *http.Request)
}
Handler provides the users handlers
type Service ¶
type Service interface {
// CreateUser creates a new user
CreateUser(u *Users) error
// UpdateUser updates a user
UpdateUser(id string, u *Users) error
// DeleteUser deletes a user
DeleteUser(id string) error
// GetMe returns the current user using JWKS token
GetMe(id string) (*Users, error)
// LoginUser logs in a user
LoginUser(email string, password string) (string, error)
// VerifyUser verifies a user
VerifyUser(token string) error
}
Service is the users service interface
Click to show internal directories.
Click to hide internal directories.