Documentation
¶
Index ¶
- Constants
- type PageableResponse
- type QuestionController
- func (qc QuestionController) Create(w http.ResponseWriter, r *http.Request)
- func (qc QuestionController) Delete(w http.ResponseWriter, r *http.Request)
- func (qc QuestionController) Get(w http.ResponseWriter, r *http.Request)
- func (qc QuestionController) GetAll(w http.ResponseWriter, r *http.Request)
- func (qc QuestionController) Update(w http.ResponseWriter, r *http.Request)
- type Request
Constants ¶
View Source
const ( DefaultOffset = 0 DefaultLimit = 10 DefaultSort = "created_at" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PageableResponse ¶
type PageableResponse struct { Data []repository.QuestionWithRating `json:"data"` Count int64 `json:"count"` }
type QuestionController ¶
type QuestionController struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(questionRepository repository.QuestionRepository) QuestionController
func (QuestionController) Create ¶
func (qc QuestionController) Create(w http.ResponseWriter, r *http.Request)
func (QuestionController) Delete ¶
func (qc QuestionController) Delete(w http.ResponseWriter, r *http.Request)
func (QuestionController) Get ¶
func (qc QuestionController) Get(w http.ResponseWriter, r *http.Request)
func (QuestionController) GetAll ¶
func (qc QuestionController) GetAll(w http.ResponseWriter, r *http.Request)
func (QuestionController) Update ¶
func (qc QuestionController) Update(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.