user

package
v0.0.0-...-8291241 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CookieSignin

func CookieSignin(w http.ResponseWriter, r *http.Request)

func DeleteAccount

func DeleteAccount(w http.ResponseWriter, r *http.Request, userid, sessToken string)

func ForgottenPasswordReset

func ForgottenPasswordReset(w http.ResponseWriter, r *http.Request)
func ForgottenPasswordSendLink(w http.ResponseWriter, r *http.Request)

func GetUser

func GetUser(w http.ResponseWriter, r *http.Request, userid string)

func GetUserPicture

func GetUserPicture(w http.ResponseWriter, r *http.Request, userid, useridInURL, lastURLPart string)

func Signin

func Signin(w http.ResponseWriter, r *http.Request)

func Signout

func Signout(w http.ResponseWriter, r *http.Request, userid, sessToken string)

func Signup

func Signup(w http.ResponseWriter, r *http.Request)

func UpdatePassword

func UpdatePassword(w http.ResponseWriter, r *http.Request, userid string)

func UpdateUserPictureRoute

func UpdateUserPictureRoute(w http.ResponseWriter, r *http.Request, userid string)

func Usage

func Usage(w http.ResponseWriter, r *http.Request, userid string)

Types

type DeleteAccountRequest

type DeleteAccountRequest struct {
	Password string `json:"password,omitempty"`
}

type DeleteAccountResponse

type DeleteAccountResponse struct {
	Success bool `json:"success,omitempty"`
}

type ForgottenPasswordResetRequest

type ForgottenPasswordResetRequest struct {
	Token       string `json:"token,omitempty"`
	NewPassword string `json:"new_password,omitempty"`
}

type ForgottenPasswordResetResponse

type ForgottenPasswordResetResponse struct {
	Success bool `json:"success,omitempty"`
}

type ForgottenPasswordSendLinkRequest

type ForgottenPasswordSendLinkRequest struct {
	Email string `json:"email,omitempty"`
}

type ForgottenPasswordSendLinkResponse

type ForgottenPasswordSendLinkResponse struct {
	Success bool `json:"success,omitempty"`
}

type GetUserResponse

type GetUserResponse struct {
	Success bool        `json:"success,omitempty"`
	User    *model.User `json:"user,omitempty"`
}

type SigninRequest

type SigninRequest struct {
	Email    string `json:"email,omitempty"`
	Password string `json:"password,omitempty"`
}

type SigninResponse

type SigninResponse struct {
	Success bool   `json:"success,omitempty"`
	Session string `json:"session,omitempty"`
}

type SignoutResponse

type SignoutResponse struct {
	Success bool `json:"success,omitempty"`
}

type SignupRequest

type SignupRequest struct {
	Email    string `json:"email,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

type SignupResponse

type SignupResponse struct {
	Success bool        `json:"success,omitempty"`
	User    *model.User `json:"user,omitempty"`
}

type UpdatePasswordRequest

type UpdatePasswordRequest struct {
	CurrentPassword string `json:"current_password,omitempty"`
	NewPassword     string `json:"new_password,omitempty"`
}

type UpdatePasswordResponse

type UpdatePasswordResponse struct {
	Success bool `json:"success,omitempty"`
}

type UsageResponse

type UsageResponse struct {
	Success bool                  `json:"success,omitempty"`
	Usage   *model.UserStatistics `json:"usage,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL