Documentation ¶
Index ¶
- func AuthMiddleware(w http.ResponseWriter, r *http.Request) string
- func AuthMiddlewareDoctor(w http.ResponseWriter, r *http.Request) string
- func AuthenticateRequest(w http.ResponseWriter, req *http.Request) (string, bool)
- func CheckPassword(password string, hash string) bool
- func CreateToken(claims map[string]interface{}) (string, error)
- func GetAccountType(token string) (string, error)
- func GetAuthenticatedDoctor(w http.ResponseWriter, r *http.Request) string
- func GetAuthenticatedUser(w http.ResponseWriter, r *http.Request) string
- func GetBearerToken(req *http.Request) string
- func HashPassword(password string) string
- func NewTokenAuth() *jwtauth.JWTAuth
- func RegisterAdmin(email string, password string, firstName string, lastName string, token string) (model.Admin, error)
- func RegisterDoctor(email string, password string, name string, firstname string, ...) (model.Doctor, error)
- func RegisterPatient(email string, password string) (model.Patient, error)
- func VerifyToken(tokenString string) bool
- type AddressInput
- type AdminInput
- type CheckAccountStatusResponse
- type CreatePatientAccountResponse
- type CreateSaveCodeResponse
- type DoctorInput
- type GetDoctorByIdResponse
- type GetDoctorsResponse
- type LoginInput
- type LoginResponse
- type MissingPasswordResponse
- type ModifyAccountStatusResponse
- type PatientInput
- type RegisterAndLoginResponse
- func RegisterAndLoginAdmin(email string, password string, firstName string, lastName string, token string) RegisterAndLoginResponse
- func RegisterAndLoginDoctor(email string, password string, name string, firstname string, ...) RegisterAndLoginResponse
- func RegisterAndLoginPatient(email string, password string, nameDevice string) RegisterAndLoginResponse
- type ResetPasswordResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(w http.ResponseWriter, r *http.Request) string
func AuthMiddlewareDoctor ¶ added in v2.0.2
func AuthMiddlewareDoctor(w http.ResponseWriter, r *http.Request) string
func AuthenticateRequest ¶
func CheckPassword ¶
func CreateToken ¶
func GetAccountType ¶
func GetAuthenticatedDoctor ¶ added in v2.0.2
func GetAuthenticatedDoctor(w http.ResponseWriter, r *http.Request) string
func GetAuthenticatedUser ¶
func GetAuthenticatedUser(w http.ResponseWriter, r *http.Request) string
func GetBearerToken ¶
func HashPassword ¶
func NewTokenAuth ¶
func NewTokenAuth() *jwtauth.JWTAuth
func RegisterAdmin ¶
func RegisterDoctor ¶
func VerifyToken ¶
Types ¶
type AddressInput ¶
type AdminInput ¶
type CheckAccountStatusResponse ¶
func CheckAccountEnable ¶
func CheckAccountEnable(id string) CheckAccountStatusResponse
type CreatePatientAccountResponse ¶
func CreatePatientAccount ¶
func CreatePatientAccount(email string) CreatePatientAccountResponse
type CreateSaveCodeResponse ¶
func CreateBackupCodes ¶
func CreateBackupCodes(id string, r *http.Request) CreateSaveCodeResponse
type DoctorInput ¶
type DoctorInput struct { Password string `jon:"password"` Email string `json:"email"` Name string `json:"name"` Firstname string `json:"firstname"` Address AddressInput `json:"address"` }
type GetDoctorByIdResponse ¶
func GetDoctorById ¶
func GetDoctorById(id string) GetDoctorByIdResponse
type GetDoctorsResponse ¶
func GetDoctors ¶
func GetDoctors() GetDoctorsResponse
type LoginInput ¶
type LoginResponse ¶
func Login ¶
func Login(input LoginInput, t string, nameDevice string) LoginResponse
type MissingPasswordResponse ¶
func MissingPassword ¶
func MissingPassword(email string) MissingPasswordResponse
type ModifyAccountStatusResponse ¶
type ModifyAccountStatusResponse struct { Patient model.Patient Doctor model.Doctor Code int Err error }
func ModifyStatusAccount ¶
func ModifyStatusAccount(id string, status bool) ModifyAccountStatusResponse
type PatientInput ¶
type RegisterAndLoginResponse ¶
func RegisterAndLoginAdmin ¶
func RegisterAndLoginDoctor ¶
func RegisterAndLoginDoctor(email string, password string, name string, firstname string, address AddressInput, nameDevice string) RegisterAndLoginResponse
func RegisterAndLoginPatient ¶
func RegisterAndLoginPatient(email string, password string, nameDevice string) RegisterAndLoginResponse
type ResetPasswordResponse ¶
func ResetPassword ¶
func ResetPassword(email string, password string, uuid string) ResetPasswordResponse
Source Files ¶
Click to show internal directories.
Click to hide internal directories.