Documentation ¶
Index ¶
- Variables
- func CreateToken() (string, error)
- func GetCurrentUser(r *http.Request) models.User
- func JsonResponse(writer http.ResponseWriter, statusCode int, responseObject interface{})
- func MakeError(msg string) error
- func RandStringBytesMaskImprSrc(n int) string
- func SetCurrentUser(r *http.Request, val models.User)
- type GeneralResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GeneralErrorInternal = MakeError("An error has aoccured") AuthenticationErrorRegisterNoEmail = MakeError("Email is empty") AuthenticationErrorRegisterNoPassword = MakeError("Password is empty") AuthenticationErrorRegisterPasswordNotValid = MakeError("Password not acceptable") AuthenticationErrorRegisterUserCreationFailed = MakeError("Could not create new user") AuthenticationErrorLoginAlreadyAuthenticated = MakeError("User is already authenticated") AuthenticationErrorLoginWrongEmailPassword = MakeError("Wrong email and/or password") AuthenticationErrorLoginUserNotExists = MakeError("Email doesn't exist") AuthenticationErrorAuthorizeNewSession = MakeError("new authorization session") AuthenticationErrorAuthorizeUserNotLoggedIn = MakeError("user not logged in") AuthenticationErrorConfirmationTokenNotValid = MakeError("Confirmation token is not valid") EventsErrorNotFound = MakeError("Event not found") SlotsErrorNotFound = MakeError("Slot not found") )
Functions ¶
func CreateToken ¶
func GetCurrentUser ¶
GetMyKey returns a value for this package from the request values.
func JsonResponse ¶
func JsonResponse(writer http.ResponseWriter, statusCode int, responseObject interface{})
Types ¶
type GeneralResponse ¶
Click to show internal directories.
Click to hide internal directories.