ntypes

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: MIT Imports: 8 Imported by: 7

README

ntypes GoDoc

CircleCI Code Climate Go Report Card pypi Download

Package provides set of types that helps to build complex protobuf messages that contains optional properties. API can be considered as stable.

Types

Basic
Arrays

Arrays support is not an SQL standard. Extra import needs to be added to make it working with postgres driver:

import _ "github.com/piotrkowalczuk/ntypes/ntypespq"

Interfaces

Some type implements set of interfaces:

Helpers

Besides that each type implements func <Type>Or(<builtin>) <builtin> {} method. It returns given argument if receiver is not valid or is nil. For example: ntypes.Bool.BoolOr.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// StringArrayScan is used by StringArray Scan method.
	StringArrayScan = func(interface{}) ([]string, error) {
		return nil, errors.New("ntypes: StringArrayScan not set")
	}
	// StringArrayValue is used by StringArray Value method.
	StringArrayValue = func([]string) (driver.Value, error) {
		return nil, errors.New("ntypes: StringArrayValue not set")
	}
	// Float64ArrayScan is used by Float64Array Scan method.
	Float64ArrayScan = func(interface{}) ([]float64, error) {
		return nil, errors.New("ntypes: Float64ArrayScan not set")
	}
	// Float64ArrayValue is used by Float64Array Value method.
	Float64ArrayValue = func([]float64) (driver.Value, error) {
		return nil, errors.New("ntypes: Float64ArrayValue not set")
	}
	// Int64ArrayScan is used by Int64Array Scan method.
	Int64ArrayScan = func(interface{}) ([]int64, error) {
		return nil, errors.New("ntypes: Float64ArrayValue not set")
	}
	// Int64ArrayValue is used by Int64Array Value method.
	Int64ArrayValue = func([]int64) (driver.Value, error) {
		return nil, errors.New("ntypes: Int64ArrayValue not set")
	}
	// BoolArrayScan is used by BoolArray Scan method.
	BoolArrayScan = func(interface{}) ([]bool, error) {
		return nil, errors.New("ntypes: BoolArrayScan not set")
	}
	// BoolArrayValue is used by BoolArray Value method.
	BoolArrayValue = func([]bool) (driver.Value, error) {
		return nil, errors.New("ntypes: BoolArrayValue not set")
	}
	// BytesArrayScan is used by BytesArray Scan method.
	BytesArrayScan = func(interface{}) ([][]byte, error) {
		return nil, errors.New("ntypes: BytesArrayScan not set")
	}
	// ByteArrayValue is used by BytesArray Value method.
	BytesArrayValue = func([][]byte) (driver.Value, error) {
		return nil, errors.New("ntypes: BytesArrayValue not set")
	}
)

Functions

This section is empty.

Types

type Bool

type Bool struct {
	Bool                 bool     `protobuf:"varint,1,opt,name=bool,proto3" json:"bool,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Bool represents a bool that may be nil.

func False

func False() *Bool

False allocate new valid Bool object that holds false.

func True

func True() *Bool

True allocate new valid Bool object that holds true.

func (*Bool) BoolOr

func (b *Bool) BoolOr(or bool) bool

BoolOr returns given bool value if receiver is nil or invalid.

func (*Bool) Descriptor

func (*Bool) Descriptor() ([]byte, []int)

func (*Bool) GetBool

func (m *Bool) GetBool() bool

func (*Bool) GetValid

func (m *Bool) GetValid() bool

func (*Bool) MarshalJSON

func (b *Bool) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Bool) ProtoMessage

func (*Bool) ProtoMessage()

func (*Bool) Reset

func (m *Bool) Reset()

func (*Bool) Scan

func (b *Bool) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*Bool) String

func (m *Bool) String() string

func (*Bool) UnmarshalJSON

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

UnmarshalJSON implements json.Unmarshaler interface.

func (Bool) Value

func (b Bool) Value() (driver.Value, error)

Value implements the driver Valuer interface.

func (*Bool) XXX_DiscardUnknown added in v1.0.2

func (m *Bool) XXX_DiscardUnknown()

func (*Bool) XXX_Marshal added in v1.0.2

func (m *Bool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Bool) XXX_Merge added in v1.0.2

func (dst *Bool) XXX_Merge(src proto.Message)

func (*Bool) XXX_Size added in v1.0.2

func (m *Bool) XXX_Size() int

func (*Bool) XXX_Unmarshal added in v1.0.2

func (m *Bool) XXX_Unmarshal(b []byte) error

type BoolArray

type BoolArray struct {
	BoolArray            []bool   `protobuf:"varint,1,rep,packed,name=bool_array,json=boolArray,proto3" json:"bool_array,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

BoolArray represents an array of booleans that may be nil.

func (*BoolArray) BoolArrayOr

func (ba *BoolArray) BoolArrayOr(or []bool) []bool

BoolArrayOr returns given slice if receiver is nil or invalid.

func (*BoolArray) Descriptor

func (*BoolArray) Descriptor() ([]byte, []int)

func (*BoolArray) GetBoolArray

func (m *BoolArray) GetBoolArray() []bool

func (*BoolArray) GetValid

func (m *BoolArray) GetValid() bool

func (*BoolArray) MarshalJSON

func (ba *BoolArray) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*BoolArray) ProtoMessage

