Documentation
¶
Overview ¶
Package port contains the HTTP server and gRPC server
Index ¶
- func NewRouter(srv *HTTPServer, auth *middleware.Authenticator) *chi.Mux
- type CreateUserParams
- type CreateUserResponse
- type DeleteUserResponse
- type ErrResponse
- type GetUserResponse
- type HTTPServer
- type LoginParams
- type LoginPayload
- type LoginResponse
- type NewUserPayload
- type UpdateUerPaylod
- type UpdateUserParams
- type UpdateUserPasswordParams
- type UpdateUserPasswordPayload
- type UpdateUserPasswordResponse
- type UpdateUserResponse
- type UserPayload
- type VerifyTOTPParams
- type VerifyTOTPPayload
- type VerifyTOTPResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRouter ¶
func NewRouter(srv *HTTPServer, auth *middleware.Authenticator) *chi.Mux
NewRouter returns a new chi.Mux
Types ¶
type CreateUserParams ¶
type CreateUserParams struct {
Payload *NewUserPayload `json:"payload"`
}
CreateUserParams ...
type CreateUserResponse ¶
type CreateUserResponse struct {
Payload *UserPayload `json:"payload"`
Barcode string `json:"otp_barcode"`
URL string `json:"otp_url"`
Elapsed int64 `json:"elapsed"`
}
CreateUserResponse ...
type DeleteUserResponse ¶
type DeleteUserResponse struct {
Message string `json:"message"`
}
DeleteUserResponse ...
type ErrResponse ¶
type ErrResponse struct {
Code int `json:"code"`
Field string `json:"field"`
Message string `json:"message"`
}
ErrResponse ...
type GetUserResponse ¶
type GetUserResponse struct {
Payload *UserPayload `json:"payload"`
Elapsed int64 `json:"elapsed"`
}
GetUserResponse
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer exposed http endpoints
func NewHTTPServer ¶
func NewHTTPServer(log *zap.Logger, authService *domain.AuthService, privateKey *rsa.PrivateKey) (*HTTPServer, error)
NewHTTPServer returns a new HTTPServer
type LoginParams ¶
type LoginParams struct {
Payload *LoginPayload `json:"payload"`
}
LoginParams ...
type LoginPayload ¶
LoginPayload ...
type NewUserPayload ¶
type NewUserPayload struct {
Email string `json:"email"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Password string `json:"password"`
}
NewUserPayload ...
type UpdateUerPaylod ¶
type UpdateUerPaylod struct {
Email string `json:"email"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
}
UpdateUerPaylod ...
type UpdateUserParams ¶
type UpdateUserParams struct {
Payload *UpdateUerPaylod `json:"payload"`
}
UpdateUserParams ...
type UpdateUserPasswordParams ¶
type UpdateUserPasswordParams struct {
Payload *UpdateUserPasswordPayload `json:"payload"`
}
UpdateUserPasswordParams ...
type UpdateUserPasswordPayload ¶
type UpdateUserPasswordPayload struct {
OldPassword string `json:"old_password"`
NewPassword string `json:"new_password"`
}
UpdateUserPasswordPayload ...
type UpdateUserPasswordResponse ¶
type UpdateUserPasswordResponse struct {
Message string `json:"message"`
}
UpdateUserPasswordResponse ...
type UpdateUserResponse ¶
type UpdateUserResponse struct {
Payload *UserPayload `json:"payload"`
}
UpdateUserResponse ...
type UserPayload ¶
type UserPayload struct {
Email string `json:"email"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
UserPayload ...
type VerifyTOTPParams ¶
type VerifyTOTPParams struct {
Payload *VerifyTOTPPayload `json:"payload"`
}
VerifyTOTPParams ...
type VerifyTOTPPayload ¶
type VerifyTOTPPayload struct {
OTPCode string `json:"otp_code"`
}
VerifyTOTPPayload ...
type VerifyTOTPResponse ¶
VerifyTOTPResponse ...
Click to show internal directories.
Click to hide internal directories.