nullable

package
v0.0.0-...-c407d37 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool struct {
	Present bool // Present is true if key is present in json
	Value   *bool
}

Bool represents a boolean that may be null or not present in json at all.

func NewBool

func NewBool(b bool) Bool

NewBool creates a new nullable Bool

func NewNullBool

func NewNullBool() Bool

NewNullBool creates a null Bool

func (*Bool) ContextValidate

func (s *Bool) ContextValidate(context context.Context, formats strfmt.Registry) error

ContextValidate always validates ok this is called from the go swagger generated code

func (*Bool) UnmarshalJSON

func (s *Bool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (*Bool) Validate

func (s *Bool) Validate(formats strfmt.Registry) error

Validate always validates ok this is called from the go swagger generated code

type Float

type Float struct {
	Present bool // Present is true if key is present in json
	Value   *float64
}

Float represents a float that may be null or not present in json at all.

func NewFloat

func NewFloat(f float64) Float

NewFloat creates a new nullable Float

func NewNullFloat

func NewNullFloat() Float

NewNullFloat creates a null Float

func (*Float) ContextValidate

func (s *Float) ContextValidate(context context.Context, formats strfmt.Registry) error

ContextValidate always validates ok this is called from the go swagger generated code

func (*Float) UnmarshalJSON

func (f *Float) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (*Float) Validate

func (s *Float) Validate(formats strfmt.Registry) error

Validate always validates ok this is called from the go swagger generated code

type Int

type Int struct {
	Present bool // Present is true if key is present in json
	Value   *int64
}

Int represents an int that may be null or not present in json at all.

func NewInt

func NewInt(i int64) Int

NewInt creates a new nullable Int

func NewNullInt

func NewNullInt() Int

NewNullInt creates a null Int

func (*Int) ContextValidate

func (s *Int) ContextValidate(context context.Context, formats strfmt.Registry) error

ContextValidate always validates ok this is called from the go swagger generated code

func (*Int) UnmarshalJSON

func (i *Int) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (*Int) Validate

func (s *Int) Validate(formats strfmt.Registry) error

Validate always validates ok this is called from the go swagger generated code

type String

type String struct {
	Present bool // Present is true if key is present in json
	Value   *string
}

String represents a string that may be null or not present in json at all.

func NewNullString

func NewNullString() String

NewNullString creates a null string

func NewString

func NewString(str string) String

NewString creates a new nullable String

func (*String) ContextValidate

func (s *String) ContextValidate(context context.Context, formats strfmt.Registry) error

ContextValidate always validates ok this is called from the go swagger generated code

func (*String) UnmarshalJSON

func (s *String) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Marshaler interface.

func (*String) Validate

func (s *String) Validate(formats strfmt.Registry) error

String always validates ok this is called from the go swagger generated code

Jump to

Keyboard shortcuts

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