types

package
v6.31.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilteredString

type FilteredString struct {
	IsSet bool
	Value string
}

FilteredString is a wrapper around string values that can be null/default or an actual value. Use IsSet to check if the value is provided, instead of checking against the empty string.

func (*FilteredString) ParseValue

func (n *FilteredString) ParseValue(val string)

ParseValue is used to parse a user provided flag argument.

type NullByteSizeInMb

type NullByteSizeInMb struct {
	IsSet bool

	// Value is a size in MB
	Value uint64
}

NullByteSizeInMb represents size in a byte format in megabytes.

func (*NullByteSizeInMb) ParseStringValue

func (b *NullByteSizeInMb) ParseStringValue(value string) error

func (*NullByteSizeInMb) ParseUint64Value

func (n *NullByteSizeInMb) ParseUint64Value(val *uint64)

ParseUint64Value is used to parse a user provided *uint64 argument.

func (NullByteSizeInMb) String

func (b NullByteSizeInMb) String() string

func (*NullByteSizeInMb) UnmarshalJSON

func (n *NullByteSizeInMb) UnmarshalJSON(rawJSON []byte) error

type NullInt

type NullInt struct {
	IsSet bool
	Value int
}

NullInt is a wrapper around integer values that can be null or an integer. Use IsSet to check if the value is provided, instead of checking against 0.

func (NullInt) MarshalJSON

func (n NullInt) MarshalJSON() ([]byte, error)

func (*NullInt) ParseIntValue

func (n *NullInt) ParseIntValue(val *int)

ParseIntValue is used to parse a user provided *int argument.

func (*NullInt) ParseStringValue

func (n *NullInt) ParseStringValue(val string) error

ParseStringValue is used to parse a user provided flag argument.

func (*NullInt) UnmarshalJSON

func (n *NullInt) UnmarshalJSON(rawJSON []byte) error

type NullUint64

type NullUint64 struct {
	IsSet bool
	Value uint64
}

NullUint64 is a wrapper around uint64 values that can be null or an unint64. Use IsSet to check if the value is provided, instead of checking against 0.

func (*NullUint64) ParseStringValue

func (n *NullUint64) ParseStringValue(val string) error

ParseStringValue is used to parse a user provided flag argument.

func (*NullUint64) UnmarshalJSON

func (n *NullUint64) UnmarshalJSON(rawJSON []byte) error

Jump to

Keyboard shortcuts

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