func (*BoolArray) ProtoMessage()

func (*BoolArray) Reset

func (m *BoolArray) Reset()

func (*BoolArray) Scan

func (ba *BoolArray) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*BoolArray) String

func (m *BoolArray) String() string

func (*BoolArray) UnmarshalJSON

func (ba *BoolArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (BoolArray) Value

func (ba BoolArray) Value() (driver.Value, error)

Value implements the driver Valuer interface.

func (*BoolArray) XXX_DiscardUnknown added in v1.0.2

func (m *BoolArray) XXX_DiscardUnknown()

func (*BoolArray) XXX_Marshal added in v1.0.2

func (m *BoolArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BoolArray) XXX_Merge added in v1.0.2

func (dst *BoolArray) XXX_Merge(src proto.Message)

func (*BoolArray) XXX_Size added in v1.0.2

func (m *BoolArray) XXX_Size() int

func (*BoolArray) XXX_Unmarshal added in v1.0.2

func (m *BoolArray) XXX_Unmarshal(b []byte) error

type Bytes

type Bytes struct {
	Bytes                []byte   `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Bytes represents a byte slice that may be nil.

func (*Bytes) Descriptor

func (*Bytes) Descriptor() ([]byte, []int)

func (*Bytes) GetBytes

func (m *Bytes) GetBytes() []byte

func (*Bytes) GetValid

func (m *Bytes) GetValid() bool

func (*Bytes) ProtoMessage

func (*Bytes) ProtoMessage()

func (*Bytes) Reset

func (m *Bytes) Reset()

func (*Bytes) String

func (m *Bytes) String() string

func (*Bytes) XXX_DiscardUnknown added in v1.0.2

func (m *Bytes) XXX_DiscardUnknown()

func (*Bytes) XXX_Marshal added in v1.0.2

func (m *Bytes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Bytes) XXX_Merge added in v1.0.2

func (dst *Bytes) XXX_Merge(src proto.Message)

func (*Bytes) XXX_Size added in v1.0.2

func (m *Bytes) XXX_Size() int

func (*Bytes) XXX_Unmarshal added in v1.0.2

func (m *Bytes) XXX_Unmarshal(b []byte) error

type BytesArray

type BytesArray struct {
	BytesArray           [][]byte `protobuf:"bytes,1,rep,name=bytes_array,json=bytesArray,proto3" json:"bytes_array,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

BytesArray represents an array of byte slices that may be nil.

func (*BytesArray) BytesArrayOr

func (ba *BytesArray) BytesArrayOr(or [][]byte) [][]byte

BytesArrayOr returns given slice if receiver is nil or invalid.

func (*BytesArray) Descriptor

func (*BytesArray) Descriptor() ([]byte, []int)

func (*BytesArray) GetBytesArray

func (m *BytesArray) GetBytesArray() [][]byte

func (*BytesArray) GetValid

func (m *BytesArray) GetValid() bool

func (*BytesArray) MarshalJSON

func (ba *BytesArray) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*BytesArray) ProtoMessage

func (*BytesArray) ProtoMessage()

func (*BytesArray) Reset

func (m *BytesArray) Reset()

func (*BytesArray) Scan

func (ba *BytesArray) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*BytesArray) String

