Documentation ¶
Index ¶
- func NewMiddleware(next gin.HandlerFunc, serviceCode int, endpointCode int) gin.HandlerFunc
- type Envelope
- type EnvelopeError
- func (e *EnvelopeError) SetEndpoint(endpoint int) *EnvelopeError
- func (e *EnvelopeError) SetError(error int) *EnvelopeError
- func (e *EnvelopeError) SetMessage(message string) *EnvelopeError
- func (e *EnvelopeError) SetService(service int) *EnvelopeError
- func (e *EnvelopeError) SetValidationError(param int, error int) *EnvelopeError
- type EnvelopeStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMiddleware ¶
func NewMiddleware(next gin.HandlerFunc, serviceCode int, endpointCode int) gin.HandlerFunc
NewMiddleware @todo doc
Types ¶
type Envelope ¶
type Envelope struct { XMLName xml.Name `json:"-" xml:"envelope"` StatusCode int `json:"-" xml:"-"` Status EnvelopeStatus `json:"status" xml:"status"` Data interface{} `json:"data,omitempty" xml:"data,omitempty"` }
Envelope @todo doc
func NewEnvelopeOk ¶
NewEnvelopeOk @todo doc
func NewEnvelopeWithError ¶
NewEnvelopeWithError @todo doc
func NewEnvelopeWithValidationError ¶
NewEnvelopeWithValidationError @todo doc
func (*Envelope) AddError ¶
func (s *Envelope) AddError(e EnvelopeError) *Envelope
AddError @todo doc
func (*Envelope) SetEndpoint ¶
SetEndpoint @todo doc
func (*Envelope) SetService ¶
SetService @todo doc
type EnvelopeError ¶
type EnvelopeError struct { Service int `json:"-" xml:"-"` Endpoint int `json:"-" xml:"-"` Param int `json:"-" xml:"-"` Error int `json:"-" xml:"-"` Code string `json:"code" xml:"code"` Message string `json:"message" xml:"message"` }
EnvelopeError @todo doc
func NewEnvelopeValidationError ¶
func NewEnvelopeValidationError(param int, error int) *EnvelopeError
NewEnvelopeValidationError @todo doc
func (*EnvelopeError) SetEndpoint ¶
func (e *EnvelopeError) SetEndpoint(endpoint int) *EnvelopeError
SetEndpoint @todo doc
func (*EnvelopeError) SetError ¶
func (e *EnvelopeError) SetError(error int) *EnvelopeError
SetError @todo doc
func (*EnvelopeError) SetMessage ¶
func (e *EnvelopeError) SetMessage(message string) *EnvelopeError
SetMessage @todo doc
func (*EnvelopeError) SetService ¶
func (e *EnvelopeError) SetService(service int) *EnvelopeError
SetService @todo doc
func (*EnvelopeError) SetValidationError ¶
func (e *EnvelopeError) SetValidationError(param int, error int) *EnvelopeError
SetValidationError @todo doc
type EnvelopeStatus ¶
type EnvelopeStatus struct { Status bool `json:"status" xml:"status"` Errors []EnvelopeError `json:"errors" xml:"errors"` }
EnvelopeStatus @todo doc
func NewEnvelopeStatusWithError ¶
func NewEnvelopeStatusWithError(error int, message string) *EnvelopeStatus
NewEnvelopeStatusWithError @todo doc
func NewEnvelopeStatusWithValidationError ¶
func NewEnvelopeStatusWithValidationError(param int, error int, message string) *EnvelopeStatus
NewEnvelopeStatusWithValidationError @todo doc
func (*EnvelopeStatus) AddError ¶
func (s *EnvelopeStatus) AddError(e EnvelopeError) *EnvelopeStatus
AddError @todo doc
func (*EnvelopeStatus) SetEndpoint ¶
func (s *EnvelopeStatus) SetEndpoint(endpoint int) *EnvelopeStatus
SetEndpoint @todo doc
func (*EnvelopeStatus) SetService ¶
func (s *EnvelopeStatus) SetService(service int) *EnvelopeStatus
SetService @todo doc
Click to show internal directories.
Click to hide internal directories.