Documentation
¶
Index ¶
- type Envelope
- func (envelope Envelope) WithEndpointId(val int) Envelope
- func (envelope Envelope) WithError(e EnvelopeError) Envelope
- func (envelope Envelope) WithNewEnvelopePagination(search string, start, count, total int64) Envelope
- func (envelope Envelope) WithNewError(status int, e error, ctx ...flam.Bag) Envelope
- func (envelope Envelope) WithPagination(pagination any) Envelope
- func (envelope Envelope) WithServiceId(val int) Envelope
- type EnvelopeError
- func (envelopeError EnvelopeError) WithContext(key string, value any) EnvelopeError
- func (envelopeError EnvelopeError) WithEndpointId(val int) EnvelopeError
- func (envelopeError EnvelopeError) WithErrorId(id any) EnvelopeError
- func (envelopeError EnvelopeError) WithParamId(param int) EnvelopeError
- func (envelopeError EnvelopeError) WithServiceId(val int) EnvelopeError
- func (envelopeError EnvelopeError) WithStatus(val int) EnvelopeError
- type EnvelopePagination
- type EnvelopeStatus
- type ProblemEnvelope
- func (problem ProblemEnvelope) Get(key string) any
- func (problem ProblemEnvelope) GetDetail() string
- func (problem ProblemEnvelope) GetId() string
- func (problem ProblemEnvelope) GetInstance() string
- func (problem ProblemEnvelope) GetStatus() int
- func (problem ProblemEnvelope) GetTitle() string
- func (problem ProblemEnvelope) GetType() string
- func (problem ProblemEnvelope) With(key string, value any) ProblemEnvelope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope struct {
Status EnvelopeStatus `json:"status,omitempty"`
Data any `json:"data,omitempty"`
Pagination any `json:"pagination,omitempty"`
}
func NewEnvelope ¶
func (Envelope) WithEndpointId ¶
func (Envelope) WithError ¶
func (envelope Envelope) WithError( e EnvelopeError, ) Envelope
func (Envelope) WithNewEnvelopePagination ¶
func (Envelope) WithNewError ¶
func (Envelope) WithPagination ¶
func (Envelope) WithServiceId ¶
type EnvelopeError ¶
type EnvelopeError struct {
Status int `json:"status"`
Id string `json:"id"`
Context flam.Bag `json:"context"`
// contains filtered or unexported fields
}
func NewEnvelopeError ¶
func NewEnvelopeError( status int, e error, ctx ...flam.Bag, ) EnvelopeError
func (EnvelopeError) WithContext ¶
func (envelopeError EnvelopeError) WithContext( key string, value any, ) EnvelopeError
func (EnvelopeError) WithEndpointId ¶
func (envelopeError EnvelopeError) WithEndpointId( val int, ) EnvelopeError
func (EnvelopeError) WithErrorId ¶
func (envelopeError EnvelopeError) WithErrorId( id any, ) EnvelopeError
func (EnvelopeError) WithParamId ¶
func (envelopeError EnvelopeError) WithParamId( param int, ) EnvelopeError
func (EnvelopeError) WithServiceId ¶
func (envelopeError EnvelopeError) WithServiceId( val int, ) EnvelopeError
func (EnvelopeError) WithStatus ¶
func (envelopeError EnvelopeError) WithStatus( val int, ) EnvelopeError
type EnvelopePagination ¶
type EnvelopePagination struct {
Search string `json:"search,omitempty"`
Start int64 `json:"start"`
Count int64 `json:"count"`
Total int64 `json:"total"`
Prev string `json:"prev,omitempty"`
Next string `json:"next,omitempty"`
}
func NewEnvelopePagination ¶
func NewEnvelopePagination( search string, start, count, total int64, ) EnvelopePagination
type EnvelopeStatus ¶
type EnvelopeStatus struct {
Status int `json:"status"`
Success bool `json:"success"`
Errors []EnvelopeError `json:"error"`
}
type ProblemEnvelope ¶
func NewProblemEnvelope ¶
func NewProblemEnvelope( status int, typeURI, title, details, instance string, ctx ...flam.Bag, ) ProblemEnvelope
func NewProblemEnvelopeFrom ¶
func NewProblemEnvelopeFrom( envelope Envelope, ) ProblemEnvelope
func (ProblemEnvelope) Get ¶
func (problem ProblemEnvelope) Get( key string, ) any
func (ProblemEnvelope) GetDetail ¶
func (problem ProblemEnvelope) GetDetail() string
func (ProblemEnvelope) GetId ¶
func (problem ProblemEnvelope) GetId() string
func (ProblemEnvelope) GetInstance ¶
func (problem ProblemEnvelope) GetInstance() string
func (ProblemEnvelope) GetStatus ¶
func (problem ProblemEnvelope) GetStatus() int
func (ProblemEnvelope) GetTitle ¶
func (problem ProblemEnvelope) GetTitle() string
func (ProblemEnvelope) GetType ¶
func (problem ProblemEnvelope) GetType() string
func (ProblemEnvelope) With ¶
func (problem ProblemEnvelope) With( key string, value any, ) ProblemEnvelope
Click to show internal directories.
Click to hide internal directories.