func (m *BytesArray) String() string

func (*BytesArray) UnmarshalJSON

func (ba *BytesArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (BytesArray) Value

func (ba BytesArray) Value() (driver.Value, error)

Value implements the driver Valuer interface.

func (*BytesArray) XXX_DiscardUnknown added in v1.0.2

func (m *BytesArray) XXX_DiscardUnknown()

func (*BytesArray) XXX_Marshal added in v1.0.2

func (m *BytesArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BytesArray) XXX_Merge added in v1.0.2

func (dst *BytesArray) XXX_Merge(src proto.Message)

func (*BytesArray) XXX_Size added in v1.0.2

func (m *BytesArray) XXX_Size() int

func (*BytesArray) XXX_Unmarshal added in v1.0.2

func (m *BytesArray) XXX_Unmarshal(b []byte) error

type Float32

type Float32 struct {
	Float32              float32  `protobuf:"fixed32,1,opt,name=float32,proto3" json:"float32,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Float32 represents a Float32 that may be nil.

func NewFloat32

func NewFloat32(f float32) *Float32

NewFloat32 allocates new valid Float32.

func (*Float32) Descriptor

func (*Float32) Descriptor() ([]byte, []int)

func (*Float32) Float32Or

func (f *Float32) Float32Or(or float32) float32

Float32Or returns given Float32 value if receiver is nil or invalid.

func (*Float32) GetFloat32

func (m *Float32) GetFloat32() float32

func (*Float32) GetValid

func (m *Float32) GetValid() bool

func (*Float32) MarshalJSON

func (f *Float32) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Float32) ProtoMessage

func (*Float32) ProtoMessage()

func (*Float32) Reset

func (m *Float32) Reset()

func (*Float32) Scan

func (f *Float32) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*Float32) String

func (m *Float32) String() string

func (*Float32) UnmarshalJSON

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

UnmarshalJSON implements json.Unmarshaler interface.

func (Float32) Value

func (f Float32) Value() (driver.Value, error)

Value implements the driver Valuer interface.

func (*Float32) XXX_DiscardUnknown added in v1.0.2

func (m *Float32) XXX_DiscardUnknown()

func (*Float32) XXX_Marshal added in v1.0.2

func (m *Float32) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Float32) XXX_Merge added in v1.0.2

func (dst *Float32) XXX_Merge(src proto.Message)

func (*Float32) XXX_Size added in v1.0.2

func (m *Float32) XXX_Size() int

func (*Float32) XXX_Unmarshal added in v1.0.2

func (m *Float32) XXX_Unmarshal(b []byte) error

type Float32Array

type Float32Array struct {
	Float32Array         []float32 `protobuf:"fixed32,1,rep,packed,name=float32_array,json=float32Array,proto3" json:"float32_array,omitempty"`
	Valid                bool      `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

Float32Array represents an array of float32s that may be nil.

func (*Float32Array) Descriptor

func (*Float32Array) Descriptor() ([]byte, []int)

func (*Float32Array) Float32ArrayOr

func (fa *Float32Array) Float32ArrayOr(or []float32) []float32

Float32ArrayOr returns given slice if receiver is nil or invalid.

func (*Float32Array) GetFloat32Array

func (m *Float32Array) GetFloat32Array() []float32

func (*Float32Array) GetValid

func (m *Float32Array) GetValid() bool

func (*Float32Array) MarshalJSON

func (fa *Float32Array) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Float32Array) ProtoMessage

func (*Float32Array) ProtoMessage()

func (*Float32Array) Reset

func (m *Float32Array) Reset()

func (*Float32Array) String

func (m *Float32Array) String() string

func (*Float32Array) UnmarshalJSON

func (fa *Float32Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (*Float32Array) XXX_DiscardUnknown added in v1.0.2

func (m *Float32Array) XXX_DiscardUnknown()

func (*Float32Array) XXX_Marshal added in v1.0.2

func (m *Float32Array) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Float32Array) XXX_Merge added in v1.0.2

func (dst *Float32Array) XXX_Merge(src proto.Message)

func (*Float32Array) XXX_Size added in v1.0.2

func (m *Float32Array) XXX_Size() int

func (*Float32Array) XXX_Unmarshal added in v1.0.2

func (m *Float32Array) XXX_Unmarshal(b []byte) error

type Float64

type Float64 struct {
	Float64              float64  `protobuf:"fixed64,1,opt,name=float64,proto3" json:"float64,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Float64 represents a Float64 that may be nil.

func NewFloat64

func NewFloat64(f float64) *Float64

NewFloat64 allocates new valid Float64.

func (*Float64) Descriptor

func (*Float64) Descriptor() ([]byte, []int)

func (*Float64) Float64Or

func (f *Float64) Float64Or(or float64) float64

Float64Or returns given float64 value if receiver is nil or invalid.

func (*Float64) GetFloat64

func (m *Float64) GetFloat64() float64

func (*Float64) GetValid

func (m *Float64) GetValid() bool

func (*Float64) MarshalJSON

func (f *Float64) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Float64) ProtoMessage

func (*Float64) ProtoMessage()

func (*Float64) Reset

func (m *Float64) Reset()

func (*Float64) Scan

func (f *Float64) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*Float64) String

func (m *Float64) String() string

func (*Float64) UnmarshalJSON

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

UnmarshalJSON implements json.Unmarshaler interface.

func (Float64) Value

func (f Float64) Value() (driver.Value, error)

Value implements the driver Valuer interface.

func (*Float64) XXX_DiscardUnknown added in v1.0.2

func (m *Float64) XXX_DiscardUnknown()

func (*Float64) XXX_Marshal added in v1.0.2

func (m *Float64) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Float64) XXX_Merge added in v1.0.2

func (dst *Float64) XXX_Merge(src proto.Message)

func (*Float64) XXX_Size added in v1.0.2

func (m *Float64) XXX_Size() int

func (*Float64) XXX_Unmarshal added in v1.0.2

func (m *Float64) XXX_Unmarshal(b []byte) error

type Float64Array

type Float64Array struct {
	Float64Array         []float64 `protobuf:"fixed64,1,rep,packed,name=float64_array,json=float64Array,proto3" json:"float64_array,omitempty"`
	Valid                bool      `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

Float64Array represents an array of float64s that may be nil.

func (*Float64Array) Descriptor

func (*Float64Array) Descriptor() ([]byte, []int)

func (*Float64Array) Float64ArrayOr

func (fa *Float64Array) Float64ArrayOr(or []float64) []float64

Float64ArrayOr returns given slice if receiver is nil or invalid.

func (*Float64Array) GetFloat64Array

func (m *Float64Array) GetFloat64Array() []float64

func (*Float64Array) GetValid

func (m *Float64Array) GetValid() bool

func (*Float64Array) MarshalJSON

func (fa *Float64Array) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Float64Array) ProtoMessage

func (*Float64Array) ProtoMessage()

func (*Float64Array) Reset

func (m *Float64Array) Reset()

func (*Float64Array) Scan

func (fa *Float64Array) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*Float64Array) String

