Versions in this module Expand all Collapse all v3 v3.1.1 May 31, 2024 Changes in this version + type ProofOfDelivery struct + Type string + Url string type Tracking + ProofOfDelivery []ProofOfDelivery v3.1.0 Jan 3, 2024 v3.0.1 Dec 21, 2023 v3.0.0 Dec 20, 2023 Changes in this version + const HeaderAsSignatureHMAC + const VERSION + func GetCanonicalizedHeaders(headers map[string]string) string + func GetCanonicalizedResource(rawUrl string) (result string, err error) + func GetHMACSignature(signString string, secret []byte) string + func GetSignString(...) (signature string, err error) + func GetSignature(authenticationType AuthenticationType, secretKey []byte, ...) (string, string, error) + func Md5Encode(source string) (hashed string, err error) + type APIError struct + Code int + Message string + Path string + Type string + func (e *APIError) Error() string + type AdditionalField struct + DestinationCountryISO3 string + DestinationPostalCode string + DestinationState string + OriginCountryISO3 string + TrackingAccountNumber string + TrackingDestinationCountry string + TrackingKey string + TrackingOriginCountry string + TrackingPostalCode string + TrackingShipDate string + TrackingState string + type Address struct + City string + Country string + PostalCode string + RawLocation string + State string + type AuthenticationType int64 + const AES + const APIKey + type Checkpoint struct + CheckpointTime string + City string + Coordinates []float32 + CountryISO3 string + CountryName string + CreatedAt *time.Time + Location string + Message string + RawTag string + Slug string + State string + Subtag string + SubtagMessage string + Tag string + Zip string + type Client struct + Config Config + func NewClient(cfg Config) (*Client, error) + func (client *Client) AddNotification(ctx context.Context, identifier TrackingIdentifier, notification Notification) (Notification, error) + func (client *Client) BatchPredictEstimatedDeliveryDate(ctx context.Context, params []EstimatedDeliveryDate) (EstimatedDeliveryDates, error) + func (client *Client) CreateTracking(ctx context.Context, params CreateTrackingParams) (Tracking, error) + func (client *Client) DeleteTracking(ctx context.Context, identifier TrackingIdentifier) (Tracking, error) + func (client *Client) DetectCouriers(ctx context.Context, params CourierDetectionParams) (CourierList, error) + func (client *Client) GetAllCouriers(ctx context.Context) (CourierList, error) + func (client *Client) GetCouriers(ctx context.Context) (CourierList, error) + func (client *Client) GetLastCheckpoint(ctx context.Context, identifier TrackingIdentifier, params GetCheckpointParams) (LastCheckpoint, error) + func (client *Client) GetNotification(ctx context.Context, identifier TrackingIdentifier) (Notification, error) + func (client *Client) GetRateLimit() RateLimit + func (client *Client) GetTracking(ctx context.Context, identifier TrackingIdentifier, params GetTrackingParams) (Tracking, error) + func (client *Client) GetTrackings(ctx context.Context, params GetTrackingsParams) (PagedTrackings, error) + func (client *Client) MarkTrackingAsCompleted(ctx context.Context, identifier TrackingIdentifier, ...) (Tracking, error) + func (client *Client) RemoveNotification(ctx context.Context, identifier TrackingIdentifier, notification Notification) (Notification, error) + func (client *Client) RetrackTracking(ctx context.Context, identifier TrackingIdentifier) (Tracking, error) + func (client *Client) UpdateTracking(ctx context.Context, identifier TrackingIdentifier, ...) (Tracking, error) + type Config struct + APIKey string + APISecret string + AuthenticationType AuthenticationType + BaseURL string + HTTPClient *http.Client + UserAgentPrefix string + type Courier struct + DefaultLanguage string + Name string + OptionalFields []string + OtherName string + Phone string + RequiredFields []string + ServiceFromCountryISO3 []string + Slug string + SupportedLanguages []string + WebURL string + type CourierDetectionParams struct + Slug []string + SlugGroup string + TrackingNumber string + type CourierList struct + Couriers []Courier + Total int + type CreateTrackingParams struct + Android []string + CourierConnectionId string + CustomFields map[string]string + CustomerName string + DeliveryType string + DestinationRawLocation string + Emails []string + IOS []string + Language string + NextCouriers []NextCourier + Note string + OrderDate string + OrderID string + OrderIDPath string + OrderNumber string + OrderPromisedDeliveryDate string + OriginCity string + OriginPostalCode string + OriginRawLocation string + OriginState string + PickupLocation string + PickupNote string + SMSes []string + ShipmentTags []string + ShipmentType string + Slug string + SlugGroup string + Title string + TrackingNumber string + type EstimatedDelivery struct + Datetime string + DatetimeMax string + DatetimeMin string + Source string + Type string + type EstimatedDeliveryDate struct + ConfidenceScore float64 + DestinationAddress *Address + EstimatedDeliveryDate string + EstimatedDeliveryDateMax string + EstimatedDeliveryDateMin string + EstimatedPickup *EstimatedPickup + OriginAddress *Address + PackageCount int64 + PickupTime string + ServiceTypeName string + Slug string + Weight *Weight + type EstimatedDeliveryDates struct + Dates []EstimatedDeliveryDate + type EstimatedPickup struct + BusinessDays []int64 + OrderCutoffTime string + OrderProcessingTime *OrderProcessingTime + OrderTime string + PickupTime string + type GetCheckpointParams struct + Fields string + Lang string + type GetTrackingParams struct + Fields string + Lang string + type GetTrackingsParams struct + CourierDestinationCountryIso3 string + CreatedAtMax string + CreatedAtMin string + Destination string + Fields string + Keyword string + Limit int + Origin string + Page int + ReturnToSender string + ShipmentTags string + Slug string + Tag string + TrackingNumbers string + TransitTime int + UpdatedAtMax string + UpdatedAtMin string + type LastCheckpoint struct + Checkpoint Checkpoint + ID string + Slug string + Subtag string + SubtagMessage string + Tag string + TrackingNumber string + type Meta struct + Code int + Message string + Type string + type NextCourier struct + Slug string + Source string + TrackingNumber string + type Notification struct + Emails []string + SMSes []string + type OrderProcessingTime struct + Unit string + Value int64 + type PagedTrackings struct + Count int + CourierDestinationCountryIso3 []string + CreatedAtMax *time.Time + CreatedAtMin *time.Time + Destination []string + Keyword string + LastUpdatedAt *time.Time + Limit int + Origin []string + Page int + ReturnToSender []bool + Slug string + Tag string + Trackings []Tracking + type RateLimit struct + Limit int + Remaining int + Reset int64 + type Response struct + Data interface{} + Meta Meta + type SlugTrackingNumber struct + Slug string + TrackingNumber string + func (stn SlugTrackingNumber) URIPath() (string, error) + type TooManyRequestsError struct + RateLimit *RateLimit + func (e *TooManyRequestsError) Error() string + type Tracking struct + Active bool + Checkpoints []Checkpoint + CourierConnectionId string + CourierDestinationCountryISO3 string + CourierRedirectLink string + CourierTrackingLink string + CreatedAt *time.Time + CustomEstimatedDeliveryDate EstimatedDelivery + CustomFields map[string]string + CustomerName string + DeliveryType string + DestinationCity string + DestinationCountryISO3 string + DestinationRawLocation string + Emails []string + EstimatedDeliveryDate EstimatedDeliveryDate + ExpectedDelivery string + FirstAttemptedAt string + FirstEstimatedDelivery EstimatedDelivery + ID string + Language string + LastMileTrackingSupported bool + LastUpdatedAt *time.Time + LatestEstimatedDelivery EstimatedDelivery + NextCouriers []NextCourier + Note string + OnTimeDifference int + OnTimeStatus string + OrderDate string + OrderID string + OrderIDPath string + OrderNumber string + OrderPromisedDeliveryDate string + OrderTags []string + OriginCountryISO3 string + PickupLocation string + PickupNote string + ReturnToSender bool + SMSes []string + ShipmentDeliveryDate string + ShipmentPackageCount int + ShipmentPickupDate string + ShipmentTags []string + ShipmentType string + ShipmentWeight float64 + ShipmentWeightUnit string + SignedBy string + Slug string + Source string + SubscribedEmails []string + SubscribedSMSes []string + Subtag string + SubtagMessage string + Tag string + Title string + TrackedCount int + TrackingNumber string + TransitTime int + UniqueToken string + UpdatedAt *time.Time + type TrackingCompletedStatus string + const TrackingCompletedStatusDelivered + const TrackingCompletedStatusLost + const TrackingCompletedStatusReturnedToSender + type TrackingID string + func (id TrackingID) URIPath() (string, error) + type TrackingIdentifier interface + URIPath func() (string, error) + type UpdateTrackingParams struct + CustomFields map[string]string + CustomerName string + DeliveryType string + DestinationRawLocation string + Emails []string + Language string + Note string + OrderDate string + OrderID string + OrderIDPath string + OrderNumber string + OrderPromisedDeliveryDate string + OriginCity string + OriginPostalCode string + OriginRawLocation string + OriginState string + PickupLocation string + PickupNote string + SMSes []string + ShipmentType string + Slug string + Title string + type Weight struct + Unit string + Value int64 Other modules containing this package github.com/aftership/aftership-sdk-go github.com/aftership/aftership-sdk-go/v2