Documentation ¶
Index ¶
- type AuthHandler
- type ConfigHandler
- type DefaultHandler
- type LoginRequest
- type LoginResponse
- type UserActionResponse
- type UserCreateRequest
- type UserHandler
- func (u *UserHandler) Create(httpResponse http.ResponseWriter, httpRequest *http.Request)
- func (u *UserHandler) Delete(httpResponse http.ResponseWriter, httpRequest *http.Request)
- func (u *UserHandler) List(httpResponse http.ResponseWriter, httpRequest *http.Request)
- func (u *UserHandler) Renew(httpResponse http.ResponseWriter, httpRequest *http.Request)
- func (u *UserHandler) View(httpResponse http.ResponseWriter, httpRequest *http.Request)
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
func NewAuthHandler ¶
func NewAuthHandler(userRepo *repos.UserRepository, googleOAuthService *services.GoogleOAuthService, authHelper *helpers.AuthHelper) *AuthHandler
func (*AuthHandler) Login ¶
func (a *AuthHandler) Login(httpResponse http.ResponseWriter, httpRequest *http.Request)
Login validates Google token and create JWT if its valid.
type ConfigHandler ¶
type ConfigHandler struct {
GoogleConfig system.GoogleConfig
}
func NewConfigHandler ¶
func NewConfigHandler(googleConfig system.GoogleConfig) *ConfigHandler
func (*ConfigHandler) Root ¶
func (h *ConfigHandler) Root(httpResponse http.ResponseWriter, httpRequest *http.Request)
type DefaultHandler ¶
type DefaultHandler struct{}
func NewDefaultHandler ¶
func NewDefaultHandler() *DefaultHandler
func (*DefaultHandler) NotFound ¶
func (u *DefaultHandler) NotFound(httpResponse http.ResponseWriter, httpRequest *http.Request)
type LoginRequest ¶
type LoginResponse ¶
type UserActionResponse ¶
type UserActionResponse struct { Result string `json:"result"` User *UserResponse `json:"user"` }
type UserCreateRequest ¶
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewUserHandler ¶
func NewUserHandler(userRepo *repos.UserRepository, authHelper *helpers.AuthHelper) *UserHandler
func (*UserHandler) Create ¶
func (u *UserHandler) Create(httpResponse http.ResponseWriter, httpRequest *http.Request)
func (*UserHandler) Delete ¶
func (u *UserHandler) Delete(httpResponse http.ResponseWriter, httpRequest *http.Request)
func (*UserHandler) List ¶
func (u *UserHandler) List(httpResponse http.ResponseWriter, httpRequest *http.Request)
func (*UserHandler) Renew ¶
func (u *UserHandler) Renew(httpResponse http.ResponseWriter, httpRequest *http.Request)
func (*UserHandler) View ¶
func (u *UserHandler) View(httpResponse http.ResponseWriter, httpRequest *http.Request)
Click to show internal directories.
Click to hide internal directories.