func (m *Float64Array) String() string

func (*Float64Array) UnmarshalJSON

func (fa *Float64Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (Float64Array) Value

func (fa Float64Array) Value() (driver.Value, error)

Value implements the driver Valuer interface.

func (*Float64Array) XXX_DiscardUnknown added in v1.0.2

func (m *Float64Array) XXX_DiscardUnknown()

func (*Float64Array) XXX_Marshal added in v1.0.2

func (m *Float64Array) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Float64Array) XXX_Merge added in v1.0.2

func (dst *Float64Array) XXX_Merge(src proto.Message)

func (*Float64Array) XXX_Size added in v1.0.2

func (m *Float64Array) XXX_Size() int

func (*Float64Array) XXX_Unmarshal added in v1.0.2

func (m *Float64Array) XXX_Unmarshal(b []byte) error

type Int32

type Int32 struct {
	Int32                int32    `protobuf:"varint,1,opt,name=int32,proto3" json:"int32,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Int32 represents a int32 that may be nil.

func NewInt32

func NewInt32(i int32) *Int32

NewInt32 allocates new valid Int32.

func (*Int32) Descriptor

func (*Int32) Descriptor() ([]byte, []int)

func (*Int32) GetInt32

func (m *Int32) GetInt32() int32

func (*Int32) GetValid

func (m *Int32) GetValid() bool

func (*Int32) Int32Or

func (i *Int32) Int32Or(or int32) int32

Int32Or returns given int32 value if receiver is nil or invalid.

func (*Int32) MarshalJSON

func (i *Int32) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Int32) ProtoMessage

func (*Int32) ProtoMessage()

func (*Int32) Reset

func (m *Int32) Reset()

func (*Int32) Scan

func (i *Int32) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*Int32) String

func (m *Int32) String() string

func (*Int32) UnmarshalJSON

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

UnmarshalJSON implements json.Unmarshaler interface.

func (Int32) Value

func (i Int32) Value() (driver.Value, error)

Value implements the driver Valuer interface.

func (*Int32) XXX_DiscardUnknown added in v1.0.2

func (m *Int32) XXX_DiscardUnknown()

func (*Int32) XXX_Marshal added in v1.0.2

func (m *Int32) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Int32) XXX_Merge added in v1.0.2

func (dst *Int32) XXX_Merge(src proto.Message)

func (*Int32) XXX_Size added in v1.0.2

func (m *Int32) XXX_Size() int

func (*Int32) XXX_Unmarshal added in v1.0.2

func (m *Int32) XXX_Unmarshal(b []byte) error

type Int32Array

type Int32Array struct {
	Int32Array           []int32  `protobuf:"varint,1,rep,packed,name=int32_array,json=int32Array,proto3" json:"int32_array,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Int32Array represents an array of int32s that may be nil.

func (*Int32Array) Descriptor

func (*Int32Array) Descriptor() ([]byte, []int)

func (*Int32Array) GetInt32Array

func (m *Int32Array) GetInt32Array() []int32

func (*Int32Array) GetValid

func (m *Int32Array) GetValid() bool

func (*Int32Array) Int32ArrayOr

func (ia *Int32Array) Int32ArrayOr(or []int32) []int32

Int32ArrayOr returns given slice if receiver is nil or invalid.

func (*Int32Array) MarshalJSON

func (ia *Int32Array) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Int32Array) ProtoMessage

