opt

package
v0.0.0-...-61a3095 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2017 License: MIT Imports: 3 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 {
	V       bool
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OBool

func OBool(v bool) Bool

Creates an optional type with a given value.

func (Bool) Get

func (v Bool) Get(deflt bool) bool

Get returns the value or given default in the case the value is undefined.

func (Bool) IsDefined

func (v Bool) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Bool) MarshalEasyJSON

func (v Bool) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Bool) MarshalJSON

func (v Bool) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Bool) String

func (v Bool) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Bool) UnmarshalEasyJSON

func (v *Bool) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Bool) UnmarshalJSON

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

UnmarshalJSON implements a standard json unmarshaler interface.

type Float32

type Float32 struct {
	V       float32
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OFloat32

func OFloat32(v float32) Float32

Creates an optional type with a given value.

func (Float32) Get

func (v Float32) Get(deflt float32) float32

Get returns the value or given default in the case the value is undefined.

func (Float32) IsDefined

func (v Float32) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Float32) MarshalEasyJSON

func (v Float32) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Float32) MarshalJSON

func (v Float32) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Float32) String

func (v Float32) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Float32) UnmarshalEasyJSON

func (v *Float32) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Float32) UnmarshalJSON

func (v *Float32) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Float64

type Float64 struct {
	V       float64
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OFloat64

func OFloat64(v float64) Float64

Creates an optional type with a given value.

func (Float64) Get

func (v Float64) Get(deflt float64) float64

Get returns the value or given default in the case the value is undefined.

func (Float64) IsDefined

func (v Float64) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Float64) MarshalEasyJSON

func (v Float64) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Float64) MarshalJSON

func (v Float64) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Float64) String

func (v Float64) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Float64) UnmarshalEasyJSON

func (v *Float64) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Float64) UnmarshalJSON

func (v *Float64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int

type Int struct {
	V       int
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OInt

func OInt(v int) Int

Creates an optional type with a given value.

func (Int) Get

func (v Int) Get(deflt int) int

Get returns the value or given default in the case the value is undefined.

func (Int) IsDefined

func (v Int) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Int) MarshalEasyJSON

func (v Int) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int) MarshalJSON

func (v Int) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Int) String

func (v Int) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Int) UnmarshalEasyJSON

func (v *Int) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int) UnmarshalJSON

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

UnmarshalJSON implements a standard json unmarshaler interface.

type Int16

type Int16 struct {
	V       int16
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OInt16

func OInt16(v int16) Int16

Creates an optional type with a given value.

func (Int16) Get

func (v Int16) Get(deflt int16) int16

Get returns the value or given default in the case the value is undefined.

func (Int16) IsDefined

func (v Int16) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Int16) MarshalEasyJSON

func (v Int16) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int16) MarshalJSON

func (v Int16) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Int16) String

func (v Int16) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Int16) UnmarshalEasyJSON

func (v *Int16) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int16) UnmarshalJSON

func (v *Int16) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int32

type Int32 struct {
	V       int32
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OInt32

func OInt32(v int32) Int32

Creates an optional type with a given value.

func (Int32) Get

func (v Int32) Get(deflt int32) int32

Get returns the value or given default in the case the value is undefined.

func (Int32) IsDefined

func (v Int32) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Int32) MarshalEasyJSON

func (v Int32) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int32) MarshalJSON

func (v Int32) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Int32) String

func (v Int32) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Int32) UnmarshalEasyJSON

func (v *Int32) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int32) UnmarshalJSON

func (v *Int32) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int64

type Int64 struct {
	V       int64
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OInt64

func OInt64(v int64) Int64

Creates an optional type with a given value.

func (Int64) Get

func (v Int64) Get(deflt int64) int64

Get returns the value or given default in the case the value is undefined.

func (Int64) IsDefined

func (v Int64) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Int64) MarshalEasyJSON

func (v Int64) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int64) MarshalJSON

func (v Int64) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Int64) String

func (v Int64) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Int64) UnmarshalEasyJSON

func (v *Int64) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int64) UnmarshalJSON

func (v *Int64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Int8

type Int8 struct {
	V       int8
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OInt8

func OInt8(v int8) Int8

Creates an optional type with a given value.

func (Int8) Get

func (v Int8) Get(deflt int8) int8

Get returns the value or given default in the case the value is undefined.

func (Int8) IsDefined

func (v Int8) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Int8) MarshalEasyJSON

func (v Int8) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Int8) MarshalJSON

