common

package module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2021 License: MIT Imports: 5 Imported by: 0

README

pim : api-common

Documentation

Index

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

func NewEnvelopeOk(statusCode int, data interface{}) *Envelope

NewEnvelopeOk @todo doc

func NewEnvelopeWithError

func NewEnvelopeWithError(statusCode int, error int, message string) *Envelope

NewEnvelopeWithError @todo doc

func NewEnvelopeWithValidationError

func NewEnvelopeWithValidationError(statusCode int, param int, error int, message string) *Envelope

NewEnvelopeWithValidationError @todo doc

func (*Envelope) AddError

func (s *Envelope) AddError(e EnvelopeError) *Envelope

AddError @todo doc

func (*Envelope) SetEndpoint

func (s *Envelope) SetEndpoint(endpoint int) *Envelope

SetEndpoint @todo doc

func (*Envelope) SetService

func (s *Envelope) SetService(service int) *Envelope

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 NewEnvelopeError

func NewEnvelopeError(error int) *EnvelopeError

NewEnvelopeError @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 NewEnvelopeStatusOk

func NewEnvelopeStatusOk() *EnvelopeStatus

NewEnvelopeStatusOk @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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL