typedefs

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ThriftModule = &thriftreflect.ThriftModule{
	Name:     "typedefs",
	Package:  "go.uber.org/thriftrw/gen/internal/tests/typedefs",
	FilePath: "typedefs.thrift",
	SHA1:     "333cb75491c993220f7695108fa91a4a8a299a48",
	Includes: []*thriftreflect.ThriftModule{
		enums.ThriftModule,
		structs.ThriftModule,
	},
	Raw: rawIDL,
}

ThriftModule represents the IDL file used to generate this package.

Functions

This section is empty.

Types

type BinarySet

type BinarySet [][]byte

func (BinarySet) Equals

func (lhs BinarySet) Equals(rhs BinarySet) bool

Equals returns true if this BinarySet is equal to the provided BinarySet.

func (*BinarySet) FromWire

func (v *BinarySet) FromWire(w wire.Value) error

FromWire deserializes BinarySet from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (BinarySet) MarshalLogArray

func (v BinarySet) MarshalLogArray(enc zapcore.ArrayEncoder) error

func (BinarySet) String

func (v BinarySet) String() string

String returns a readable string representation of BinarySet.

func (BinarySet) ToWire

func (v BinarySet) ToWire() (wire.Value, error)

ToWire translates BinarySet into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type DefaultPrimitiveTypedef

type DefaultPrimitiveTypedef struct {
	State *State `json:"state,omitempty"`
}

func Default_DefaultPrimitiveTypedef added in v1.24.0

func Default_DefaultPrimitiveTypedef() *DefaultPrimitiveTypedef

Default_DefaultPrimitiveTypedef constructs a new DefaultPrimitiveTypedef struct, pre-populating any fields with defined default values.

func (*DefaultPrimitiveTypedef) Equals

Equals returns true if all the fields of this DefaultPrimitiveTypedef match the provided DefaultPrimitiveTypedef.

This function performs a deep comparison.

func (*DefaultPrimitiveTypedef) FromWire

func (v *DefaultPrimitiveTypedef) FromWire(w wire.Value) error

FromWire deserializes a DefaultPrimitiveTypedef struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a DefaultPrimitiveTypedef struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v DefaultPrimitiveTypedef
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*DefaultPrimitiveTypedef) GetState

func (v *DefaultPrimitiveTypedef) GetState() (o State)

GetState returns the value of State if it is set or its default value if it is unset.

func (*DefaultPrimitiveTypedef) IsSetState added in v1.14.0

func (v *DefaultPrimitiveTypedef) IsSetState() bool

IsSetState returns true if State is not nil.

func (*DefaultPrimitiveTypedef) MarshalLogObject

func (v *DefaultPrimitiveTypedef) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of DefaultPrimitiveTypedef.

func (*DefaultPrimitiveTypedef) String

func (v *DefaultPrimitiveTypedef) String() string

String returns a readable string representation of a DefaultPrimitiveTypedef struct.

func (*DefaultPrimitiveTypedef) ToWire

func (v *DefaultPrimitiveTypedef) ToWire() (wire.Value, error)

ToWire translates a DefaultPrimitiveTypedef struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type EdgeMap

type EdgeMap []struct {
	Key   *structs.Edge
	Value *structs.Edge
}

func (EdgeMap) Equals

func (lhs EdgeMap) Equals(rhs EdgeMap) bool

Equals returns true if this EdgeMap is equal to the provided EdgeMap.

func (*EdgeMap) FromWire

func (v *EdgeMap) FromWire(w wire.Value) error

FromWire deserializes EdgeMap from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (EdgeMap) MarshalLogArray

func (v EdgeMap) MarshalLogArray(enc zapcore.ArrayEncoder) error

func (EdgeMap) String

func (v EdgeMap) String() string

String returns a readable string representation of EdgeMap.

func (EdgeMap) ToWire

func (v EdgeMap) ToWire() (wire.Value, error)

ToWire translates EdgeMap into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type Event

type Event struct {
	UUID *UUID      `json:"uuid,required"`
	Time *Timestamp `json:"time,omitempty"`
}

