Documentation ¶
Index ¶
- func ConvertToDAO(titleMaxLength, bodyMaxLength int, st contract.Story) (*model.Story, error)
- func ConvertToDTO(st *model.Story) contract.Story
- func ParseRequest(req *http.Request, data interface{}) error
- func WriteFailureResponse(gr resperr.ResponseError, resp http.ResponseWriter)
- func WriteSuccessResponse(statusCode int, data interface{}, resp http.ResponseWriter)
- type CopyWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToDAO ¶
func ParseRequest ¶
func WriteFailureResponse ¶
func WriteFailureResponse(gr resperr.ResponseError, resp http.ResponseWriter)
func WriteSuccessResponse ¶
func WriteSuccessResponse(statusCode int, data interface{}, resp http.ResponseWriter)
Types ¶
type CopyWriter ¶
type CopyWriter struct { http.ResponseWriter // contains filtered or unexported fields }
func NewCopyWriter ¶
func NewCopyWriter(resp http.ResponseWriter) *CopyWriter
func (*CopyWriter) Body ¶
func (cw *CopyWriter) Body() ([]byte, error)
func (*CopyWriter) Code ¶
func (cw *CopyWriter) Code() int
func (*CopyWriter) WriteHeader ¶
func (cw *CopyWriter) WriteHeader(statusCode int)
Click to show internal directories.
Click to hide internal directories.