optional

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: MIT Imports: 1 Imported by: 1,592

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

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

func EmptyBool

func EmptyBool() Bool

EmptyBool returns a new Bool that does not have a value set.

func NewBool

func NewBool(value bool) Bool

func (Bool) Default

func (b Bool) Default(defaultValue bool) bool

func (Bool) IsSet

func (b Bool) IsSet() bool

func (Bool) Value

func (b Bool) Value() bool

type Byte

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

func EmptyByte

func EmptyByte() Byte

EmptyByte returns a new Byte that does not have a value set.

func NewByte

func NewByte(value byte) Byte

func (Byte) Default

func (b Byte) Default(defaultValue byte) byte

func (Byte) IsSet

func (b Byte) IsSet() bool

func (Byte) Value

func (b Byte) Value() byte

type Complex128

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

func EmptyComplex128

func EmptyComplex128() Complex128

EmptyComplex128 returns a new Complex128 that does not have a value set.

func NewComplex128

func NewComplex128(value complex128) Complex128

func (Complex128) Default

func (i Complex128) Default(defaultValue complex128) complex128

func (Complex128) IsSet

func (i Complex128) IsSet() bool

func (Complex128) Value

func (i Complex128) Value() complex128

type Complex64

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

func EmptyComplex64

func EmptyComplex64() Complex64

EmptyComplex64 returns a new Complex64 that does not have a value set.

func NewComplex64

func NewComplex64(value complex64) Complex64

func (Complex64) Default

func (i Complex64) Default(defaultValue complex64) complex64

func (Complex64) IsSet

func (i Complex64) IsSet() bool

func (Complex64) Value

func (i Complex64) Value() complex64

type Float32

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

func EmptyFloat32

func EmptyFloat32() Float32

EmptyFloat32 returns a new Float32 that does not have a value set.

func NewFloat32

func NewFloat32(value float32) Float32

func (Float32) Default

func (i Float32) Default(defaultValue float32) float32

func (Float32) IsSet

func (i Float32) IsSet() bool

func (Float32) Value

func (i Float32) Value() float32

type Float64

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

func EmptyFloat64

func EmptyFloat64() Float64

EmptyFloat64 returns a new Float64 that does not have a value set.

func NewFloat64

func NewFloat64(value float64) Float64

func (Float64) Default

func (i Float64) Default(defaultValue float64) float64

func (Float64) IsSet

func (i Float64) IsSet() bool

func (Float64) Value

func (i Float64) Value() float64

type Int

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

func EmptyInt

func EmptyInt() Int

EmptyInt returns a new Int that does not have a value set.

func NewInt

func NewInt(value int) Int

func (Int) Default

func (i Int) Default(defaultValue int) int

func (Int) IsSet

func (i Int) IsSet() bool

func (Int) Value

func (i Int) Value() int

type Int16

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

func EmptyInt16

func EmptyInt16() Int16

EmptyInt16 returns a new Int16 that does not have a value set.

func NewInt16

func NewInt16(value int16) Int16

func (Int16) Default

func (i Int16) Default(defaultValue int16) int16

func (Int16) IsSet

func (i Int16) IsSet() bool

func (Int16) Value

func (i Int16) Value() int16

type Int32

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

func EmptyInt32

func EmptyInt32() Int32

EmptyInt32 returns a new Int32 that does not have a value set.

func NewInt32

func NewInt32(value int32) Int32

func (Int32) Default

func (i Int32) Default(defaultValue int32) int32

func (Int32) IsSet

func (i Int32) IsSet() bool

func (Int32) Value

func (i Int32) Value() int32

type Int64

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

func EmptyInt64

func EmptyInt64() Int64

EmptyInt64 returns a new Int64 that does not have a value set.

func NewInt64

func NewInt64(value int64) Int64

func (Int64) Default

func (i Int64) Default(defaultValue int64) int64

func (Int64) IsSet

func (i Int64) IsSet() bool

func (Int64) Value

func (i Int64) Value() int64

type Int8

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

func EmptyInt8

func EmptyInt8() Int8

EmptyInt8 returns a new Int8 that does not have a value set.

func NewInt8

func NewInt8(value int8) Int8

func (Int8) Default

func (i Int8) Default(defaultValue int8) int8

