Documentation ¶
Index ¶
- type BaseResponse
- type HTTPError
- type HTTPSuccess
- type Handler
- func (h *Handler) CreateCommunity(c echo.Context) error
- func (h *Handler) CreateUser(c echo.Context) error
- func (h *Handler) DeleteCommunity(c echo.Context) error
- func (h *Handler) DeleteUser(c echo.Context) error
- func (h *Handler) GetCommunities(c echo.Context) error
- func (h *Handler) GetCommunity(c echo.Context) error
- func (h *Handler) GetUser(c echo.Context) error
- func (h *Handler) GetUsers(c echo.Context) error
- func (h *Handler) Login(c echo.Context) error
- func (h *Handler) Logout(c echo.Context) error
- func (h *Handler) Register(c echo.Context) error
- func (h *Handler) UpdateCommunity(c echo.Context) error
- func (h *Handler) UpdateUser(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResponse ¶
type BaseResponse struct {
Success bool `json:"success"`
}
BaseResponse is the base HTTP response
type HTTPError ¶
type HTTPError struct { BaseResponse Error []string `json:"errors,omitempty"` }
HTTPError extends the base HTTP response for returning failed requests
func NewHTTPError ¶
NewHTTPError returns a failed request
type HTTPSuccess ¶
type HTTPSuccess struct { BaseResponse Data interface{} `json:"data,omitempty"` }
HTTPSuccess extends the base HTTP response for returning successful requests
func NewHTTPSuccess ¶
func NewHTTPSuccess(v interface{}) *HTTPSuccess
NewHTTPSuccess returns a successful request
type Handler ¶
Handler is the handler for route controller actions
func (*Handler) CreateCommunity ¶
CreateCommunity returns a single community
func (*Handler) CreateUser ¶
CreateUser creates a user
func (*Handler) DeleteCommunity ¶
DeleteCommunity returns a single community
func (*Handler) DeleteUser ¶
DeleteUser soft deletes a user
func (*Handler) GetCommunities ¶
GetCommunities list all communities
func (*Handler) GetCommunity ¶
GetCommunity returns a single community
func (*Handler) UpdateCommunity ¶
UpdateCommunity returns a single community
Click to show internal directories.
Click to hide internal directories.