Versions in this module Expand all Collapse all v0 v0.2.0 Dec 25, 2015 Changes in this version type DateTime + func NewDateTime() DateTime v0.1.0 Dec 14, 2015 Changes in this version + const DatePattern + const DateTimePattern + const HostnamePattern + const RFC3339FullDate + const RFC3339Millis + var Default = NewSeededFormats(nil, nil) + func DefaultNameNormalizer(name string) string + func IsDate(str string) bool + func IsDateTime(str string) bool + func IsDuration(str string) bool + func IsHostname(str string) bool + func IsStrictURI(str string) bool + func ParseDuration(cand string) (time.Duration, error) + type Base64 []byte + func (b *Base64) Scan(raw interface{}) error + func (b *Base64) UnmarshalText(data []byte) error + func (b Base64) MarshalText() ([]byte, error) + func (b Base64) Value() (driver.Value, error) + type CreditCard string + func (cc *CreditCard) Scan(raw interface{}) error + func (cc CreditCard) Value() (driver.Value, error) + func (u *CreditCard) UnmarshalText(data []byte) error + func (u CreditCard) MarshalText() ([]byte, error) + type Date struct + func (d *Date) Scan(raw interface{}) error + func (d *Date) UnmarshalText(text []byte) error + func (d Date) MarshalText() ([]byte, error) + func (d Date) String() string + func (d Date) Value() (driver.Value, error) + type DateTime struct + func ParseDateTime(data string) (DateTime, error) + func (d *DateTime) Scan(raw interface{}) error + func (d DateTime) Value() (driver.Value, error) + func (t *DateTime) UnmarshalText(text []byte) error + func (t DateTime) MarshalText() ([]byte, error) + func (t DateTime) String() string + type Duration time.Duration + func (d *Duration) Scan(raw interface{}) error + func (d *Duration) UnmarshalText(data []byte) error + func (d Duration) MarshalText() ([]byte, error) + func (d Duration) Value() (driver.Value, error) + type Email string + func (b *Email) Scan(raw interface{}) error + func (b Email) Value() (driver.Value, error) + func (e *Email) UnmarshalText(data []byte) error + func (e Email) MarshalText() ([]byte, error) + type Format interface + type HexColor string + func (h *HexColor) Scan(raw interface{}) error + func (h *HexColor) UnmarshalText(data []byte) error + func (h HexColor) MarshalText() ([]byte, error) + func (h HexColor) Value() (driver.Value, error) + type Hostname string + func (b *Hostname) Scan(raw interface{}) error + func (b Hostname) Value() (driver.Value, error) + func (h *Hostname) UnmarshalText(data []byte) error + func (h Hostname) MarshalText() ([]byte, error) + type IPv4 string + func (b *IPv4) Scan(raw interface{}) error + func (b IPv4) Value() (driver.Value, error) + func (u *IPv4) UnmarshalText(data []byte) error + func (u IPv4) MarshalText() ([]byte, error) + type IPv6 string + func (b *IPv6) Scan(raw interface{}) error + func (b IPv6) Value() (driver.Value, error) + func (u *IPv6) UnmarshalText(data []byte) error + func (u IPv6) MarshalText() ([]byte, error) + type ISBN string + func (i *ISBN) Scan(raw interface{}) error + func (i ISBN) Value() (driver.Value, error) + func (u *ISBN) UnmarshalText(data []byte) error + func (u ISBN) MarshalText() ([]byte, error) + type ISBN10 string + func (i *ISBN10) Scan(raw interface{}) error + func (i ISBN10) Value() (driver.Value, error) + func (u *ISBN10) UnmarshalText(data []byte) error + func (u ISBN10) MarshalText() ([]byte, error) + type ISBN13 string + func (i *ISBN13) Scan(raw interface{}) error + func (i ISBN13) Value() (driver.Value, error) + func (u *ISBN13) UnmarshalText(data []byte) error + func (u ISBN13) MarshalText() ([]byte, error) + type NameNormalizer func(string) string + type Password string + func (p *Password) Scan(raw interface{}) error + func (p Password) Value() (driver.Value, error) + func (r *Password) UnmarshalText(data []byte) error + func (r Password) MarshalText() ([]byte, error) + type RGBColor string + func (r *RGBColor) Scan(raw interface{}) error + func (r *RGBColor) UnmarshalText(data []byte) error + func (r RGBColor) MarshalText() ([]byte, error) + func (r RGBColor) Value() (driver.Value, error) + type Registry interface + Add func(string, Format, Validator) bool + ContainsName func(string) bool + DelByName func(string) bool + GetType func(string) (reflect.Type, bool) + Parse func(string, string) (interface{}, error) + Validates func(string, string) bool + func NewFormats() Registry + func NewSeededFormats(seeds []knownFormat, normalizer NameNormalizer) Registry + type SSN string + func (ssn *SSN) Scan(raw interface{}) error + func (ssn SSN) Value() (driver.Value, error) + func (u *SSN) UnmarshalText(data []byte) error + func (u SSN) MarshalText() ([]byte, error) + type URI string + func (b *URI) Scan(raw interface{}) error + func (b URI) Value() (driver.Value, error) + func (u *URI) UnmarshalText(data []byte) error + func (u URI) MarshalText() ([]byte, error) + type UUID string + func (b UUID) Value() (driver.Value, error) + func (u *UUID) Scan(raw interface{}) error + func (u *UUID) UnmarshalText(data []byte) error + func (u UUID) MarshalText() ([]byte, error) + type UUID3 string + func (b UUID3) Value() (driver.Value, error) + func (u *UUID3) Scan(raw interface{}) error + func (u *UUID3) UnmarshalText(data []byte) error + func (u UUID3) MarshalText() ([]byte, error) + type UUID4 string + func (b UUID4) Value() (driver.Value, error) + func (u *UUID4) Scan(raw interface{}) error + func (u *UUID4) UnmarshalText(data []byte) error + func (u UUID4) MarshalText() ([]byte, error) + type UUID5 string + func (b UUID5) Value() (driver.Value, error) + func (u *UUID5) Scan(raw interface{}) error + func (u *UUID5) UnmarshalText(data []byte) error + func (u UUID5) MarshalText() ([]byte, error) + type Validator func(string) bool