Documentation ¶
Index ¶
- func CheckError(err error)
- func CheckPassword(password string, hash string) bool
- func CreateToken(claims map[string]interface{}) (string, error)
- func GetAccountType(token string) (string, error)
- func GetAuthenticatedAccount(authToken string) (string, 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 AuthenticatedAccountResponse
- type BlackListDeviceResponse
- type CheckAccountStatusResponse
- type CodeEmailResponse
- type CreatePatientAccountResponse
- type CreateSaveCodeResponse
- type DoctorInput
- type GetDoctorByIdResponse
- type GetDoctorsResponse
- type Login2faEmailInput
- type Login2faEmailResponse
- type Login2faSaveCodeInput
- type Login2faSaveCodeesponse
- type Login2faThirdPartyInput
- type Login2faThirdPartyResponse
- 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
- type UpdatePasswordInput
- type UpdatePasswordResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶ added in v2.1.1
func CheckError(err error)
func CheckPassword ¶
func CreateToken ¶
func GetAccountType ¶
func GetAuthenticatedAccount ¶ added in v2.1.1
func GetBearerToken ¶
func HashPassword ¶
func NewTokenAuth ¶
func NewTokenAuth() *jwtauth.JWTAuth
func RegisterAdmin ¶
func RegisterDoctor ¶
func VerifyToken ¶
Types ¶
type AddressInput ¶
type AdminInput ¶
type AuthenticatedAccountResponse ¶ added in v2.2.2
func AuthMiddlewareAccount ¶ added in v2.1.1
func AuthMiddlewareAccount(w http.ResponseWriter, r *http.Request) AuthenticatedAccountResponse
func AuthMiddlewareDoctor ¶ added in v2.0.2
func AuthMiddlewareDoctor(w http.ResponseWriter, r *http.Request) AuthenticatedAccountResponse
func AuthMiddlewarePatient ¶ added in v2.1.1
func AuthMiddlewarePatient(w http.ResponseWriter, r *http.Request) AuthenticatedAccountResponse
type BlackListDeviceResponse ¶ added in v2.1.11
func BlackListDevice ¶ added in v2.1.11
func BlackListDevice(token string, ownerID string) BlackListDeviceResponse
type CheckAccountStatusResponse ¶
func CheckAccountEnable ¶
func CheckAccountEnable(id string) CheckAccountStatusResponse
type CodeEmailResponse ¶ added in v2.1.0
func Email2faAuth ¶ added in v2.1.0
func Email2faAuth(email string) CodeEmailResponse
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(page int, size int) GetDoctorsResponse
type Login2faEmailInput ¶ added in v2.1.0
type Login2faEmailResponse ¶ added in v2.1.0
func Login2faEmail ¶ added in v2.1.0
func Login2faEmail(input Login2faEmailInput, nameDevice string) Login2faEmailResponse
type Login2faSaveCodeInput ¶ added in v2.1.0
type Login2faSaveCodeesponse ¶ added in v2.1.0
func Login2faSaveCode ¶ added in v2.1.0
func Login2faSaveCode(input Login2faSaveCodeInput, nameDevice string) Login2faSaveCodeesponse
type Login2faThirdPartyInput ¶ added in v2.1.0
type Login2faThirdPartyResponse ¶ added in v2.1.0
func Login2faThirdParty ¶ added in v2.1.0
func Login2faThirdParty(input Login2faThirdPartyInput, nameDevice string) Login2faThirdPartyResponse
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(password string, uuid string) ResetPasswordResponse
type UpdatePasswordInput ¶ added in v2.1.0
type UpdatePasswordResponse ¶ added in v2.1.0
func UpdatePassword ¶ added in v2.1.0
func UpdatePassword(input UpdatePasswordInput, ownerId string) UpdatePasswordResponse
Source Files ¶
Click to show internal directories.
Click to hide internal directories.