Documentation
¶
Overview ¶
Package shipmenttracking provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- Constants
- func NewPostShipmentsTrackingRequest(server string, body PostShipmentsTrackingJSONRequestBody) (*http.Request, error)
- func NewPostShipmentsTrackingRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) PostShipmentsTrackingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*PostShipmentsTrackingResponse, error)
- func (c *ClientWithResponses) PostShipmentsTrackingWithResponse(ctx context.Context, body PostShipmentsTrackingJSONRequestBody, ...) (*PostShipmentsTrackingResponse, error)
- type ClientWithResponsesInterface
- type ErrorMessage
- type ErrorMessage_Error
- type ErrorMessage_Error_Errors_Item
- func (a ErrorMessage_Error_Errors_Item) Get(fieldName string) (value interface{}, found bool)
- func (a ErrorMessage_Error_Errors_Item) MarshalJSON() ([]byte, error)
- func (a *ErrorMessage_Error_Errors_Item) Set(fieldName string, value interface{})
- func (a *ErrorMessage_Error_Errors_Item) UnmarshalJSON(b []byte) error
- type ErrorMessage_Error_Errors_Source
- func (a ErrorMessage_Error_Errors_Source) Get(fieldName string) (value interface{}, found bool)
- func (a ErrorMessage_Error_Errors_Source) MarshalJSON() ([]byte, error)
- func (a *ErrorMessage_Error_Errors_Source) Set(fieldName string, value interface{})
- func (a *ErrorMessage_Error_Errors_Source) UnmarshalJSON(b []byte) error
- type HttpRequestDoer
- type PostShipmentsTrackingJSONRequestBody
- type PostShipmentsTrackingResponse
- type RequestEditorFn
- type ShipmentTracking
- type ShipmentTrackingETAStatus
- type TrackingCurrentEvent
- type TrackingCurrentEventEventType
- type TrackingCurrentLocation
- type TrackingLocation
- type TrackingLocationLocationType
- type TrackingLocationStopType
- type TrackingPositionalInfo
- type TrackingResourceInfo
- type TrackingResourceInfoLocationPermission
- type TrackingResourceInfoNotificationPermission
- type TrackingResourceInfoSubmissionBy
- type TrackingResourceInfoSubmissionType
Constants ¶
const (
OAuthScopes = "OAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewPostShipmentsTrackingRequest ¶
func NewPostShipmentsTrackingRequest(server string, body PostShipmentsTrackingJSONRequestBody) (*http.Request, error)
NewPostShipmentsTrackingRequest calls the generic PostShipmentsTracking builder with application/json body
Types ¶
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) PostShipmentsTracking ¶
func (c *Client) PostShipmentsTracking(ctx context.Context, body PostShipmentsTrackingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// PostShipmentsTrackingWithBody request with any body
PostShipmentsTrackingWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostShipmentsTracking(ctx context.Context, body PostShipmentsTrackingJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) PostShipmentsTrackingWithBodyWithResponse ¶
func (c *ClientWithResponses) PostShipmentsTrackingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostShipmentsTrackingResponse, error)
PostShipmentsTrackingWithBodyWithResponse request with arbitrary body returning *PostShipmentsTrackingResponse
func (*ClientWithResponses) PostShipmentsTrackingWithResponse ¶
func (c *ClientWithResponses) PostShipmentsTrackingWithResponse(ctx context.Context, body PostShipmentsTrackingJSONRequestBody, reqEditors ...RequestEditorFn) (*PostShipmentsTrackingResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// PostShipmentsTrackingWithBodyWithResponse request with any body
PostShipmentsTrackingWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostShipmentsTrackingResponse, error)
PostShipmentsTrackingWithResponse(ctx context.Context, body PostShipmentsTrackingJSONRequestBody, reqEditors ...RequestEditorFn) (*PostShipmentsTrackingResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ErrorMessage ¶
type ErrorMessage struct {
// ApiVersion The version of the API that was used and that raised the error.
ApiVersion *string `json:"apiVersion,omitempty"`
// Error The high-level error that has occurred.
Error *ErrorMessage_Error `json:"error,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ErrorMessage Standardized error response format.
func (ErrorMessage) Get ¶
func (a ErrorMessage) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ErrorMessage. Returns the specified element and whether it was found
func (ErrorMessage) MarshalJSON ¶
func (a ErrorMessage) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorMessage to handle AdditionalProperties
func (*ErrorMessage) Set ¶
func (a *ErrorMessage) Set(fieldName string, value interface{})
Setter for additional properties for ErrorMessage
func (*ErrorMessage) UnmarshalJSON ¶
func (a *ErrorMessage) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorMessage to handle AdditionalProperties
type ErrorMessage_Error ¶
type ErrorMessage_Error struct {
// Code The error status code.
Code *string `json:"code,omitempty"`
// Errors Details of the error message.
Errors *[]ErrorMessage_Error_Errors_Item `json:"errors,omitempty"`
// Message A human-readable summary of the error.
Message *string `json:"message,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ErrorMessage_Error The high-level error that has occurred.
func (ErrorMessage_Error) Get ¶
func (a ErrorMessage_Error) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ErrorMessage_Error. Returns the specified element and whether it was found
func (ErrorMessage_Error) MarshalJSON ¶
func (a ErrorMessage_Error) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorMessage_Error to handle AdditionalProperties
func (*ErrorMessage_Error) Set ¶
func (a *ErrorMessage_Error) Set(fieldName string, value interface{})
Setter for additional properties for ErrorMessage_Error
func (*ErrorMessage_Error) UnmarshalJSON ¶
func (a *ErrorMessage_Error) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorMessage_Error to handle AdditionalProperties
type ErrorMessage_Error_Errors_Item ¶
type ErrorMessage_Error_Errors_Item struct {
// Code An internal subordinate code used for error diagnosis.
Code *string `json:"code,omitempty"`
// Detail A human-readable description of the error that occurred.
Detail *string `json:"detail,omitempty"`
// Source The element that is suspected of originating the error.
Source *ErrorMessage_Error_Errors_Source `json:"source,omitempty"`
// Status The status code response returned to the client.
Status *string `json:"status,omitempty"`
// Title A human-readable title that identifies the error.
Title *string `json:"title,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ErrorMessage_Error_Errors_Item defines model for ErrorMessage.Error.Errors.Item.
func (ErrorMessage_Error_Errors_Item) Get ¶
func (a ErrorMessage_Error_Errors_Item) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ErrorMessage_Error_Errors_Item. Returns the specified element and whether it was found
func (ErrorMessage_Error_Errors_Item) MarshalJSON ¶
func (a ErrorMessage_Error_Errors_Item) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorMessage_Error_Errors_Item to handle AdditionalProperties
func (*ErrorMessage_Error_Errors_Item) Set ¶
func (a *ErrorMessage_Error_Errors_Item) Set(fieldName string, value interface{})
Setter for additional properties for ErrorMessage_Error_Errors_Item
func (*ErrorMessage_Error_Errors_Item) UnmarshalJSON ¶
func (a *ErrorMessage_Error_Errors_Item) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorMessage_Error_Errors_Item to handle AdditionalProperties
type ErrorMessage_Error_Errors_Source ¶
type ErrorMessage_Error_Errors_Source struct {
// Example An example of a valid value for the input parameter.
Example *string `json:"example,omitempty"`
// Parameter The input in the request which caused an error.
Parameter *string `json:"parameter,omitempty"`
AdditionalProperties map[string]interface{} `json:"-"`
}
ErrorMessage_Error_Errors_Source The element that is suspected of originating the error.
func (ErrorMessage_Error_Errors_Source) Get ¶
func (a ErrorMessage_Error_Errors_Source) Get(fieldName string) (value interface{}, found bool)
Getter for additional properties for ErrorMessage_Error_Errors_Source. Returns the specified element and whether it was found
func (ErrorMessage_Error_Errors_Source) MarshalJSON ¶
func (a ErrorMessage_Error_Errors_Source) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorMessage_Error_Errors_Source to handle AdditionalProperties
func (*ErrorMessage_Error_Errors_Source) Set ¶
func (a *ErrorMessage_Error_Errors_Source) Set(fieldName string, value interface{})
Setter for additional properties for ErrorMessage_Error_Errors_Source
func (*ErrorMessage_Error_Errors_Source) UnmarshalJSON ¶
func (a *ErrorMessage_Error_Errors_Source) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorMessage_Error_Errors_Source to handle AdditionalProperties
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type PostShipmentsTrackingJSONRequestBody ¶
type PostShipmentsTrackingJSONRequestBody = ShipmentTracking
PostShipmentsTrackingJSONRequestBody defines body for PostShipmentsTracking for application/json ContentType.
type PostShipmentsTrackingResponse ¶
type PostShipmentsTrackingResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *ShipmentTracking
XML201 *ShipmentTracking
JSON400 *ErrorMessage
XML400 *ErrorMessage
JSON401 *ErrorMessage
XML401 *ErrorMessage
JSON403 *ErrorMessage
XML403 *ErrorMessage
JSON429 *ErrorMessage
XML429 *ErrorMessage
JSON503 *ErrorMessage
XML503 *ErrorMessage
}
func ParsePostShipmentsTrackingResponse ¶
func ParsePostShipmentsTrackingResponse(rsp *http.Response) (*PostShipmentsTrackingResponse, error)
ParsePostShipmentsTrackingResponse parses an HTTP response from a PostShipmentsTrackingWithResponse call
func (PostShipmentsTrackingResponse) Status ¶
func (r PostShipmentsTrackingResponse) Status() string
Status returns HTTPResponse.Status
func (PostShipmentsTrackingResponse) StatusCode ¶
func (r PostShipmentsTrackingResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ShipmentTracking ¶
type ShipmentTracking struct {
// ETA Estimated time of arrival (ISO 8601). Required unless currentEvent.eventType is FACILITY_ARRIVE or FACILITY_DEPART.
ETA *time.Time `json:"ETA"`
// ETAStatus The ETA status of the current destination and not the appointment. Required unless currentEvent.eventType is FACILITY_ARRIVE or FACILITY_DEPART.
ETAStatus *ShipmentTrackingETAStatus `json:"ETAStatus"`
// AppointmentDate Date and time of the appointment (ISO 8601).
AppointmentDate time.Time `json:"appointmentDate"`
// AppointmentID Appointment ID assigned from FAST.
AppointmentID string `json:"appointmentID"`
// CurrentEvent The current event type for the shipment.
CurrentEvent TrackingCurrentEvent `json:"currentEvent"`
// CurrentLocation Current location details for the tracking event.
CurrentLocation TrackingCurrentLocation `json:"currentLocation"`
// ExternalLoadNumber Unique identifier for the shipment load.
ExternalLoadNumber string `json:"externalLoadNumber"`
// Location Location details for the tracking event.
Location TrackingLocation `json:"location"`
// PositionalInfo Positional information for the shipment.
PositionalInfo TrackingPositionalInfo `json:"positionalInfo"`
// ResourceInfo Information about the resource sending the information.
ResourceInfo *TrackingResourceInfo `json:"resourceInfo,omitempty"`
// SchedulerCRID Scheduler's unique identifier.
SchedulerCRID string `json:"schedulerCRID"`
// TrailerID Unique identifier for the trailer.
TrailerID string `json:"trailerID"`
}
ShipmentTracking Details about a shipment tracking event, including location, status, and facility information.
type ShipmentTrackingETAStatus ¶
type ShipmentTrackingETAStatus string
ShipmentTrackingETAStatus The ETA status of the current destination and not the appointment. Required unless currentEvent.eventType is FACILITY_ARRIVE or FACILITY_DEPART.
const ( CANCELLED ShipmentTrackingETAStatus = "CANCELLED" DELAYED ShipmentTrackingETAStatus = "DELAYED" EARLY ShipmentTrackingETAStatus = "EARLY" LATE ShipmentTrackingETAStatus = "LATE" ONTIME ShipmentTrackingETAStatus = "ON_TIME" REDIRECTED ShipmentTrackingETAStatus = "REDIRECTED" RESCHEDULED ShipmentTrackingETAStatus = "RESCHEDULED" )
Defines values for ShipmentTrackingETAStatus.
type TrackingCurrentEvent ¶
type TrackingCurrentEvent struct {
// EventType The type of event.
EventType TrackingCurrentEventEventType `json:"eventType"`
}
TrackingCurrentEvent The current event type for the shipment.
type TrackingCurrentEventEventType ¶
type TrackingCurrentEventEventType string
TrackingCurrentEventEventType The type of event.
const ( ENROUTE TrackingCurrentEventEventType = "EN_ROUTE" FACILITYARRIVE TrackingCurrentEventEventType = "FACILITY_ARRIVE" FACILITYDEPART TrackingCurrentEventEventType = "FACILITY_DEPART" PREARRIVAL TrackingCurrentEventEventType = "PRE_ARRIVAL" )
Defines values for TrackingCurrentEventEventType.
type TrackingCurrentLocation ¶
type TrackingCurrentLocation struct {
// CurrentDateTime Timestamp of the current location.
CurrentDateTime time.Time `json:"currentDateTime"`
// Latitude Latitude of the current location.
Latitude float32 `json:"latitude"`
// Longitude Longitude of the current location.
Longitude float32 `json:"longitude"`
}
TrackingCurrentLocation Current location details for the tracking event.
type TrackingLocation ¶
type TrackingLocation struct {
// ZIPCode5 Five-digit ZIP Code. Required when locationType is CUSTOMER or NON_USPS.
ZIPCode5 *string `json:"ZIPCode5,omitempty"`
// DropSiteKey Key for the drop site. Required when locationType is USPS.
DropSiteKey *string `json:"dropSiteKey,omitempty"`
// LocationType Type of location (e.g., USPS, CUSTOMER, NON_USPS).
LocationType TrackingLocationLocationType `json:"locationType"`
// StopSequence The actual stop number in the route.
StopSequence int `json:"stopSequence"`
// StopType Type of stop (Pickup or Delivery).
StopType TrackingLocationStopType `json:"stopType"`
}
TrackingLocation Location details for the tracking event.
type TrackingLocationLocationType ¶
type TrackingLocationLocationType string
TrackingLocationLocationType Type of location (e.g., USPS, CUSTOMER, NON_USPS).
const ( TrackingLocationLocationTypeCUSTOMER TrackingLocationLocationType = "CUSTOMER" TrackingLocationLocationTypeNONUSPS TrackingLocationLocationType = "NON_USPS" TrackingLocationLocationTypeUSPS TrackingLocationLocationType = "USPS" )
Defines values for TrackingLocationLocationType.
type TrackingLocationStopType ¶
type TrackingLocationStopType string
TrackingLocationStopType Type of stop (Pickup or Delivery).
const ( DELIVERY TrackingLocationStopType = "DELIVERY" PICKUP TrackingLocationStopType = "PICKUP" )
Defines values for TrackingLocationStopType.
type TrackingPositionalInfo ¶
type TrackingPositionalInfo struct {
// Accuracy Accuracy of the coordinates in meters.
Accuracy *float32 `json:"accuracy"`
// Distance Distance traveled in kilometers.
Distance float32 `json:"distance"`
// PingInterval Interval in milliseconds between location pings.
PingInterval int `json:"pingInterval"`
// Speed Velocity of the device in meters per second.
Speed *float32 `json:"speed"`
}
TrackingPositionalInfo Positional information for the shipment.
type TrackingResourceInfo ¶
type TrackingResourceInfo struct {
// Comments Comments related to the submission.
Comments *string `json:"comments,omitempty"`
// LocationPermission Permission of location services status.
LocationPermission *TrackingResourceInfoLocationPermission `json:"locationPermission,omitempty"`
// NotificationPermission Permission of notification services status.
NotificationPermission *TrackingResourceInfoNotificationPermission `json:"notificationPermission,omitempty"`
// Rating Rating (0-5).
Rating *float32 `json:"rating,omitempty"`
// SubmissionBy Who submitted the information.
SubmissionBy *TrackingResourceInfoSubmissionBy `json:"submissionBy,omitempty"`
// SubmissionType Type of submission.
SubmissionType *TrackingResourceInfoSubmissionType `json:"submissionType,omitempty"`
}
TrackingResourceInfo Information about the resource sending the information.
type TrackingResourceInfoLocationPermission ¶
type TrackingResourceInfoLocationPermission string
TrackingResourceInfoLocationPermission Permission of location services status.
const ( TrackingResourceInfoLocationPermissionDENIED TrackingResourceInfoLocationPermission = "DENIED" TrackingResourceInfoLocationPermissionGRANTED TrackingResourceInfoLocationPermission = "GRANTED" TrackingResourceInfoLocationPermissionNOTREQUIRED TrackingResourceInfoLocationPermission = "NOT_REQUIRED" )
Defines values for TrackingResourceInfoLocationPermission.
type TrackingResourceInfoNotificationPermission ¶
type TrackingResourceInfoNotificationPermission string
TrackingResourceInfoNotificationPermission Permission of notification services status.
const ( TrackingResourceInfoNotificationPermissionDENIED TrackingResourceInfoNotificationPermission = "DENIED" TrackingResourceInfoNotificationPermissionGRANTED TrackingResourceInfoNotificationPermission = "GRANTED" TrackingResourceInfoNotificationPermissionNOTREQUIRED TrackingResourceInfoNotificationPermission = "NOT_REQUIRED" )
Defines values for TrackingResourceInfoNotificationPermission.
type TrackingResourceInfoSubmissionBy ¶
type TrackingResourceInfoSubmissionBy string
TrackingResourceInfoSubmissionBy Who submitted the information.
const ( TrackingResourceInfoSubmissionByCUSTOMER TrackingResourceInfoSubmissionBy = "CUSTOMER" TrackingResourceInfoSubmissionByDRIVER TrackingResourceInfoSubmissionBy = "DRIVER" )
Defines values for TrackingResourceInfoSubmissionBy.
type TrackingResourceInfoSubmissionType ¶
type TrackingResourceInfoSubmissionType string
TrackingResourceInfoSubmissionType Type of submission.
const ( AUTOMATIC TrackingResourceInfoSubmissionType = "AUTOMATIC" MANUAL TrackingResourceInfoSubmissionType = "MANUAL" )
Defines values for TrackingResourceInfoSubmissionType.