Versions in this module Expand all Collapse all v0 v0.0.2 Dec 5, 2020 Changes in this version type APIResponse + func (ar *APIResponse) SendResponseTO(w http.ResponseWriter) + type ErrorResponse struct + Code int + Error string + func (er *ErrorResponse) WriteErrorTo(w http.ResponseWriter) type ServiceResponse + ErrorCode int + func (sr *ServiceResponse) ToErrorResponse() *ErrorResponse v0.0.1 Dec 1, 2020 Changes in this version + type APIResponse struct + Description string + Name string + func NewAPIResponse(name, description string) *APIResponse + func (ar *APIResponse) SendReponseTO(w http.ResponseWriter) + type ErrorRsponse struct + Code int + Error string + func (er *ErrorRsponse) WriteErrorTo(w http.ResponseWriter) + type ServiceResponse struct + Content string + ErroCode int + Error error + func NewError(err error) *ServiceResponse + func NewErrorCode(code int, err error) *ServiceResponse + func NewSuccess(content string) *ServiceResponse + func (sr *ServiceResponse) ToErrorResonse() *ErrorRsponse