func (*Int32Array) ProtoMessage()

func (*Int32Array) Reset

func (m *Int32Array) Reset()

func (*Int32Array) String

func (m *Int32Array) String() string

func (*Int32Array) UnmarshalJSON

func (ia *Int32Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (*Int32Array) XXX_DiscardUnknown added in v1.0.2

func (m *Int32Array) XXX_DiscardUnknown()

func (*Int32Array) XXX_Marshal added in v1.0.2

func (m *Int32Array) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Int32Array) XXX_Merge added in v1.0.2

func (dst *Int32Array) XXX_Merge(src proto.Message)

func (*Int32Array) XXX_Size added in v1.0.2

func (m *Int32Array) XXX_Size() int

func (*Int32Array) XXX_Unmarshal added in v1.0.2

func (m *Int32Array) XXX_Unmarshal(b []byte) error

type Int64

type Int64 struct {
	Int64                int64    `protobuf:"varint,1,opt,name=int64,proto3" json:"int64,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Int64 represents a int64 that may be nil.

func NewInt64

func NewInt64(i int64) *Int64

NewInt64 allocates new valid Int64.

func (*Int64) Descriptor

func (*Int64) Descriptor() ([]byte, []int)

func (*Int64) GetInt64

func (m *Int64) GetInt64() int64

func (*Int64) GetValid

func (m *Int64) GetValid() bool

func (*Int64) Int64Or

func (i *Int64) Int64Or(or int64) int64

Int64Or returns given int64 value if receiver is nil or invalid.

func (*Int64) MarshalJSON

func (i *Int64) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Int64) ProtoMessage

func (*Int64) ProtoMessage()

func (*Int64) Reset

func (m *Int64) Reset()

func (*Int64) Scan

func (i *Int64) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*Int64) String

func (m *Int64) String() string

func (*Int64) UnmarshalJSON

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

UnmarshalJSON implements json.Unmarshaler interface.

func (Int64) Value

func (i Int64) Value() (driver.Value, error)

Value implements the driver Valuer interface.

func (*Int64) XXX_DiscardUnknown added in v1.0.2

func (m *Int64) XXX_DiscardUnknown()

func (*Int64) XXX_Marshal added in v1.0.2

func (m *Int64) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Int64) XXX_Merge added in v1.0.2

func (dst *Int64) XXX_Merge(src proto.Message)

func (*Int64) XXX_Size added in v1.0.2

func (m *Int64) XXX_Size() int

func (*Int64) XXX_Unmarshal added in v1.0.2

func (m *Int64) XXX_Unmarshal(b []byte) error

type Int64Array

type Int64Array struct {
	Int64Array           []int64  `protobuf:"varint,1,rep,packed,name=int64_array,json=int64Array,proto3" json:"int64_array,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Int64Array represents an array of int64s that may be nil.

func (*Int64Array) Descriptor

func (*Int64Array) Descriptor() ([]byte, []int)

func (*Int64Array) GetInt64Array

func (m *Int64Array) GetInt64Array() []int64

func (*Int64Array) GetValid

func (m *Int64Array) GetValid() bool

func (*Int64Array) Int64ArrayOr

func (ia *Int64Array) Int64ArrayOr(or []int64) []int64

Int64ArrayOr returns given slice if receiver is nil or invalid.

func (*Int64Array) MarshalJSON

func (ia *Int64Array) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Int64Array) ProtoMessage

