Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("EVENTS POLL REQUEST RETURNED NOT FOUND")
View Source
var ErrReqLimitExceeded = errors.New("EVENTS POLL REQUEST LIMIT EXCEEDED")
ErrReqLimitExceeded API query limit exceeded
ErrUnauthorized api error
View Source
var ValidEventsByCodeName = map[string]string{
"COL": "PLACED",
"REC": "INTEGRATED",
"CFM": "CONFIRMED",
"CAR": "CANCELLATION_REQUESTED",
"CAF": "CANCELLATION_REQUEST_FAILED",
"CAN": "CANCELLED",
"DRE": "GOING_TO_ORIGIN",
"NRE": "ARRIVED_AT_ORIGIN",
"RTD": "READY_TO_DELIVER",
"CLT": "COLLECTED",
"DCL": "DISPATCHED",
"NCL": "DELIVERED",
"CON": "CONCLUDED",
"PAA": "PICKUP_AREA_ASSIGNED",
"DNO": "DELAY_NOTIFICATION",
"CPT": "CHANGE_PREPARATION_TIME",
"RDA": "REQUEST_DRIVER_AVAILABILITY",
"RDR": "REQUEST_DRIVER",
"RDS": "REQUEST_DRIVER_SUCCESS",
"RDF": "REQUEST_DRIVER_FAILED",
"ADR": "ASSIGN_DRIVER",
"CCR": "CONSUMER_CANCELLATION_REQUESTED",
"CCA": "CONSUMER_CANCELLATION_ACCEPTED",
"CCD": "CONSUMER_CANCELLATION_DENIED",
"ATG": "ADDED_TO_GROUP",
"EWG": "EXECUTED_WITH_GROUP",
"CWG": "CANCELLED_WITH_GROUP",
"CIG": "COLLECTED_IN_GROUP",
"AWG": "ASSIGNED_WITH_GROUP",
"UPR": "UPDATE_REQUESTED",
"UPD": "UPDATE_DENIED",
"UPT": "UPDATED",
"BOA": "BOX_ASSIGNED",
"RPS": "RECOMMENDED_PREPARATION_START",
}
ValidEventsByCodeName API events by code:name
View Source
var ValidEventsByNameCode = map[string]string{
"PLACED": "COL",
"INTEGRATED": "REC",
"CONFIRMED": "CFM",
"CANCELLATION_REQUESTED": "CAR",
"CANCELLATION_REQUEST_FAILED": "CAF",
"CANCELLED": "CAN",
"GOING_TO_ORIGIN": "DRE",
"ARRIVED_AT_ORIGIN": "NRE",
"READY_TO_DELIVER": "RTD",
"COLLECTED": "CLT",
"DISPATCHED": "DCL",
"DELIVERED": "NCL",
"CONCLUDED": "CON",
"PICKUP_AREA_ASSIGNED": "PAA",
"DELAY_NOTIFICATION": "DNO",
"CHANGE_PREPARATION_TIME": "CPT",
"REQUEST_DRIVER_AVAILABILITY": "RDA",
"REQUEST_DRIVER": "RDR",
"REQUEST_DRIVER_SUCCESS": "RDS",
"REQUEST_DRIVER_FAILED": "RDF",
"ASSIGN_DRIVER": "ADR",
"CONSUMER_CANCELLATION_REQUESTED": "CCR",
"CONSUMER_CANCELLATION_ACCEPTED": "CCA",
"CONSUMER_CANCELLATION_DENIED": "CCD",
"ADDED_TO_GROUP": "ATG",
"EXECUTED_WITH_GROUP": "EWG",
"CANCELLED_WITH_GROUP": "CWG",
"COLLECTED_IN_GROUP": "CIG",
"ASSIGNED_WITH_GROUP": "AWG",
"UPDATE_REQUESTED": "UPR",
"UPDATE_DENIED": "UPD",
"UPDATED": "UPT",
"BOX_ASSIGNED": "BOA",
"RECOMMENDED_PREPARATION_START": "RPS",
}
ValidEventsByNameCode API events by name:code
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Code string `json:"code"` CorrelationID string `json:"correlationId"` CreatedAt time.Time `json:"createdAt"` ID string `json:"id,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
Event returned by the API
type Service ¶
type Service interface { Poll() ([]Event, error) V2Poll() (ml []V2Event, err error) Acknowledge([]Event) (err error) V2Acknowledge([]V2Event) (err error) }
Service describes the event abstraction
Click to show internal directories.
Click to hide internal directories.