value

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UndefinedBool = Bool(0)
	False         = Bool(1)
	True          = Bool(2)
)

Variables

View Source
var (
	ErrIllegalFqdn = errors.New("illegal fqdn")
)

Functions

This section is empty.

Types

type Bool

type Bool uint8

func NewBool

func NewBool(val bool) Bool

func (Bool) Get

func (instance Bool) Get() interface{}

func (Bool) GetOr

func (instance Bool) GetOr(def bool) bool

func (Bool) IsPresent

func (instance Bool) IsPresent() bool

func (*Bool) Set

func (instance *Bool) Set(plain string) error

func (Bool) String

func (instance Bool) String() string

type Duration

type Duration time.Duration

func ParseDuration

func ParseDuration(plain string) (result Duration, err error)

func (Duration) AsSeconds

func (instance Duration) AsSeconds() int

func (Duration) Get

func (instance Duration) Get() interface{}

func (Duration) IsPresent

func (instance Duration) IsPresent() bool

func (*Duration) Set

func (instance *Duration) Set(plain string) error

func (Duration) String

func (instance Duration) String() string

type Forcible

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

func NewForcible

func NewForcible(value MutableValue, forced bool) Forcible

func (Forcible) Evaluate

func (instance Forcible) Evaluate(other Value, def Value) interface{}

func (Forcible) Get

func (instance Forcible) Get() interface{}

func (Forcible) IsForced

func (instance Forcible) IsForced() bool

func (Forcible) IsPresent

func (instance Forcible) IsPresent() bool

func (Forcible) Select

func (instance Forcible) Select(target Forcible) Forcible

func (*Forcible) Set

func (instance *Forcible) Set(plain string) error

func (Forcible) String

func (instance Forcible) String() string

type ForcibleBool

type ForcibleBool struct {
	Forcible
}

func NewForcibleBool

func NewForcibleBool(init Bool, forced bool) ForcibleBool

func (ForcibleBool) Evaluate

func (instance ForcibleBool) Evaluate(other Bool, def bool) bool

func (ForcibleBool) GetOr

func (instance ForcibleBool) GetOr(def bool) bool

func (ForcibleBool) Select

func (instance ForcibleBool) Select(target ForcibleBool) ForcibleBool

type ForcibleDuration

type ForcibleDuration struct {
	Forcible
}

func NewForcibleDuration

func NewForcibleDuration(init Duration, forced bool) ForcibleDuration

func (ForcibleDuration) Evaluate

func (instance ForcibleDuration) Evaluate(other Duration, def Duration) Duration

type ForcibleString

type ForcibleString struct {
	Forcible
}

func NewForcibleString

func NewForcibleString(init String, forced bool) ForcibleString

func (ForcibleString) Evaluate

func (instance ForcibleString) Evaluate(other String, def String) String

type Fqdn

type Fqdn string

func (Fqdn) Get

func (instance Fqdn) Get() interface{}

func (Fqdn) IsPresent

func (instance Fqdn) IsPresent() bool

func (Fqdn) MarshalText

func (instance Fqdn) MarshalText() (text []byte, err error)

func (Fqdn) Parent

func (instance Fqdn) Parent() Fqdn

func (*Fqdn) Set

func (instance *Fqdn) Set(plain string) error

func (Fqdn) String

func (instance Fqdn) String() string

func (*Fqdn) UnmarshalText

func (instance *Fqdn) UnmarshalText(b []byte) error

type MutableValue

type MutableValue interface {
	Value
	Set(string) error
}

type String

type String string

func (String) Get

func (instance String) Get() interface{}

func (String) IsPresent

func (instance String) IsPresent() bool

func (*String) Set

func (instance *String) Set(plain string) error

func (String) String

func (instance String) String() string

type Value

type Value interface {
	String() string
	IsPresent() bool
	Get() interface{}
}

type WildcardSupportingFqdn

type WildcardSupportingFqdn Fqdn

func (WildcardSupportingFqdn) Get

func (instance WildcardSupportingFqdn) Get() interface{}

func (WildcardSupportingFqdn) IsPresent

func (instance WildcardSupportingFqdn) IsPresent() bool

func (WildcardSupportingFqdn) MarshalText

func (instance WildcardSupportingFqdn) MarshalText() (text []byte, err error)

func (*WildcardSupportingFqdn) Set

func (instance *WildcardSupportingFqdn) Set(plain string) error

func (WildcardSupportingFqdn) String

func (instance WildcardSupportingFqdn) String() string

func (*WildcardSupportingFqdn) UnmarshalText

func (instance *WildcardSupportingFqdn) UnmarshalText(b []byte) error

func (WildcardSupportingFqdn) WithoutWildcard

func (instance WildcardSupportingFqdn) WithoutWildcard() (hadWildcard bool, withoutWildcard Fqdn, err error)

Jump to

Keyboard shortcuts

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