couriers

package
v0.0.0-...-a36ea0c Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCourier

func RegisterCourier(name string, courier Courier)

RegisterCourier register new courier

Types

type Cj

type Cj struct{}

func (Cj) Code

func (t Cj) Code() string

func (Cj) Name

func (t Cj) Name() string

func (Cj) Parse

func (t Cj) Parse(trackingNumber string) (delibird.Track, *delibird.ApiError)

func (Cj) TrackingUrl

func (t Cj) TrackingUrl() string

type Courier

type Courier interface {
	// Parse html to tracking object
	Parse(invoice string) (delibird.Track, *delibird.ApiError)
	// Courier code
	Code() string
	// Courier name
	Name() string
}

Courier is the interface representing the standardized methods to parse shipment tracking html

func New

func New(name string) (Courier, *delibird.ApiError)

NewCourier creates courier object by courier company code

type Kg

type Kg struct{}

func (Kg) Code

func (t Kg) Code() string

func (Kg) Name

func (t Kg) Name() string

func (Kg) Parse

func (t Kg) Parse(trackingNumber string) (delibird.Track, *delibird.ApiError)

func (Kg) TrackingUrl

func (t Kg) TrackingUrl() string

type Kpost

type Kpost struct{}

func (Kpost) Code

func (t Kpost) Code() string

func (Kpost) Name

func (t Kpost) Name() string

func (Kpost) Parse

func (t Kpost) Parse(trackingNumber string) (delibird.Track, *delibird.ApiError)

func (Kpost) TrackingUrl

func (t Kpost) TrackingUrl() string

type Logen

type Logen struct{}

func (Logen) Code

func (t Logen) Code() string

func (Logen) Name

func (t Logen) Name() string

func (Logen) Parse

func (t Logen) Parse(trackingNumber string) (delibird.Track, *delibird.ApiError)

func (Logen) TrackingUrl

func (t Logen) TrackingUrl() string

Jump to

Keyboard shortcuts

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