func (v Int8) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Int8) String

func (v Int8) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Int8) UnmarshalEasyJSON

func (v *Int8) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Int8) UnmarshalJSON

func (v *Int8) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type String

type String struct {
	V       string
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OString

func OString(v string) String

Creates an optional type with a given value.

func (String) Get

func (v String) Get(deflt string) string

Get returns the value or given default in the case the value is undefined.

func (String) IsDefined

func (v String) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (String) MarshalEasyJSON

func (v String) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (String) MarshalJSON

func (v String) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (String) String

func (v String) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*String) UnmarshalEasyJSON

func (v *String) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*String) UnmarshalJSON

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

UnmarshalJSON implements a standard json unmarshaler interface.

type Uint

type Uint struct {
	V       uint
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OUint

func OUint(v uint) Uint

Creates an optional type with a given value.

func (Uint) Get

func (v Uint) Get(deflt uint) uint

Get returns the value or given default in the case the value is undefined.

func (Uint) IsDefined

func (v Uint) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Uint) MarshalEasyJSON

func (v Uint) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Uint) MarshalJSON

func (v Uint) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Uint) String

func (v Uint) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Uint) UnmarshalEasyJSON

func (v *Uint) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Uint) UnmarshalJSON

func (v *Uint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Uint16

type Uint16 struct {
	V       uint16
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OUint16

func OUint16(v uint16) Uint16

Creates an optional type with a given value.

func (Uint16) Get

func (v Uint16) Get(deflt uint16) uint16

Get returns the value or given default in the case the value is undefined.

func (Uint16) IsDefined

func (v Uint16) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Uint16) MarshalEasyJSON

func (v Uint16) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Uint16) MarshalJSON

func (v Uint16) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Uint16) String

func (v Uint16) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Uint16) UnmarshalEasyJSON

func (v *Uint16) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Uint16) UnmarshalJSON

func (v *Uint16) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Uint32

type Uint32 struct {
	V       uint32
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OUint32

func OUint32(v uint32) Uint32

Creates an optional type with a given value.

func (Uint32) Get

func (v Uint32) Get(deflt uint32) uint32

Get returns the value or given default in the case the value is undefined.

func (Uint32) IsDefined

func (v Uint32) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Uint32) MarshalEasyJSON

func (v Uint32) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Uint32) MarshalJSON

func (v Uint32) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Uint32) String

func (v Uint32) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Uint32) UnmarshalEasyJSON

func (v *Uint32) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Uint32) UnmarshalJSON

func (v *Uint32) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Uint64

type Uint64 struct {
	V       uint64
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OUint64

func OUint64(v uint64) Uint64

Creates an optional type with a given value.

func (Uint64) Get

func (v Uint64) Get(deflt uint64) uint64

Get returns the value or given default in the case the value is undefined.

func (Uint64) IsDefined

func (v Uint64) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Uint64) MarshalEasyJSON

func (v Uint64) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Uint64) MarshalJSON

func (v Uint64) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Uint64) String

func (v Uint64) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Uint64) UnmarshalEasyJSON

func (v *Uint64) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Uint64) UnmarshalJSON

func (v *Uint64) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

type Uint8

type Uint8 struct {
	V       uint8
	Defined bool
}

A 'gotemplate'-based type for providing optional semantics without using pointers.

func OUint8

func OUint8(v uint8) Uint8

Creates an optional type with a given value.

func (Uint8) Get

func (v Uint8) Get(deflt uint8) uint8

Get returns the value or given default in the case the value is undefined.

func (Uint8) IsDefined

func (v Uint8) IsDefined() bool

IsDefined returns whether the value is defined, a function is required so that it can be used in an interface.

func (Uint8) MarshalEasyJSON

func (v Uint8) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON does JSON marshaling using easyjson interface.

func (Uint8) MarshalJSON

func (v Uint8) MarshalJSON() ([]byte, error)

MarshalJSON implements a standard json marshaler interface.

func (Uint8) String

func (v Uint8) String() string

String implements a stringer interface using fmt.Sprint for the value.

func (*Uint8) UnmarshalEasyJSON

func (v *Uint8) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON does JSON unmarshaling using easyjson interface.

func (*Uint8) UnmarshalJSON

func (v *Uint8) UnmarshalJSON(data []byte) error

UnmarshalJSON implements a standard json unmarshaler interface.

Jump to

Keyboard shortcuts

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