func (*Int64Array) ProtoMessage()

func (*Int64Array) Reset

func (m *Int64Array) Reset()

func (*Int64Array) Scan

func (ia *Int64Array) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*Int64Array) String

func (m *Int64Array) String() string

func (*Int64Array) UnmarshalJSON

func (ia *Int64Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (Int64Array) Value

func (ia Int64Array) Value() (driver.Value, error)

Value implements the driver Valuer interface.

func (*Int64Array) XXX_DiscardUnknown added in v1.0.2

func (m *Int64Array) XXX_DiscardUnknown()

func (*Int64Array) XXX_Marshal added in v1.0.2

func (m *Int64Array) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Int64Array) XXX_Merge added in v1.0.2

func (dst *Int64Array) XXX_Merge(src proto.Message)

func (*Int64Array) XXX_Size added in v1.0.2

func (m *Int64Array) XXX_Size() int

func (*Int64Array) XXX_Unmarshal added in v1.0.2

func (m *Int64Array) XXX_Unmarshal(b []byte) error

type String

type String struct {
	Chars                string   `protobuf:"bytes,1,opt,name=chars,proto3" json:"chars,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

String represents a string that may be nil.

func NewString

func NewString(s string) *String

NewString allocates new valid string.

func (*String) Descriptor

func (*String) Descriptor() ([]byte, []int)

func (*String) GetChars

func (m *String) GetChars() string

func (*String) GetValid

func (m *String) GetValid() bool

func (*String) MarshalJSON

func (s *String) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*String) ProtoMessage

func (*String) ProtoMessage()

func (*String) Reset

func (m *String) Reset()

func (*String) Scan

func (s *String) Scan(value interface{}) error

Scan implements the Scanner interface.

func (*String) String

func (m *String) String() string

func (*String) StringOr

func (s *String) StringOr(or string) string

StringOr returns given string value if receiver is nil or invalid.

func (*String) UnmarshalJSON

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

UnmarshalJSON implements json.Unmarshaler interface.

func (String) Value

func (s String) Value() (driver.Value, error)

Value implements the driver Valuer interface.

func (*String) XXX_DiscardUnknown added in v1.0.2

func (m *String) XXX_DiscardUnknown()

func (*String) XXX_Marshal added in v1.0.2

func (m *String) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*String) XXX_Merge added in v1.0.2

func (dst *String) XXX_Merge(src proto.Message)

func (*String) XXX_Size added in v1.0.2

func (m *String) XXX_Size() int

func (*String) XXX_Unmarshal added in v1.0.2

func (m *String) XXX_Unmarshal(b []byte) error

type StringArray

type StringArray struct {
	StringArray          []string `protobuf:"bytes,1,rep,name=string_array,json=stringArray,proto3" json:"string_array,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

StringArray represents an array of strings that may be nil.

func (*StringArray) Descriptor

func (*StringArray) Descriptor() ([]byte, []int)

func (*StringArray) GetStringArray

func (m *StringArray) GetStringArray() []string

func (*StringArray) GetValid

func (m *StringArray) GetValid() bool

func (*StringArray) MarshalJSON

func (sa *StringArray) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*StringArray) ProtoMessage

