Documentation ¶
Index ¶
- Variables
- func FormatRequestPrint(r *http.Request) string
- func JsonValid(c echo.Context, i interface{}) (err error)
- func RespConflict(k string, i interface{}) interface{}
- func RespCreated() interface{}
- func RespHandlingError(c echo.Context, api_err ApiError, i interface{}) (err error)
- func RespInternelServerError() interface{}
- func RespMessage(m string, k *string, i interface{}) interface{}
- func RespNoContent(k string, i interface{}) interface{}
- func SessionDelete(c echo.Context)
- func SessionSet(c echo.Context, user *User)
- type Access
- type ApiError
- type Avatar
- type Confirmed
- type JsonError
- type Modified
- type PasswordInfo
- type Profile
- type ResponseError
- type ResponseMessage
- type User
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func FormatRequestPrint ¶
func RespConflict ¶
func RespConflict(k string, i interface{}) interface{}
func RespCreated ¶
func RespCreated() interface{}
func RespHandlingError ¶
func RespInternelServerError ¶
func RespInternelServerError() interface{}
func RespMessage ¶
func RespNoContent ¶
func RespNoContent(k string, i interface{}) interface{}
func SessionDelete ¶
func SessionDelete(c echo.Context)
func SessionSet ¶
func SessionSet(c echo.Context, user *User)
Types ¶
type ApiError ¶
type ApiError struct { Error error Message ResponseMessage Model string Line int FileName string UserEmail string UserUuid string }
func GetError ¶
func GetError(err error, message ResponseMessage) *ApiError
func (*ApiError) PrintErrorNoSession ¶
func (e *ApiError) PrintErrorNoSession(c echo.Context, i interface{})
type JsonError ¶
func JsonErrorResponse ¶
type PasswordInfo ¶
type Profile ¶
type Profile struct { ID string `bson:"_id" json:"id" validate:"required"` UserID string `bson:"user_id" json:"user_id" validate:"required"` Avatar Avatar `json:"avatar"` FirstName string `json:"first_name" validate:"required"` LastName string `json:"last_name" validate:"required"` FullName string `json:"full_name" validate:"required"` DisplayName string `json:"display_name" validate:"required"` Gender string `json:"gender"` Country string `bson:"country" json:"country"` Modified Modified `json:"modified" bson:"modified" validation:"required"` }
type ResponseError ¶
type ResponseMessage ¶
type User ¶
type User struct { ID string `json:"uuid" bson:"_id,omitempty" validation:"required,uuid"` Email string `json:"email" bson:"email" validation:"required,email"` Confirmed Confirmed `json:"confirmed" bson:"confirmed" validation:"required"` PrivacyPolicy Confirmed `json:"privacy_policy" bson:"privacy_policy" validation:"required"` Modified Modified `json:"modified" bson:"modified" validation:"required"` PasswordInfo PasswordInfo `json:"-" bson:"password"` Profile Profile `json:"profile" bson:"-"` }
func SessionUserGet ¶
Click to show internal directories.
Click to hide internal directories.