Back to godoc.org

Package uuid_conflict

v1.20.2
Latest Go to latest

The latest major version is v1.

Published: Oct 17, 2019 | License: MIT | Module: gopkg.in/thriftrw/thriftrw-go.v1

Index

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.

type UUID

type UUID string

func (UUID) Equals

func (lhs UUID) Equals(rhs UUID) bool

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

func (*UUID) FromWire

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) Ptr

func (v UUID) Ptr() *UUID

UUIDPtr returns a pointer to a UUID

func (UUID) String

func (v UUID) String() string

String returns a readable string representation of UUID.

func (UUID) ToWire

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.

type UUIDConflict

type UUIDConflict struct {
	LocalUUID    UUID           `json:"localUUID,required"`
	ImportedUUID *typedefs.UUID `json:"importedUUID,required"`
}

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

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
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier