Documentation ¶
Index ¶
- Variables
- type UUID
- type UUIDConflict
- func (v *UUIDConflict) Decode(sr stream.Reader) error
- func (v *UUIDConflict) Encode(sw stream.Writer) error
- func (v *UUIDConflict) Equals(rhs *UUIDConflict) bool
- func (v *UUIDConflict) FromWire(w wire.Value) error
- func (v *UUIDConflict) GetImportedUUID() (o *typedefs.UUID)
- func (v *UUIDConflict) GetLocalUUID() (o UUID)
- func (v *UUIDConflict) IsSetImportedUUID() bool
- func (v *UUIDConflict) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
- func (v *UUIDConflict) String() string
- func (v *UUIDConflict) ToWire() (wire.Value, error)
Constants ¶
This section is empty.
Variables ¶
var ThriftModule = &thriftreflect.ThriftModule{ Name: "uuid_conflict", Package: "go.uber.org/thriftrw/gen/internal/tests/uuid_conflict", FilePath: "uuid_conflict.thrift", SHA1: "c7ab8450f4c3a548cde8938fe7e150cf1b8f9493", Includes: []*thriftreflect.ThriftModule{ typedefs.ThriftModule, }, Raw: rawIDL, }
ThriftModule represents the IDL file used to generate this package.
Functions ¶
This section is empty.
Types ¶
type UUID ¶
type UUID string
func (*UUID) FromWire ¶
FromWire deserializes UUID from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.
type UUIDConflict ¶
type UUIDConflict struct { LocalUUID UUID `json:"localUUID,required"` ImportedUUID *typedefs.UUID `json:"importedUUID,required"` }
func (*UUIDConflict) Decode ¶ added in v1.29.0
func (v *UUIDConflict) Decode(sr stream.Reader) error
Decode deserializes a UUIDConflict struct directly from its Thrift-level representation, without going through an intemediary type.
An error is returned if a UUIDConflict struct could not be generated from the wire representation.
func (*UUIDConflict) Encode ¶ added in v1.29.0
func (v *UUIDConflict) Encode(sw stream.Writer) error
Encode serializes a UUIDConflict struct directly into bytes, without going through an intermediary type.
An error is returned if a UUIDConflict struct could not be encoded.
func (*UUIDConflict) Equals ¶
func (v *UUIDConflict) Equals(rhs *UUIDConflict) bool
Equals returns true if all the fields of this UUIDConflict match the provided UUIDConflict.
This function performs a deep comparison.
func (*UUIDConflict) FromWire ¶
func (v *UUIDConflict) FromWire(w wire.Value) error
FromWire deserializes a UUIDConflict 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 UUIDConflict struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v UUIDConflict if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*UUIDConflict) GetImportedUUID ¶
func (v *UUIDConflict) GetImportedUUID() (o *typedefs.UUID)
GetImportedUUID returns the value of ImportedUUID if it is set or its zero value if it is unset.
func (*UUIDConflict) GetLocalUUID ¶
func (v *UUIDConflict) GetLocalUUID() (o UUID)
GetLocalUUID returns the value of LocalUUID if it is set or its zero value if it is unset.
func (*UUIDConflict) IsSetImportedUUID ¶ added in v1.14.0
func (v *UUIDConflict) IsSetImportedUUID() bool
IsSetImportedUUID returns true if ImportedUUID is not nil.
func (*UUIDConflict) MarshalLogObject ¶
func (v *UUIDConflict) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of UUIDConflict.
func (*UUIDConflict) String ¶
func (v *UUIDConflict) String() string
String returns a readable string representation of a UUIDConflict struct.
func (*UUIDConflict) ToWire ¶
func (v *UUIDConflict) ToWire() (wire.Value, error)
ToWire translates a UUIDConflict 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 }