Documentation ¶
Overview ¶
Package service contains methods used by internal components
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceResponse ¶
type ServiceResponse struct { Status int Data interface{} }
ServiceResponse is a struct for all the responses made by the services
func ContinueResponse ¶
func ContinueResponse(data interface{}) ServiceResponse
ContinueResponse helper method to build a continue type ServiceResponse
func ErrorResponse ¶
func ErrorResponse(err errors.FabricError) ServiceResponse
ErrorResponse helper method to build an error type ServiceResponse
func SuccessResponse ¶
func SuccessResponse(data interface{}) ServiceResponse
SuccessResponse helper method to build a success type ServiceResponse
func (ServiceResponse) WriteTo ¶
func (s ServiceResponse) WriteTo(ctx *gin.Context)
WriteTo implements the gin interface to write a ServiceResponse into an gin request/response
Click to show internal directories.
Click to hide internal directories.