func (*Event) Equals

func (v *Event) Equals(rhs *Event) bool

Equals returns true if all the fields of this Event match the provided Event.

This function performs a deep comparison.

func (*Event) FromWire

func (v *Event) FromWire(w wire.Value) error

FromWire deserializes a Event struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a Event struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v Event
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*Event) GetTime

func (v *Event) GetTime() (o Timestamp)

GetTime returns the value of Time if it is set or its zero value if it is unset.

func (*Event) GetUUID

func (v *Event) GetUUID() (o *UUID)

GetUUID returns the value of UUID if it is set or its zero value if it is unset.

func (*Event) IsSetTime added in v1.14.0

func (v *Event) IsSetTime() bool

IsSetTime returns true if Time is not nil.

func (*Event) IsSetUUID added in v1.14.0

func (v *Event) IsSetUUID() bool

IsSetUUID returns true if UUID is not nil.

func (*Event) MarshalLogObject

func (v *Event) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Event.

func (*Event) String

func (v *Event) String() string

String returns a readable string representation of a Event struct.

func (*Event) ToWire

func (v *Event) ToWire() (wire.Value, error)

ToWire translates a Event struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type EventGroup

type EventGroup []*Event

func (EventGroup) Equals

func (lhs EventGroup) Equals(rhs EventGroup) bool

Equals returns true if this EventGroup is equal to the provided EventGroup.

func (*EventGroup) FromWire

func (v *EventGroup) FromWire(w wire.Value) error

FromWire deserializes EventGroup from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (EventGroup) MarshalLogArray

func (v EventGroup) MarshalLogArray(enc zapcore.ArrayEncoder) error

func (EventGroup) String

func (v EventGroup) String() string

String returns a readable string representation of EventGroup.

func (EventGroup) ToWire

func (v EventGroup) ToWire() (wire.Value, error)

ToWire translates EventGroup into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type FrameGroup

type FrameGroup []*structs.Frame

func (FrameGroup) Equals

func (lhs FrameGroup) Equals(rhs FrameGroup) bool

Equals returns true if this FrameGroup is equal to the provided FrameGroup.

func (*FrameGroup) FromWire

func (v *FrameGroup) FromWire(w wire.Value) error

FromWire deserializes FrameGroup from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (FrameGroup) MarshalLogArray

func (v FrameGroup) MarshalLogArray(enc zapcore.ArrayEncoder) error

func (FrameGroup) String

func (v FrameGroup) String() string

String returns a readable string representation of FrameGroup.

func (FrameGroup) ToWire

func (v FrameGroup) ToWire() (wire.Value, error)

ToWire translates FrameGroup into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type I128

type I128 struct {
	High int64 `json:"high,required"`
	Low  int64 `json:"low,required"`
}

func (*I128) Equals

func (v *I128) Equals(rhs *I128) bool

Equals returns true if all the fields of this I128 match the provided I128.

This function performs a deep comparison.

func (*I128) FromWire

func (v *I128) FromWire(w wire.Value) error

FromWire deserializes a I128 struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a I128 struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v I128
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*I128) GetHigh

func (v *I128) GetHigh() (o int64)

GetHigh returns the value of High if it is set or its zero value if it is unset.

func (*I128) GetLow

func (v *I128) GetLow() (o int64)

GetLow returns the value of Low if it is set or its zero value if it is unset.

func (*I128) MarshalLogObject

func (v *I128) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of I128.

func (*I128) String

func (v *I128) String() string

String returns a readable string representation of a I128 struct.

func (*I128) ToWire

func (v *I128) ToWire() (wire.Value, error)

ToWire translates a I128 struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type MyEnum

type MyEnum enums.EnumWithValues

func (MyEnum) Equals

func (lhs MyEnum) Equals(rhs MyEnum) bool

Equals returns true if this MyEnum is equal to the provided MyEnum.

func (*MyEnum) FromWire

func (v *MyEnum) FromWire(w wire.Value) error

FromWire deserializes MyEnum from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (MyEnum) MarshalLogObject

