thriftrw: go.uber.org/thriftrw/gen/internal/tests/typedefs Index | Files

package typedefs

import "go.uber.org/thriftrw/gen/internal/tests/typedefs"

Index

Package Files

typedefs.go

Variables

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

ThriftModule represents the IDL file used to generate this package.

type BinarySet Uses

type BinarySet [][]byte

func (BinarySet) Equals Uses

func (lhs BinarySet) Equals(rhs BinarySet) bool

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

func (*BinarySet) FromWire Uses

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 Uses

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

func (BinarySet) String Uses

func (v BinarySet) String() string

String returns a readable string representation of BinarySet.

func (BinarySet) ToWire Uses

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 Uses

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

func Default_DefaultPrimitiveTypedef Uses

func Default_DefaultPrimitiveTypedef() *DefaultPrimitiveTypedef

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

func (*DefaultPrimitiveTypedef) Equals Uses

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

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

This function performs a deep comparison.

func (*DefaultPrimitiveTypedef) FromWire Uses

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 Uses

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 Uses

func (v *DefaultPrimitiveTypedef) IsSetState() bool

IsSetState returns true if State is not nil.

func (*DefaultPrimitiveTypedef) MarshalLogObject Uses

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

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

func (*DefaultPrimitiveTypedef) String Uses

func (v *DefaultPrimitiveTypedef) String() string

String returns a readable string representation of a DefaultPrimitiveTypedef struct.

func (*DefaultPrimitiveTypedef) ToWire Uses

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 Uses

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

func (EdgeMap) Equals Uses

func (lhs EdgeMap) Equals(rhs EdgeMap) bool

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

func (*EdgeMap) FromWire Uses

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 Uses

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

func (EdgeMap) String Uses

func (v EdgeMap) String() string

String returns a readable string representation of EdgeMap.

func (EdgeMap) ToWire Uses

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 Uses

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

func (*Event) Equals Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (v *Event) IsSetTime() bool

IsSetTime returns true if Time is not nil.

func (*Event) IsSetUUID Uses

func (v *Event) IsSetUUID() bool

IsSetUUID returns true if UUID is not nil.

func (*Event) MarshalLogObject Uses

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

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

func (*Event) String Uses

func (v *Event) String() string

String returns a readable string representation of a Event struct.

func (*Event) ToWire Uses

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 Uses

type EventGroup []*Event

func (EventGroup) Equals Uses

func (lhs EventGroup) Equals(rhs EventGroup) bool

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

func (*EventGroup) FromWire Uses

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 Uses

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

func (EventGroup) String Uses

func (v EventGroup) String() string

String returns a readable string representation of EventGroup.

func (EventGroup) ToWire Uses

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 Uses

type FrameGroup []*structs.Frame

func (FrameGroup) Equals Uses

func (lhs FrameGroup) Equals(rhs FrameGroup) bool

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

func (*FrameGroup) FromWire Uses

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 Uses

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

func (FrameGroup) String Uses

func (v FrameGroup) String() string

String returns a readable string representation of FrameGroup.

func (FrameGroup) ToWire Uses

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 Uses

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

func (*I128) Equals Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

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

func (*I128) String Uses

func (v *I128) String() string

String returns a readable string representation of a I128 struct.

func (*I128) ToWire Uses

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 Uses

type MyEnum enums.EnumWithValues

func (MyEnum) Equals Uses

func (lhs MyEnum) Equals(rhs MyEnum) bool

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

func (*MyEnum) FromWire Uses

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 Uses

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

func (MyEnum) Ptr Uses

func (v MyEnum) Ptr() *MyEnum

MyEnumPtr returns a pointer to a MyEnum

func (MyEnum) String Uses

func (v MyEnum) String() string

String returns a readable string representation of MyEnum.

func (MyEnum) ToWire Uses

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 PDF Uses

type PDF []byte

func (PDF) Equals Uses

func (lhs PDF) Equals(rhs PDF) bool

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

func (*PDF) FromWire Uses

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 Uses

func (v PDF) String() string

String returns a readable string representation of PDF.

func (PDF) ToWire Uses

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 Uses

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

func (PointMap) Equals Uses

func (lhs PointMap) Equals(rhs PointMap) bool

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

func (*PointMap) FromWire Uses

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 Uses

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

func (PointMap) String Uses

func (v PointMap) String() string

String returns a readable string representation of PointMap.

func (PointMap) ToWire Uses

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 Uses

type State string

func (State) Equals Uses

func (lhs State) Equals(rhs State) bool

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

func (*State) FromWire Uses

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 Uses

func (v State) Ptr() *State

StatePtr returns a pointer to a State

func (State) String Uses

func (v State) String() string

String returns a readable string representation of State.

func (State) ToWire Uses

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 Uses

type StateMap map[State]int64

func (StateMap) Equals Uses

func (lhs StateMap) Equals(rhs StateMap) bool

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

func (*StateMap) FromWire Uses

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 Uses

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

func (StateMap) String Uses

func (v StateMap) String() string

String returns a readable string representation of StateMap.

func (StateMap) ToWire Uses

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 Uses

type Timestamp int64

Number of seconds since epoch.

Deprecated: Use ISOTime instead.

func (Timestamp) Equals Uses

func (lhs Timestamp) Equals(rhs Timestamp) bool

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

func (*Timestamp) FromWire Uses

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 Uses

func (v Timestamp) Ptr() *Timestamp

TimestampPtr returns a pointer to a Timestamp

func (Timestamp) String Uses

func (v Timestamp) String() string

String returns a readable string representation of Timestamp.

func (Timestamp) ToWire Uses

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 Uses

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

func (*Transition) Equals Uses

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 Uses

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 Uses

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 Uses

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 Uses

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 Uses

func (v *Transition) IsSetEvents() bool

IsSetEvents returns true if Events is not nil.

func (*Transition) MarshalLogObject Uses

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

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

func (*Transition) String Uses

func (v *Transition) String() string

String returns a readable string representation of a Transition struct.

func (*Transition) ToWire Uses

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 UUID Uses

type UUID I128

func (*UUID) Equals Uses

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

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

func (*UUID) FromWire Uses

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 Uses

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

func (*UUID) String Uses

func (v *UUID) String() string

String returns a readable string representation of UUID.

func (*UUID) ToWire Uses

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.

Package typedefs imports 11 packages (graph) and is imported by 8 packages. Updated 2020-07-01. Refresh now. Tools for package owners.