parsable

package
v0.0.0-...-1252c86 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parsable

type Parsable struct {
	// contains filtered or unexported fields
}

func New

func New(errorHandler func(string, error), name string, value string) *Parsable

func (*Parsable) AsDuration

func (p *Parsable) AsDuration() *ParsableDuration

func (*Parsable) AsNumber

func (p *Parsable) AsNumber() *ParsableNumber

func (*Parsable) AsString

func (p *Parsable) AsString() *ParsableString

func (*Parsable) AsTime

func (p *Parsable) AsTime(layout string) *ParsableTime

func (*Parsable) AsUUID

func (p *Parsable) AsUUID() *ParsableUUID

func (*Parsable) Default

func (p *Parsable) Default(fallback string) *Parsable

func (*Parsable) Required

func (p *Parsable) Required() *Parsable

type ParsableDuration

type ParsableDuration struct {
	// contains filtered or unexported fields
}

func (*ParsableDuration) Error

func (p *ParsableDuration) Error() error

func (*ParsableDuration) Get

func (p *ParsableDuration) Get() time.Duration

func (*ParsableDuration) Max

func (*ParsableDuration) Min

type ParsableNumber

type ParsableNumber struct {
	// contains filtered or unexported fields
}

func (*ParsableNumber) Error

func (p *ParsableNumber) Error() error

func (*ParsableNumber) Get

func (p *ParsableNumber) Get() int64

func (*ParsableNumber) Max

func (p *ParsableNumber) Max(max int64) *ParsableNumber

func (*ParsableNumber) Min

func (p *ParsableNumber) Min(min int64) *ParsableNumber

type ParsableString

type ParsableString struct {
	// contains filtered or unexported fields
}

func (*ParsableString) Error

func (p *ParsableString) Error() error

func (*ParsableString) Get

func (p *ParsableString) Get() string

func (*ParsableString) Match

func (p *ParsableString) Match(re *regexp.Regexp) *ParsableString

func (*ParsableString) MaxLen

func (p *ParsableString) MaxLen(max int) *ParsableString

func (*ParsableString) MinLen

func (p *ParsableString) MinLen(min int) *ParsableString

type ParsableTime

type ParsableTime struct {
	// contains filtered or unexported fields
}

func (*ParsableTime) Error

func (p *ParsableTime) Error() error

func (*ParsableTime) Get

func (p *ParsableTime) Get() time.Time

func (*ParsableTime) NowIfMissing

func (p *ParsableTime) NowIfMissing() *ParsableTime

type ParsableUUID

type ParsableUUID struct {
	// contains filtered or unexported fields
}

func (*ParsableUUID) Error

func (p *ParsableUUID) Error() error

func (*ParsableUUID) GenerateIfMissing

func (p *ParsableUUID) GenerateIfMissing() *ParsableUUID

func (*ParsableUUID) Get

func (p *ParsableUUID) Get() uuid.UUID

Jump to

Keyboard shortcuts

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