func (v MyEnum) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (MyEnum) Ptr added in v1.18.0

func (v MyEnum) Ptr() *MyEnum

MyEnumPtr returns a pointer to a MyEnum

func (MyEnum) String

func (v MyEnum) String() string

String returns a readable string representation of MyEnum.

func (MyEnum) ToWire

func (v MyEnum) ToWire() (wire.Value, error)

ToWire translates MyEnum into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type MyUUID added in v1.26.0

type MyUUID UUID

func (*MyUUID) Equals added in v1.26.0

func (lhs *MyUUID) Equals(rhs *MyUUID) bool

Equals returns true if this MyUUID is equal to the provided MyUUID.

func (*MyUUID) FromWire added in v1.26.0

func (v *MyUUID) FromWire(w wire.Value) error

FromWire deserializes MyUUID from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (*MyUUID) MarshalLogObject added in v1.26.0

func (v *MyUUID) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*MyUUID) String added in v1.26.0

func (v *MyUUID) String() string

String returns a readable string representation of MyUUID.

func (*MyUUID) ToWire added in v1.26.0

func (v *MyUUID) ToWire() (wire.Value, error)

ToWire translates MyUUID into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type PDF

type PDF []byte

func (PDF) Equals

func (lhs PDF) Equals(rhs PDF) bool

Equals returns true if this PDF is equal to the provided PDF.

func (*PDF) FromWire

func (v *PDF) FromWire(w wire.Value) error

FromWire deserializes PDF from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (PDF) String

func (v PDF) String() string

String returns a readable string representation of PDF.

func (PDF) ToWire

func (v PDF) ToWire() (wire.Value, error)

ToWire translates PDF into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type PointMap

type PointMap []struct {
	Key   *structs.Point
	Value *structs.Point
}

func (PointMap) Equals

func (lhs PointMap) Equals(rhs PointMap) bool

Equals returns true if this PointMap is equal to the provided PointMap.

func (*PointMap) FromWire

func (v *PointMap) FromWire(w wire.Value) error

FromWire deserializes PointMap from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (PointMap) MarshalLogArray

func (v PointMap) MarshalLogArray(enc zapcore.ArrayEncoder) error

func (PointMap) String

func (v PointMap) String() string

String returns a readable string representation of PointMap.

func (PointMap) ToWire

func (v PointMap) ToWire() (wire.Value, error)

ToWire translates PointMap into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type State

type State string

func (State) Equals

func (lhs State) Equals(rhs State) bool

Equals returns true if this State is equal to the provided State.

func (*State) FromWire

func (v *State) FromWire(w wire.Value) error

FromWire deserializes State from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (State) Ptr added in v1.18.0

func (v State) Ptr() *State

StatePtr returns a pointer to a State

func (State) String

func (v State) String() string

String returns a readable string representation of State.

func (State) ToWire

func (v State) ToWire() (wire.Value, error)

ToWire translates State into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type StateMap

type StateMap map[State]int64

func (StateMap) Equals

func (lhs StateMap) Equals(rhs StateMap) bool

Equals returns true if this StateMap is equal to the provided StateMap.

func (*StateMap) FromWire

func (v *StateMap) FromWire(w wire.Value) error

FromWire deserializes StateMap from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (StateMap) MarshalLogObject

func (v StateMap) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (StateMap) String

func (v StateMap) String() string

String returns a readable string representation of StateMap.

func (StateMap) ToWire

func (v StateMap) ToWire() (wire.Value, error)

ToWire translates StateMap into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type Timestamp deprecated

type Timestamp int64

Number of seconds since epoch.

Deprecated: Use ISOTime instead.

func (Timestamp) Equals

func (lhs Timestamp) Equals(rhs Timestamp) bool

Equals returns true if this Timestamp is equal to the provided Timestamp.

func (*Timestamp) FromWire

func (v *Timestamp) FromWire(w wire.Value) error

FromWire deserializes Timestamp from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (Timestamp) Ptr added in v1.18.0

func (v Timestamp) Ptr() *Timestamp

TimestampPtr returns a pointer to a Timestamp