func (Int8) IsSet

func (i Int8) IsSet() bool

func (Int8) Value

func (i Int8) Value() int8

type Interface

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

Optional represents a generic optional type, stored as an interface{}.

func EmptyInterface

func EmptyInterface() Interface

EmptyInterface returns a new Interface that does not have a value set.

func NewInterface

func NewInterface(value interface{}) Interface

func (Interface) Default

func (b Interface) Default(defaultValue interface{}) interface{}

func (Interface) IsSet

func (b Interface) IsSet() bool

func (Interface) Value

func (b Interface) Value() interface{}

type Rune

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

func EmptyRune

func EmptyRune() Rune

EmptyRune returns a new Rune that does not have a value set.

func NewRune

func NewRune(value rune) Rune

func (Rune) Default

func (b Rune) Default(defaultValue rune) rune

func (Rune) IsSet

func (b Rune) IsSet() bool

func (Rune) Value

func (b Rune) Value() rune

type String

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

func EmptyString

func EmptyString() String

EmptyString returns a new String that does not have a value set.

func NewString

func NewString(value string) String

func (String) Default

func (b String) Default(defaultValue string) string

func (String) IsSet

func (b String) IsSet() bool

func (String) Value

func (b String) Value() string

type Time

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

func EmptyTime

func EmptyTime() Time

EmptyTime returns a new Time that does not have a value set.

func NewTime

func NewTime(value time.Time) Time

func (Time) Default

func (b Time) Default(defaultValue time.Time) time.Time

func (Time) IsSet

func (b Time) IsSet() bool

func (Time) Value

func (b Time) Value() time.Time

type Uint

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

func EmptyUint

func EmptyUint() Uint

EmptyUint returns a new Uint that does not have a value set.

func NewUint

func NewUint(value uint) Uint

func (Uint) Default

func (i Uint) Default(defaultValue uint) uint

func (Uint) IsSet

func (i Uint) IsSet() bool

func (Uint) Value

func (i Uint) Value() uint

type Uint16

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

func EmptyUint16

func EmptyUint16() Uint16

EmptyUint16 returns a new Uint16 that does not have a value set.

func NewUint16

func NewUint16(value uint16) Uint16

func (Uint16) Default

func (i Uint16) Default(defaultValue uint16) uint16

func (Uint16) IsSet

func (i Uint16) IsSet() bool

func (Uint16) Value

func (i Uint16) Value() uint16

type Uint32

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

func EmptyUint32

func EmptyUint32() Uint32

EmptyUint32 returns a new Uint32 that does not have a value set.

func NewUint32

func NewUint32(value uint32) Uint32

func (Uint32) Default

func (i Uint32) Default(defaultValue uint32) uint32

func (Uint32) IsSet

func (i Uint32) IsSet() bool

func (Uint32) Value

func (i Uint32) Value() uint32

type Uint64

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

func EmptyUint64

func EmptyUint64() Uint64

EmptyUint64 returns a new Uint64 that does not have a value set.

func NewUint64

func NewUint64(value uint64) Uint64

func (Uint64) Default

func (i Uint64) Default(defaultValue uint64) uint64

func (Uint64) IsSet

func (i Uint64) IsSet() bool

func (Uint64) Value

func (i Uint64) Value() uint64

type Uint8

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

func EmptyUint8

func EmptyUint8() Uint8

EmptyUint8 returns a new Uint8 that does not have a value set.

func NewUint8

func NewUint8(value uint8) Uint8

func (Uint8) Default

func (i Uint8) Default(defaultValue uint8) uint8

func (Uint8) IsSet

func (i Uint8) IsSet() bool

func (Uint8) Value

func (i Uint8) Value() uint8

type Uintptr

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

func EmptyUintptr

func EmptyUintptr() Uintptr

EmptyUintptr returns a new Uintptr that does not have a value set.

func NewUintptr

func NewUintptr(value uintptr) Uintptr

func (Uintptr) Default

func (i Uintptr) Default(defaultValue uintptr) uintptr

func (Uintptr) IsSet

func (i Uintptr) IsSet() bool

func (Uintptr) Value

func (i Uintptr) Value() uintptr

Jump to

Keyboard shortcuts

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