Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMethodNotAllowed = errors.New("error: Method is not allowed") ErrInvalidToken = errors.New("error: Invalid Authorization token") ErrUserExists = errors.New("error: User already exists") )
View Source
var ErrHTTPStatusMap = map[string]int{ pkg.ErrNotFound.Error(): http.StatusNotFound, pkg.ErrInvalidSlug.Error(): http.StatusBadRequest, pkg.ErrAlreadyExists.Error(): http.StatusConflict, pkg.ErrNotFound.Error(): http.StatusNotFound, pkg.ErrDatabase.Error(): http.StatusInternalServerError, pkg.ErrUnauthorized.Error(): http.StatusUnauthorized, pkg.ErrForbidden.Error(): http.StatusForbidden, ErrMethodNotAllowed.Error(): http.StatusMethodNotAllowed, ErrInvalidToken.Error(): http.StatusBadRequest, ErrUserExists.Error(): http.StatusConflict, }
Functions ¶
func Wrap ¶
func Wrap(err error, w http.ResponseWriter)
Types ¶
type Guest ¶
type Participant ¶
type Participant struct { Name string `json:"name"` RegNo string `json:"reg_no"` Email string `json:"email"` PhoneNumber string `json:"phone_number"` Gender string `json:"gender"` EventId uint `json:"event_id"` }
func (Participant) Transform ¶
func (p Participant) Transform() *entities.Participant
Click to show internal directories.
Click to hide internal directories.