Documentation ¶
Index ¶
- func LetterToNumberMap() map[string]int
- func LocalNumberUS(ac uint16, ln uint16) uint64
- func StringToNumbers(s string) string
- type AreaCodeIncrementor
- type FakeNumberGenerator
- func (fng *FakeNumberGenerator) LocalNumberUS(ac uint16, ln uint16) uint64
- func (fng *FakeNumberGenerator) RandomAreaCode() uint16
- func (fng *FakeNumberGenerator) RandomLineNumber() uint16
- func (fng *FakeNumberGenerator) RandomLineNumberMinMax(min, max uint16) uint16
- func (fng *FakeNumberGenerator) RandomLocalNumberUS() uint64
- func (fng *FakeNumberGenerator) RandomLocalNumberUSAreaCodes(acs []uint16) uint64
- func (fng *FakeNumberGenerator) RandomLocalNumberUSUnique(set map[uint64]int8) (uint64, map[uint64]int8)
- func (fng *FakeNumberGenerator) RandomLocalNumberUSUniqueAreaCodeSet(set map[uint64]int8, acs []uint16) (uint64, map[uint64]int8)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LetterToNumberMap ¶
func LocalNumberUS ¶
LocalNumberUS returns a US E.164 number given an areacode and line number
func StringToNumbers ¶
Types ¶
type AreaCodeIncrementor ¶
func NewAreaCodeIncrementor ¶
func NewAreaCodeIncrementor(base uint16) AreaCodeIncrementor
func (*AreaCodeIncrementor) GetNext ¶
func (aci *AreaCodeIncrementor) GetNext(ac uint16) uint64
type FakeNumberGenerator ¶
type FakeNumberGenerator struct { AreaCodes []uint16 Rand randutil.CryptoRand }
func NewFakeNumberGenerator ¶
func NewFakeNumberGenerator(areacodes []uint16) FakeNumberGenerator
func (*FakeNumberGenerator) LocalNumberUS ¶
func (fng *FakeNumberGenerator) LocalNumberUS(ac uint16, ln uint16) uint64
LocalNumberUS returns a US E.164 number given an areacode and line number
func (*FakeNumberGenerator) RandomAreaCode ¶
func (fng *FakeNumberGenerator) RandomAreaCode() uint16
RandomAreaCode generates a random area code.
func (*FakeNumberGenerator) RandomLineNumber ¶
func (fng *FakeNumberGenerator) RandomLineNumber() uint16
RandomLineNumber generates a random line number
func (*FakeNumberGenerator) RandomLineNumberMinMax ¶
func (fng *FakeNumberGenerator) RandomLineNumberMinMax(min, max uint16) uint16
RandomLineNumber generates a random line number
func (*FakeNumberGenerator) RandomLocalNumberUS ¶
func (fng *FakeNumberGenerator) RandomLocalNumberUS() uint64
RandomLocalNumberUS returns a US E.164 number AreaCode + Prefix + Line Number
func (*FakeNumberGenerator) RandomLocalNumberUSAreaCodes ¶
func (fng *FakeNumberGenerator) RandomLocalNumberUSAreaCodes(acs []uint16) uint64
RandomLocalNumberUS returns a US E.164 number AreaCode + Prefix + Line Number
func (*FakeNumberGenerator) RandomLocalNumberUSUnique ¶
func (fng *FakeNumberGenerator) RandomLocalNumberUSUnique(set map[uint64]int8) (uint64, map[uint64]int8)
RandomLocalNumberUSUnique returns a US E.164 number AreaCode + Prefix + Line Number
func (*FakeNumberGenerator) RandomLocalNumberUSUniqueAreaCodeSet ¶
func (fng *FakeNumberGenerator) RandomLocalNumberUSUniqueAreaCodeSet(set map[uint64]int8, acs []uint16) (uint64, map[uint64]int8)
RandomLocalNumberUSUnique returns a US E.164 number AreaCode + Prefix + Line Number
Source Files ¶
Click to show internal directories.
Click to hide internal directories.