func (*StringArray) ProtoMessage()

func (*StringArray) Reset

func (m *StringArray) Reset()

func (*StringArray) Scan

func (sa *StringArray) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*StringArray) String

func (m *StringArray) String() string

func (*StringArray) StringArrayOr

func (sa *StringArray) StringArrayOr(or []string) []string

StringArrayOr returns given slice if receiver is nil or invalid.

func (*StringArray) UnmarshalJSON

func (sa *StringArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (StringArray) Value

func (sa StringArray) Value() (driver.Value, error)

Value implements the driver Valuer interface.

func (*StringArray) XXX_DiscardUnknown added in v1.0.2

func (m *StringArray) XXX_DiscardUnknown()

func (*StringArray) XXX_Marshal added in v1.0.2

func (m *StringArray) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StringArray) XXX_Merge added in v1.0.2

func (dst *StringArray) XXX_Merge(src proto.Message)

func (*StringArray) XXX_Size added in v1.0.2

func (m *StringArray) XXX_Size() int

func (*StringArray) XXX_Unmarshal added in v1.0.2

func (m *StringArray) XXX_Unmarshal(b []byte) error

type Uint32

type Uint32 struct {
	Uint32               uint32   `protobuf:"varint,1,opt,name=uint32,proto3" json:"uint32,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Uint32 represents a Uint32 that may be nil.

func NewUint32

func NewUint32(u uint32) *Uint32

NewUint32 allocates new valid Uint32.

func (*Uint32) Descriptor

func (*Uint32) Descriptor() ([]byte, []int)

func (*Uint32) GetUint32

func (m *Uint32) GetUint32() uint32

func (*Uint32) GetValid

func (m *Uint32) GetValid() bool

func (*Uint32) MarshalJSON

func (u *Uint32) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Uint32) ProtoMessage

func (*Uint32) ProtoMessage()

func (*Uint32) Reset

func (m *Uint32) Reset()

func (*Uint32) Scan

func (u *Uint32) Scan(value interface{}) (err error)

Scan implements the Scanner interface.

func (*Uint32) String

func (m *Uint32) String() string

func (*Uint32) Uint32Or

func (u *Uint32) Uint32Or(or uint32) uint32

Uint32Or returns given uint32 value if receiver is nil or invalid.

func (*Uint32) UnmarshalJSON

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

UnmarshalJSON implements json.Unmarshaler interface.

func (Uint32) Value

func (u Uint32) Value() (driver.Value, error)

Value implements the driver Valuer interface.

func (*Uint32) XXX_DiscardUnknown added in v1.0.2

func (m *Uint32) XXX_DiscardUnknown()

func (*Uint32) XXX_Marshal added in v1.0.2

func (m *Uint32) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Uint32) XXX_Merge added in v1.0.2

func (dst *Uint32) XXX_Merge(src proto.Message)

func (*Uint32) XXX_Size added in v1.0.2

func (m *Uint32) XXX_Size() int

func (*Uint32) XXX_Unmarshal added in v1.0.2

func (m *Uint32) XXX_Unmarshal(b []byte) error

type Uint32Array

type Uint32Array struct {
	Uint32Array          []uint32 `protobuf:"varint,1,rep,packed,name=uint32_array,json=uint32Array,proto3" json:"uint32_array,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Uint32Array represents an array of uint32s that may be nil.

func (*Uint32Array) Descriptor

func (*Uint32Array) Descriptor() ([]byte, []int)

func (*Uint32Array) GetUint32Array

func (m *Uint32Array) GetUint32Array() []uint32

func (*Uint32Array) GetValid

func (m *Uint32Array) GetValid() bool

func (*Uint32Array) MarshalJSON

func (ua *Uint32Array) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Uint32Array) ProtoMessage

func (*Uint32Array) ProtoMessage()

func (*Uint32Array) Reset

func (m *Uint32Array) Reset()

func (*Uint32Array) String

func (m *Uint32Array) String() string

func (*Uint32Array) Uint32ArrayOr

func (ua *Uint32Array) Uint32ArrayOr(or []uint32) []uint32

Uint32ArrayOr returns given slice if receiver is nil or invalid.

