Documentation
¶
Index ¶
- func AuthMiddleware(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 GetAuthenticatedUser(w http.ResponseWriter, r *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 CreatePatientAccountResponse
- type DoctorInput
- type LoginInput
- type LoginResponse
- type MissingPasswordResponse
- 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) RegisterAndLoginResponse
- type ResetPasswordResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶ added in v1.1.0
func AuthMiddleware(w http.ResponseWriter, r *http.Request) string
func AuthenticateRequest ¶ added in v1.1.0
func CheckPassword ¶
func CreateToken ¶
func GetAuthenticatedUser ¶ added in v1.1.0
func GetAuthenticatedUser(w http.ResponseWriter, r *http.Request) string
func HashPassword ¶
func NewTokenAuth ¶
func NewTokenAuth() *jwtauth.JWTAuth
func RegisterAdmin ¶ added in v1.3.0
func RegisterDoctor ¶ added in v1.3.0
func RegisterPatient ¶ added in v1.3.0
func VerifyToken ¶
Types ¶
type AddressInput ¶ added in v1.3.2
type AdminInput ¶ added in v1.3.0
type CreatePatientAccountResponse ¶ added in v1.3.0
func CreatePatientAccount ¶ added in v1.3.0
func CreatePatientAccount(email string) CreatePatientAccountResponse
type DoctorInput ¶ added in v1.3.0
type DoctorInput struct { Password string `jon:"passwordjs"` Email string `json:"email"` Name string `json:"name"` Firstname string `json:"firstname"` Address AddressInput `json:"address"` }
type LoginInput ¶
type LoginResponse ¶ added in v1.3.0
func Login ¶
func Login(input LoginInput, t string) LoginResponse
type MissingPasswordResponse ¶ added in v1.3.0
func MissingPassword ¶ added in v1.3.0
func MissingPassword(email string) MissingPasswordResponse
type PatientInput ¶ added in v1.3.0
type RegisterAndLoginResponse ¶ added in v1.3.0
func RegisterAndLoginAdmin ¶ added in v1.3.0
func RegisterAndLoginDoctor ¶ added in v1.3.0
func RegisterAndLoginDoctor(email string, password string, name string, firstname string, address AddressInput) RegisterAndLoginResponse
func RegisterAndLoginPatient ¶ added in v1.3.0
func RegisterAndLoginPatient(email string, password string) RegisterAndLoginResponse
type ResetPasswordResponse ¶ added in v1.3.0
func ResetPassword ¶ added in v1.3.0
func ResetPassword(email string, password string, uuid string) ResetPasswordResponse
Source Files
¶
Click to show internal directories.
Click to hide internal directories.