nullable

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeNullableBool = schema.TypeString
)
View Source
const (
	TypeNullableFloat = schema.TypeString
)
View Source
const (
	TypeNullableInt = schema.TypeString
)

Variables

This section is empty.

Functions

func DiffSuppressNullableBool

func DiffSuppressNullableBool(k, o, n string, d *schema.ResourceData) bool

func DiffSuppressNullableBoolFalseAsNull

func DiffSuppressNullableBoolFalseAsNull(k, o, n string, d *schema.ResourceData) bool

DiffSuppressNullableBoolFalseAsNull allows false to be treated equivalently to null. This can be used to allow a practitioner to set false when the API requires a null value, as a convenience. This is typically not what you want: it is indended for cases where a parameter is optional in some cases and must be set in others.

func ValidateTypeStringNullableBool

func ValidateTypeStringNullableBool(v interface{}, k string) (ws []string, es []error)

ValidateTypeStringNullableBool provides custom error messaging for TypeString booleans Some arguments require a boolean value or unspecified, empty field.

func ValidateTypeStringNullableFloat

func ValidateTypeStringNullableFloat(v interface{}, k string) (ws []string, es []error)

ValidateTypeStringNullableFloat provides custom error messaging for TypeString floats Some arguments require an float value or unspecified, empty field.

func ValidateTypeStringNullableInt

func ValidateTypeStringNullableInt(v interface{}, k string) (ws []string, es []error)

ValidateTypeStringNullableInt provides custom error messaging for TypeString ints Some arguments require an int value or unspecified, empty field.

func ValidateTypeStringNullableIntAtLeast

func ValidateTypeStringNullableIntAtLeast(min int) schema.SchemaValidateFunc

ValidateTypeStringNullableIntAtLeast provides custom error messaging for TypeString ints Some arguments require an int value or unspecified, empty field.

func ValidateTypeStringNullableIntBetween

func ValidateTypeStringNullableIntBetween(min int, max int) schema.SchemaValidateFunc

ValidateTypeStringNullableIntBetween provides custom error messaging for TypeString ints Some arguments require an int value or unspecified, empty field.

Types

type Bool

type Bool string

func NewBool

func NewBool(v bool) Bool

func (Bool) IsNull

func (b Bool) IsNull() bool

func (Bool) Value

func (b Bool) Value() (bool, bool, error)

type Float

type Float string

func (Float) IsNull

func (i Float) IsNull() bool

func (Float) Value

func (i Float) Value() (float64, bool, error)

type Int

type Int string

func (Int) IsNull

func (i Int) IsNull() bool

func (Int) Value

func (i Int) Value() (int64, bool, error)

Jump to

Keyboard shortcuts

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