Versions in this module Expand all Collapse all v0 v0.1.0 Jul 21, 2023 Changes in this version + var Services []Service + type Additional struct + Lookups []Lookup + Name string + RegexGroupName string + type CheckDigit interface + Generate func(seed string) (string, error) + Validate func(serial, code string) bool + func NewMod10(em, om int) CheckDigit + func NewMod3736() CheckDigit + func NewMod7() CheckDigit + func NewNoop() CheckDigit + func NewS10(weightings []int, exists []string) CheckDigit + func NewSumProductWithWeightingsAndModulo(weightings []int, m1, m2 int) CheckDigit + type CheckDigitOpts struct + EvensMultiplier int + Modulo1 int + Modulo2 int + Name string + OddsMultiplier int + Weightings []int + type Courier struct + CourierCode string + Name string + Services []Service + type Lookup struct + Country string + CountryCode string + CountryShortCode string + Courier string + CourierURL string + Description string + Matches string + MatchesRegex RegexParser + Name string + UPUReferenceURL string + type Mod10 struct + Multipliers [2]int + func (m10 *Mod10) Generate(s string) (string, error) + func (m10 *Mod10) Validate(s, cd string) bool + type Mod3736 struct + func (m3 *Mod3736) Generate(s string) (string, error) + func (m3 *Mod3736) Validate(s, cd string) bool + type Mod7 struct + func (m Mod7) Generate(s string) (string, error) + func (m Mod7) Validate(s, cd string) bool + type Noop struct + func (n Noop) Generate(s string) (string, error) + func (n Noop) Validate(s, cd string) bool + type PrependIf struct + Content string + Regex RegexParser + type RegexParser struct + Regex *regexp.Regexp + func (r *RegexParser) UnmarshalJSON(buf []byte) error + type S10 struct + Weightings []int + func (s10 *S10) Generate(s string) (string, error) + func (s10 *S10) Validate(s, cd string) bool + type Service struct + Additional []Additional + CourierCode string + CourierName string + Description string + ID string + Name string + Partners []struct{ ... } + Regex RegexParser + TestNumbers struct{ ... } + TrackingURL string + func (s Service) ValidateAdditionalExists(matchKey string, keys map[string]string) bool + type SumProductWithWeightingsAndModulo struct + Modulo1 int + Modulo2 int + Weightings []int + func (sp *SumProductWithWeightingsAndModulo) Generate(s string) (string, error) + func (sp *SumProductWithWeightingsAndModulo) Validate(s, cd string) bool + type Validation struct + Additional struct{ ... } + SerialNumberFormat struct{ ... } + Validator CheckDigit + func (val *Validation) SetValidator()