Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
// code
Code int64 `json:"code,omitempty"`
// message
// Required: true
Message *string `json:"message"`
}
Error error
swagger:model error
func (*Error) ContextValidate ¶
ContextValidate validates this error based on context it is used
func (*Error) MarshalBinary ¶
MarshalBinary interface implementation
func (*Error) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type RequestResult ¶
type RequestResult struct {
// tracking id
TrackingID string `json:"tracking_id,omitempty"`
// tracking numbers
TrackingNumbers []*TrackingNumber `json:"tracking_numbers"`
}
RequestResult request result
swagger:model requestResult
func (*RequestResult) ContextValidate ¶
ContextValidate validate this request result based on the context it is used
func (*RequestResult) MarshalBinary ¶
func (m *RequestResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*RequestResult) UnmarshalBinary ¶
func (m *RequestResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Result ¶
type Result struct {
// code
Code string `json:"code,omitempty"`
// id
ID string `json:"id,omitempty"`
// results
Results []*SpiderResults `json:"results"`
// status
Status string `json:"status,omitempty"`
// uuid
UUID string `json:"uuid,omitempty"`
}
Result result
swagger:model result
func (*Result) ContextValidate ¶
ContextValidate validate this result based on the context it is used
func (*Result) MarshalBinary ¶
MarshalBinary interface implementation
func (*Result) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type SpiderResults ¶
type SpiderResults struct {
// error
// Example: error message
Error string `json:"error,omitempty"`
// execute time
// Example: 1.234
ExecuteTime float64 `json:"execute_time,omitempty"`
// result
// Example: {"CountryFrom":"RU","CountryTo":"US","events":[{"date":"2021-01-01T00:00:00Z","place":"New York","status":"In Transit"}]}
Result interface{} `json:"result,omitempty"`
// spider
// Example: usps
Spider string `json:"spider,omitempty"`
// tracking number
// Example: 1234567890
TrackingNumber string `json:"tracking_number,omitempty"`
}
SpiderResults spider results
swagger:model spiderResults
func (*SpiderResults) ContextValidate ¶
ContextValidate validates this spider results based on context it is used
func (*SpiderResults) MarshalBinary ¶
func (m *SpiderResults) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SpiderResults) UnmarshalBinary ¶
func (m *SpiderResults) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TrackRequest ¶
type TrackRequest struct {
// tracking numbers
// Required: true
TrackingNumbers []string `json:"tracking_numbers"`
}
TrackRequest track request
swagger:model trackRequest
func (*TrackRequest) ContextValidate ¶
ContextValidate validates this track request based on context it is used
func (*TrackRequest) MarshalBinary ¶
func (m *TrackRequest) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TrackRequest) UnmarshalBinary ¶
func (m *TrackRequest) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TrackingNumber ¶
type TrackingNumber struct {
// code
Code string `json:"code,omitempty"`
// uuid
UUID string `json:"uuid,omitempty"`
}
TrackingNumber tracking number
swagger:model trackingNumber
func (*TrackingNumber) ContextValidate ¶
ContextValidate validates this tracking number based on context it is used
func (*TrackingNumber) MarshalBinary ¶
func (m *TrackingNumber) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TrackingNumber) UnmarshalBinary ¶
func (m *TrackingNumber) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type TrackingResult ¶
type TrackingResult struct {
// data
Data []*Result `json:"data"`
// error
Error string `json:"error,omitempty"`
// status
Status bool `json:"status,omitempty"`
}
TrackingResult tracking result
swagger:model trackingResult
func (*TrackingResult) ContextValidate ¶
ContextValidate validate this tracking result based on the context it is used
func (*TrackingResult) MarshalBinary ¶
func (m *TrackingResult) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*TrackingResult) UnmarshalBinary ¶
func (m *TrackingResult) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation