Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
Body string `json:"body,required"`
}
func (*Message) Equals ¶
Equals returns true if all the fields of this Message match the provided Message.
This function performs a deep comparison.
func (*Message) FromWire ¶
FromWire deserializes a Message 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 Message struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v Message if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*Message) GetBody ¶ added in v0.1.1
GetBody returns the value of Body if it is set or its zero value if it is unset.
func (*Message) MarshalLogObject ¶ added in v0.2.0
func (v *Message) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Message.
func (*Message) ToWire ¶
ToWire translates a Message 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 }