Documentation ¶
Index ¶
- func GetUser(r *http.Request) (user models.User, err error)
- type BaseHandler
- func (h *BaseHandler) CreateAccessToken(w http.ResponseWriter, r *http.Request)
- func (h *BaseHandler) CreateMessage(w http.ResponseWriter, r *http.Request)
- func (h *BaseHandler) GetCurrentUser(w http.ResponseWriter, r *http.Request)
- func (h *BaseHandler) GetMessages(w http.ResponseWriter, r *http.Request)
- func (h *BaseHandler) GetUserList(w http.ResponseWriter, r *http.Request)
- func (h *BaseHandler) Signup(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseHandler ¶
type BaseHandler struct {
// contains filtered or unexported fields
}
BaseHandler will hold everything that controller needs
func NewBaseHandler ¶
func NewBaseHandler(db *gorm.DB) *BaseHandler
NewBaseHandler returns a new BaseHandler
func (*BaseHandler) CreateAccessToken ¶
func (h *BaseHandler) CreateAccessToken(w http.ResponseWriter, r *http.Request)
CreateAccessToken API Creates user Access token
func (*BaseHandler) CreateMessage ¶
func (h *BaseHandler) CreateMessage(w http.ResponseWriter, r *http.Request)
CreateMessage creates message
func (*BaseHandler) GetCurrentUser ¶
func (h *BaseHandler) GetCurrentUser(w http.ResponseWriter, r *http.Request)
GetCurrentUser handler returns authanticated user informations
func (*BaseHandler) GetMessages ¶
func (h *BaseHandler) GetMessages(w http.ResponseWriter, r *http.Request)
GetMessages returns user messages
func (*BaseHandler) GetUserList ¶
func (h *BaseHandler) GetUserList(w http.ResponseWriter, r *http.Request)
GetUserList handler returns list of user
func (*BaseHandler) Signup ¶
func (h *BaseHandler) Signup(w http.ResponseWriter, r *http.Request)
Signup API Creates user
Click to show internal directories.
Click to hide internal directories.