Documentation
¶
Index ¶
- type Message
- func (v *Message) Equals(rhs *Message) bool
- func (v *Message) FromWire(w wire.Value) error
- func (v Message) MarshalEasyJSON(w *jwriter.Writer)
- func (v Message) MarshalJSON() ([]byte, error)
- func (v *Message) String() string
- func (v *Message) ToWire() (wire.Value, error)
- func (v *Message) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *Message) UnmarshalJSON(data []byte) error
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) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Message) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
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 }
func (*Message) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Message) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface