package opt
import "github.com/mailru/easyjson/opt"
Index ¶
- type Bool
- func OBool(v bool) Bool
- func (v Bool) Get(deflt bool) bool
- func (v Bool) IsDefined() bool
- func (v Bool) MarshalEasyJSON(w *jwriter.Writer)
- func (v Bool) MarshalJSON() ([]byte, error)
- func (v Bool) String() string
- func (v *Bool) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Bool) UnmarshalJSON(data []byte) error
- type Float32
- func OFloat32(v float32) Float32
- func (v Float32) Get(deflt float32) float32
- func (v Float32) IsDefined() bool
- func (v Float32) MarshalEasyJSON(w *jwriter.Writer)
- func (v Float32) MarshalJSON() ([]byte, error)
- func (v Float32) String() string
- func (v *Float32) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Float32) UnmarshalJSON(data []byte) error
- type Float64
- func OFloat64(v float64) Float64
- func (v Float64) Get(deflt float64) float64
- func (v Float64) IsDefined() bool
- func (v Float64) MarshalEasyJSON(w *jwriter.Writer)
- func (v Float64) MarshalJSON() ([]byte, error)
- func (v Float64) String() string
- func (v *Float64) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Float64) UnmarshalJSON(data []byte) error
- type Int
- func OInt(v int) Int
- func (v Int) Get(deflt int) int
- func (v Int) IsDefined() bool
- func (v Int) MarshalEasyJSON(w *jwriter.Writer)
- func (v Int) MarshalJSON() ([]byte, error)
- func (v Int) String() string
- func (v *Int) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Int) UnmarshalJSON(data []byte) error
- type Int16
- func OInt16(v int16) Int16
- func (v Int16) Get(deflt int16) int16
- func (v Int16) IsDefined() bool
- func (v Int16) MarshalEasyJSON(w *jwriter.Writer)
- func (v Int16) MarshalJSON() ([]byte, error)
- func (v Int16) String() string
- func (v *Int16) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Int16) UnmarshalJSON(data []byte) error
- type Int32
- func OInt32(v int32) Int32
- func (v Int32) Get(deflt int32) int32
- func (v Int32) IsDefined() bool
- func (v Int32) MarshalEasyJSON(w *jwriter.Writer)
- func (v Int32) MarshalJSON() ([]byte, error)
- func (v Int32) String() string
- func (v *Int32) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Int32) UnmarshalJSON(data []byte) error
- type Int64
- func OInt64(v int64) Int64
- func (v Int64) Get(deflt int64) int64
- func (v Int64) IsDefined() bool
- func (v Int64) MarshalEasyJSON(w *jwriter.Writer)
- func (v Int64) MarshalJSON() ([]byte, error)
- func (v Int64) String() string
- func (v *Int64) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Int64) UnmarshalJSON(data []byte) error
- type Int8
- func OInt8(v int8) Int8
- func (v Int8) Get(deflt int8) int8
- func (v Int8) IsDefined() bool
- func (v Int8) MarshalEasyJSON(w *jwriter.Writer)
- func (v Int8) MarshalJSON() ([]byte, error)
- func (v Int8) String() string
- func (v *Int8) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Int8) UnmarshalJSON(data []byte) error
- type String
- func OString(v string) String
- func (v String) Get(deflt string) string
- func (v String) IsDefined() bool
- func (v String) MarshalEasyJSON(w *jwriter.Writer)
- func (v String) MarshalJSON() ([]byte, error)
- func (v String) String() string
- func (v *String) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *String) UnmarshalJSON(data []byte) error
- type Uint
- func OUint(v uint) Uint
- func (v Uint) Get(deflt uint) uint
- func (v Uint) IsDefined() bool
- func (v Uint) MarshalEasyJSON(w *jwriter.Writer)
- func (v Uint) MarshalJSON() ([]byte, error)
- func (v Uint) String() string
- func (v *Uint) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Uint) UnmarshalJSON(data []byte) error
- type Uint16
- func OUint16(v uint16) Uint16
- func (v Uint16) Get(deflt uint16) uint16
- func (v Uint16) IsDefined() bool
- func (v Uint16) MarshalEasyJSON(w *jwriter.Writer)
- func (v Uint16) MarshalJSON() ([]byte, error)
- func (v Uint16) String() string
- func (v *Uint16) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Uint16) UnmarshalJSON(data []byte) error
- type Uint32
- func OUint32(v uint32) Uint32
- func (v Uint32) Get(deflt uint32) uint32
- func (v Uint32) IsDefined() bool
- func (v Uint32) MarshalEasyJSON(w *jwriter.Writer)
- func (v Uint32) MarshalJSON() ([]byte, error)
- func (v Uint32) String() string
- func (v *Uint32) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Uint32) UnmarshalJSON(data []byte) error
- type Uint64
- func OUint64(v uint64) Uint64
- func (v Uint64) Get(deflt uint64) uint64
- func (v Uint64) IsDefined() bool
- func (v Uint64) MarshalEasyJSON(w *jwriter.Writer)
- func (v Uint64) MarshalJSON() ([]byte, error)
- func (v Uint64) String() string
- func (v *Uint64) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Uint64) UnmarshalJSON(data []byte) error
- type Uint8
- func OUint8(v uint8) Uint8
- func (v Uint8) Get(deflt uint8) uint8
- func (v Uint8) IsDefined() bool
- func (v Uint8) MarshalEasyJSON(w *jwriter.Writer)
- func (v Uint8) MarshalJSON() ([]byte, error)
- func (v Uint8) String() string
- func (v *Uint8) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Uint8) UnmarshalJSON(data []byte) error
Types ¶
type Bool ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OBool ¶
Creates an optional type with a given value.
func (Bool) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Bool) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Bool) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Bool) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Bool) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Bool) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Bool) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type Float32 ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OFloat32 ¶
Creates an optional type with a given value.
func (Float32) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Float32) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Float32) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Float32) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Float32) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Float32) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Float32) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type Float64 ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OFloat64 ¶
Creates an optional type with a given value.
func (Float64) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Float64) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Float64) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Float64) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Float64) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Float64) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Float64) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type Int ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OInt ¶
Creates an optional type with a given value.
func (Int) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Int) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Int) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Int) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Int) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Int) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Int) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type Int16 ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OInt16 ¶
Creates an optional type with a given value.
func (Int16) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Int16) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Int16) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Int16) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Int16) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Int16) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Int16) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type Int32 ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OInt32 ¶
Creates an optional type with a given value.
func (Int32) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Int32) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Int32) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Int32) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Int32) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Int32) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Int32) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type Int64 ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OInt64 ¶
Creates an optional type with a given value.
func (Int64) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Int64) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Int64) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Int64) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Int64) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Int64) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Int64) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type Int8 ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OInt8 ¶
Creates an optional type with a given value.
func (Int8) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Int8) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Int8) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Int8) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Int8) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Int8) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Int8) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type String ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OString ¶
Creates an optional type with a given value.
func (String) Get ¶
Get returns the value or given default in the case the value is undefined.
func (String) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (String) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (String) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (String) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*String) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*String) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type Uint ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OUint ¶
Creates an optional type with a given value.
func (Uint) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Uint) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Uint) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Uint) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Uint) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Uint) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Uint) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type Uint16 ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OUint16 ¶
Creates an optional type with a given value.
func (Uint16) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Uint16) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Uint16) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Uint16) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Uint16) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Uint16) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Uint16) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type Uint32 ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OUint32 ¶
Creates an optional type with a given value.
func (Uint32) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Uint32) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Uint32) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Uint32) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Uint32) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Uint32) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Uint32) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type Uint64 ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OUint64 ¶
Creates an optional type with a given value.
func (Uint64) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Uint64) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Uint64) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Uint64) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Uint64) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Uint64) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Uint64) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
type Uint8 ¶
A 'gotemplate'-based type for providing optional semantics without using pointers.
func OUint8 ¶
Creates an optional type with a given value.
func (Uint8) Get ¶
Get returns the value or given default in the case the value is undefined.
func (Uint8) IsDefined ¶
IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.
func (Uint8) MarshalEasyJSON ¶
MarshalEasyJSON does JSON marshaling using easyjson interface.
func (Uint8) MarshalJSON ¶
MarshalJSON implements a standard json marshaler interface.
func (Uint8) String ¶
String implements a stringer interface using fmt.Sprint for the value.
func (*Uint8) UnmarshalEasyJSON ¶
UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.
func (*Uint8) UnmarshalJSON ¶
UnmarshalJSON implements a standard json unmarshaler interface.
Source Files ¶
gotemplate_Bool.go gotemplate_Float32.go gotemplate_Float64.go gotemplate_Int.go gotemplate_Int16.go gotemplate_Int32.go gotemplate_Int64.go gotemplate_Int8.go gotemplate_String.go gotemplate_Uint.go gotemplate_Uint16.go gotemplate_Uint32.go gotemplate_Uint64.go gotemplate_Uint8.go opts.go
- Version
- v0.9.0 (latest)
- Published
- Dec 14, 2024
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 1 month ago –
Tools for package owners.