func (Timestamp) String

func (v Timestamp) String() string

String returns a readable string representation of Timestamp.

func (Timestamp) ToWire

func (v Timestamp) ToWire() (wire.Value, error)

ToWire translates Timestamp into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type Transition

type Transition struct {
	FromState State      `json:"fromState,required"`
	ToState   State      `json:"toState,required"`
	Events    EventGroup `json:"events,omitempty"`
}

func (*Transition) Equals

func (v *Transition) Equals(rhs *Transition) bool

Equals returns true if all the fields of this Transition match the provided Transition.

This function performs a deep comparison.

func (*Transition) FromWire

func (v *Transition) FromWire(w wire.Value) error

FromWire deserializes a Transition struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a Transition struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v Transition
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*Transition) GetEvents

func (v *Transition) GetEvents() (o EventGroup)

GetEvents returns the value of Events if it is set or its zero value if it is unset.

func (*Transition) GetFromState

func (v *Transition) GetFromState() (o State)

GetFromState returns the value of FromState if it is set or its zero value if it is unset.

func (*Transition) GetToState

func (v *Transition) GetToState() (o State)

GetToState returns the value of ToState if it is set or its zero value if it is unset.

func (*Transition) IsSetEvents added in v1.14.0

func (v *Transition) IsSetEvents() bool

IsSetEvents returns true if Events is not nil.

func (*Transition) MarshalLogObject

func (v *Transition) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Transition.

func (*Transition) String

func (v *Transition) String() string

String returns a readable string representation of a Transition struct.

func (*Transition) ToWire

func (v *Transition) ToWire() (wire.Value, error)

ToWire translates a Transition struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type TransitiveTypedefField added in v1.26.0

type TransitiveTypedefField struct {
	DefUUID *MyUUID `json:"defUUID,required"`
}

func (*TransitiveTypedefField) Equals added in v1.26.0

Equals returns true if all the fields of this TransitiveTypedefField match the provided TransitiveTypedefField.

This function performs a deep comparison.

func (*TransitiveTypedefField) FromWire added in v1.26.0

func (v *TransitiveTypedefField) FromWire(w wire.Value) error

FromWire deserializes a TransitiveTypedefField struct from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

An error is returned if we were unable to build a TransitiveTypedefField struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v TransitiveTypedefField
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*TransitiveTypedefField) GetDefUUID added in v1.26.0

func (v *TransitiveTypedefField) GetDefUUID() (o *MyUUID)

GetDefUUID returns the value of DefUUID if it is set or its zero value if it is unset.

func (*TransitiveTypedefField) IsSetDefUUID added in v1.26.0

func (v *TransitiveTypedefField) IsSetDefUUID() bool

IsSetDefUUID returns true if DefUUID is not nil.

func (*TransitiveTypedefField) MarshalLogObject added in v1.26.0

func (v *TransitiveTypedefField) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of TransitiveTypedefField.

func (*TransitiveTypedefField) String added in v1.26.0

func (v *TransitiveTypedefField) String() string

String returns a readable string representation of a TransitiveTypedefField struct.

func (*TransitiveTypedefField) ToWire added in v1.26.0

func (v *TransitiveTypedefField) ToWire() (wire.Value, error)

ToWire translates a TransitiveTypedefField struct into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

An error is returned if the struct or any of its fields failed to validate.

x, err := v.ToWire()
if err != nil {
  return err
}

if err := binaryProtocol.Encode(x, writer); err != nil {
  return err
}

type UUID

type UUID I128

func (*UUID) Equals

func (lhs *UUID) Equals(rhs *UUID) bool

Equals returns true if this UUID is equal to the provided UUID.

func (*UUID) FromWire

func (v *UUID) FromWire(w wire.Value) error

FromWire deserializes UUID from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (*UUID) MarshalLogObject

func (v *UUID) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*UUID) String

func (v *UUID) String() string

String returns a readable string representation of UUID.

func (*UUID) ToWire

func (v *UUID) ToWire() (wire.Value, error)

ToWire translates UUID into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

Jump to

Keyboard shortcuts

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