Documentation ¶
Index ¶
- func MarshalDashboardResponse(responseData *way_c.DashboardResponseIDO, w http.ResponseWriter)
- func MarshalLoginResponse(responseData *gateway_s.LoginResponseIDO, w http.ResponseWriter)
- func MarshalProfileResponse(responseData *gateway_c.ProfileResponse, w http.ResponseWriter)
- func MarshalRefreshTokenResponse(accessToken string, accessTokenExpiryDate time.Time, refreshToken string, ...)
- func UnmarshalChangePasswordRequest(ctx context.Context, r *http.Request) (*gate_c.ChangePasswordRequestIDO, error)
- func UnmarshalExecutiveVisitsTenantRequest(ctx context.Context, r *http.Request) (*gateway_c.ExecutiveVisitsTenantRequest, error)
- func UnmarshalPasswordResetRequest(ctx context.Context, r *http.Request) (*gate_c.PasswordResetRequestIDO, error)
- func UnmarshalProfileChangePasswordRequest(ctx context.Context, r *http.Request) (*gateway_c.ProfileChangePasswordRequestIDO, error)
- func ValidateForgotPasswordRequest(dirtyData *ForgotPasswordRequestIDO) error
- func ValidateLoginRequest(dirtyData *LoginRequestIDO) error
- func ValidateRefreshTokenRequest(dirtyData *RefreshTokenRequestIDO) (bool, string)
- type ForgotPasswordRequestIDO
- type GreetingRequest
- type GreetingResponse
- type Handler
- func (h *Handler) ChangePassword(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Dashboard(w http.ResponseWriter, r *http.Request)
- func (h *Handler) DisableOTP(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ExecutiveVisitsTenant(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ForgotPassword(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GenerateOTP(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GenerateOTPAndQRCodePNGImage(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Greet(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HealthCheck(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Login(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Logout(w http.ResponseWriter, r *http.Request)
- func (h *Handler) PasswordReset(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Profile(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ProfileChangePassword(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ProfileUpdate(w http.ResponseWriter, r *http.Request)
- func (h *Handler) RecoveryOTP(w http.ResponseWriter, r *http.Request)
- func (h *Handler) RefreshToken(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ValidateOTP(w http.ResponseWriter, r *http.Request)
- func (h *Handler) VerifyOTP(w http.ResponseWriter, r *http.Request)
- func (h *Handler) Version(w http.ResponseWriter, r *http.Request)
- type LoginRequestIDO
- type RefreshTokenRequestIDO
- type RefreshTokenResponseIDO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalDashboardResponse ¶
func MarshalDashboardResponse(responseData *way_c.DashboardResponseIDO, w http.ResponseWriter)
func MarshalLoginResponse ¶
func MarshalLoginResponse(responseData *gateway_s.LoginResponseIDO, w http.ResponseWriter)
func MarshalProfileResponse ¶
func MarshalProfileResponse(responseData *gateway_c.ProfileResponse, w http.ResponseWriter)
func ValidateForgotPasswordRequest ¶
func ValidateForgotPasswordRequest(dirtyData *ForgotPasswordRequestIDO) error
func ValidateLoginRequest ¶
func ValidateLoginRequest(dirtyData *LoginRequestIDO) error
func ValidateRefreshTokenRequest ¶
func ValidateRefreshTokenRequest(dirtyData *RefreshTokenRequestIDO) (bool, string)
Types ¶
type ForgotPasswordRequestIDO ¶
type ForgotPasswordRequestIDO struct {
Email string `json:"email"`
}
type GreetingRequest ¶
type GreetingRequest struct {
Name string `json:"name"`
}
type GreetingResponse ¶
type GreetingResponse struct {
Message string `json:"message"`
}
type Handler ¶
type Handler struct { Logger *slog.Logger Controller gateway_c.GatewayController }
Handler Creates http request handler
func NewHandler ¶
func NewHandler(loggerp *slog.Logger, c gateway_c.GatewayController) *Handler
NewHandler Constructor
func (*Handler) ChangePassword ¶
func (h *Handler) ChangePassword(w http.ResponseWriter, r *http.Request)
func (*Handler) DisableOTP ¶
func (h *Handler) DisableOTP(w http.ResponseWriter, r *http.Request)
func (*Handler) ExecutiveVisitsTenant ¶
func (h *Handler) ExecutiveVisitsTenant(w http.ResponseWriter, r *http.Request)
func (*Handler) ForgotPassword ¶
func (h *Handler) ForgotPassword(w http.ResponseWriter, r *http.Request)
func (*Handler) GenerateOTP ¶
func (h *Handler) GenerateOTP(w http.ResponseWriter, r *http.Request)
func (*Handler) GenerateOTPAndQRCodePNGImage ¶
func (h *Handler) GenerateOTPAndQRCodePNGImage(w http.ResponseWriter, r *http.Request)
func (*Handler) Greet ¶
func (h *Handler) Greet(w http.ResponseWriter, r *http.Request)
PostGreet returns the greeting
func (*Handler) HealthCheck ¶
func (h *Handler) HealthCheck(w http.ResponseWriter, r *http.Request)
Returns the status of the system.
func (*Handler) PasswordReset ¶
func (h *Handler) PasswordReset(w http.ResponseWriter, r *http.Request)
func (*Handler) ProfileChangePassword ¶
func (h *Handler) ProfileChangePassword(w http.ResponseWriter, r *http.Request)
func (*Handler) ProfileUpdate ¶
func (h *Handler) ProfileUpdate(w http.ResponseWriter, r *http.Request)
func (*Handler) RecoveryOTP ¶
func (h *Handler) RecoveryOTP(w http.ResponseWriter, r *http.Request)
func (*Handler) RefreshToken ¶
func (h *Handler) RefreshToken(w http.ResponseWriter, r *http.Request)
func (*Handler) ValidateOTP ¶
func (h *Handler) ValidateOTP(w http.ResponseWriter, r *http.Request)
func (*Handler) Version ¶
func (h *Handler) Version(w http.ResponseWriter, r *http.Request)
Version returns the server version. Developers note, to see result you can run in your terminal `curl http://localhost:8000/api/v1/version`.
type LoginRequestIDO ¶
func UnmarshalLoginRequest ¶
type RefreshTokenRequestIDO ¶
type RefreshTokenRequestIDO struct {
Value string `json:"value"`
}
type RefreshTokenResponseIDO ¶
type RefreshTokenResponseIDO struct { Email string `json:"username"` AccessToken string `json:"access_token"` AccessTokenExpiryDate time.Time `json:"access_token_expiry_date"` RefreshToken string `json:"refresh_token"` RefreshTokenExpiryDate time.Time `json:"refresh_token_expiry_date"` }
RefreshTokenResponseIDO struct used to represent the system's response when the `login` POST request was a success.
Click to show internal directories.
Click to hide internal directories.