Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ThriftModule = &thriftreflect.ThriftModule{
Name: "non_hyphenated",
Package: "go.uber.org/thriftrw/gen/internal/tests/non_hyphenated",
FilePath: "non_hyphenated.thrift",
SHA1: "5cbe76400805b1c5a248631c4ad87e3dfe6f183e",
Raw: rawIDL,
}
ThriftModule represents the IDL file used to generate this package.
Functions ¶
This section is empty.
Types ¶
type First ¶
type First struct { }
func (*First) Equals ¶
Equals returns true if all the fields of this First match the provided First.
This function performs a deep comparison.
func (*First) FromWire ¶
FromWire deserializes a First 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 First struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v First if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*First) MarshalLogObject ¶
func (v *First) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of First.
func (*First) ToWire ¶
ToWire translates a First 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 Second ¶
type Second struct { }
func (*Second) Equals ¶
Equals returns true if all the fields of this Second match the provided Second.
This function performs a deep comparison.
func (*Second) FromWire ¶
FromWire deserializes a Second 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 Second struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v Second if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*Second) MarshalLogObject ¶
func (v *Second) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Second.
func (*Second) ToWire ¶
ToWire translates a Second 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 }