func (*Uint32Array) UnmarshalJSON

func (ua *Uint32Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (*Uint32Array) XXX_DiscardUnknown added in v1.0.2

func (m *Uint32Array) XXX_DiscardUnknown()

func (*Uint32Array) XXX_Marshal added in v1.0.2

func (m *Uint32Array) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Uint32Array) XXX_Merge added in v1.0.2

func (dst *Uint32Array) XXX_Merge(src proto.Message)

func (*Uint32Array) XXX_Size added in v1.0.2

func (m *Uint32Array) XXX_Size() int

func (*Uint32Array) XXX_Unmarshal added in v1.0.2

func (m *Uint32Array) XXX_Unmarshal(b []byte) error

type Uint64

type Uint64 struct {
	Uint64               uint64   `protobuf:"varint,1,opt,name=uint64,proto3" json:"uint64,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Uint64 represents a Uint64 that may be nil.

func NewUint64

func NewUint64(u uint64) *Uint64

NewUint64 allocates new valid Uint64.

func (*Uint64) Descriptor

func (*Uint64) Descriptor() ([]byte, []int)

func (*Uint64) GetUint64

func (m *Uint64) GetUint64() uint64

func (*Uint64) GetValid

func (m *Uint64) GetValid() bool

func (*Uint64) MarshalJSON

func (u *Uint64) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Uint64) ProtoMessage

func (*Uint64) ProtoMessage()

func (*Uint64) Reset

func (m *Uint64) Reset()

func (*Uint64) String

func (m *Uint64) String() string

func (*Uint64) Uint64Or

func (u *Uint64) Uint64Or(or uint64) uint64

Uint64Or returns given uint64 value if receiver is nil or invalid.

func (*Uint64) UnmarshalJSON

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

UnmarshalJSON implements json.Unmarshaler interface.

func (*Uint64) XXX_DiscardUnknown added in v1.0.2

func (m *Uint64) XXX_DiscardUnknown()

func (*Uint64) XXX_Marshal added in v1.0.2

func (m *Uint64) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Uint64) XXX_Merge added in v1.0.2

func (dst *Uint64) XXX_Merge(src proto.Message)

func (*Uint64) XXX_Size added in v1.0.2

func (m *Uint64) XXX_Size() int

func (*Uint64) XXX_Unmarshal added in v1.0.2

func (m *Uint64) XXX_Unmarshal(b []byte) error

type Uint64Array

type Uint64Array struct {
	Uint64Array          []uint64 `protobuf:"varint,1,rep,packed,name=uint64_array,json=uint64Array,proto3" json:"uint64_array,omitempty"`
	Valid                bool     `protobuf:"varint,2,opt,name=valid,proto3" json:"valid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Uint64Array represents an array of uint64s that may be nil.

func (*Uint64Array) Descriptor

func (*Uint64Array) Descriptor() ([]byte, []int)

func (*Uint64Array) GetUint64Array

func (m *Uint64Array) GetUint64Array() []uint64

func (*Uint64Array) GetValid

func (m *Uint64Array) GetValid() bool

func (*Uint64Array) MarshalJSON

func (ua *Uint64Array) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Uint64Array) ProtoMessage

func (*Uint64Array) ProtoMessage()

func (*Uint64Array) Reset

func (m *Uint64Array) Reset()

func (*Uint64Array) String

func (m *Uint64Array) String() string

func (*Uint64Array) Uint64ArrayOr

func (ua *Uint64Array) Uint64ArrayOr(or []uint64) []uint64

Uint64ArrayOr returns given slice if receiver is nil or invalid.

func (*Uint64Array) UnmarshalJSON

func (ua *Uint64Array) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (*Uint64Array) XXX_DiscardUnknown added in v1.0.2

func (m *Uint64Array) XXX_DiscardUnknown()

func (*Uint64Array) XXX_Marshal added in v1.0.2

func (m *Uint64Array) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Uint64Array) XXX_Merge added in v1.0.2

func (dst *Uint64Array) XXX_Merge(src proto.Message)

func (*Uint64Array) XXX_Size added in v1.0.2

func (m *Uint64Array) XXX_Size() int

func (*Uint64Array) XXX_Unmarshal added in v1.0.2

func (m *Uint64Array) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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