fetcher

package
v0.0.0-...-1be15b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const EmptyStatusValue = "Not arrived at ELS yet. ⚠️"
View Source
const EmptyWeightValue = "Unknown"

Variables

This section is empty.

Functions

func NewTrackingNumberFetcher

func NewTrackingNumberFetcher(conf *config.Config) tracking.TrackingNumberFetcher

NewTrackingNumberFetcher creates a new instance of tracking status fetcher

Types

type Ship24ResponseData

type Ship24ResponseData struct {
	Data struct {
		ID              string `json:"_id"`
		TrackingNumber  string `json:"tracking_number"`
		TrackingNumbers []struct {
			IsMain         bool     `json:"is_main"`
			TrackingNumber string   `json:"tracking_number"`
			CrawlerCodes   []string `json:"crawler_codes"`
		} `json:"tracking_numbers"`
		ParcelIdentifier       string  `json:"parcel_identifier"`
		DestinationCountryCode string  `json:"destination_country_code"`
		Weight                 float64 `json:"weight"`
		RecipientCity          string  `json:"recipient_city"`
		Events                 []struct {
			Datetime       time.Time `json:"datetime"`
			DispatchCodeID int       `json:"dispatch_code_id,omitempty"`
			Status         string    `json:"status"`
			Location       string    `json:"location,omitempty"`
			Courier        struct {
				Slug        string      `json:"slug"`
				CrawlerCode string      `json:"crawler_code"`
				CountryCode interface{} `json:"country_code"`
				LogoImage   struct {
					Path string `json:"path"`
				} `json:"logo_image"`
				Translation struct {
					LangCode string      `json:"lang_code"`
					Name     string      `json:"name"`
					FullName string      `json:"full_name"`
					Website  string      `json:"website"`
					Phone    interface{} `json:"phone"`
				} `json:"translation"`
			} `json:"courier"`
		} `json:"events"`
		DispatchCode struct {
			ID   int    `json:"id"`
			Code string `json:"code"`
			Step string `json:"step"`
			Desc string `json:"desc"`
		} `json:"dispatch_code"`
		Couriers []struct {
			Slug        string      `json:"slug"`
			CrawlerCode string      `json:"crawler_code"`
			CountryCode interface{} `json:"country_code"`
			LogoImage   struct {
				Path string `json:"path"`
			} `json:"logo_image"`
			Translation struct {
				LangCode string      `json:"lang_code"`
				Name     string      `json:"name"`
				FullName string      `json:"full_name"`
				Website  string      `json:"website"`
				Phone    interface{} `json:"phone"`
			} `json:"translation"`
		} `json:"couriers"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL