thriftrw: go.uber.org/thriftrw/gen/internal/tests/collision Index | Files

package collision

import "go.uber.org/thriftrw/gen/internal/tests/collision"

Index

Package Files

collision.go

Variables

var ThriftModule = &thriftreflect.ThriftModule{
    Name:     "collision",
    Package:  "go.uber.org/thriftrw/gen/internal/tests/collision",
    FilePath: "collision.thrift",
    SHA1:     "b7ffef8f5aede3fbc4440cadb2f225e474797f2d",
    Raw:      rawIDL,
}

ThriftModule represents the IDL file used to generate this package.

type AccessorConflict Uses

type AccessorConflict struct {
    Name       *string `json:"name,omitempty"`
    GetName2   *string `json:"get_name,omitempty"`
    IsSetName2 *bool   `json:"is_set_name,omitempty"`
}

func (*AccessorConflict) Equals Uses

func (v *AccessorConflict) Equals(rhs *AccessorConflict) bool

Equals returns true if all the fields of this AccessorConflict match the provided AccessorConflict.

This function performs a deep comparison.

func (*AccessorConflict) FromWire Uses

func (v *AccessorConflict) FromWire(w wire.Value) error

FromWire deserializes a AccessorConflict 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 AccessorConflict struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v AccessorConflict
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*AccessorConflict) GetGetName2 Uses

func (v *AccessorConflict) GetGetName2() (o string)

GetGetName2 returns the value of GetName2 if it is set or its zero value if it is unset.

func (*AccessorConflict) GetIsSetName2 Uses

func (v *AccessorConflict) GetIsSetName2() (o bool)

GetIsSetName2 returns the value of IsSetName2 if it is set or its zero value if it is unset.

func (*AccessorConflict) GetName Uses

func (v *AccessorConflict) GetName() (o string)

GetName returns the value of Name if it is set or its zero value if it is unset.

func (*AccessorConflict) IsSetGetName2 Uses

func (v *AccessorConflict) IsSetGetName2() bool

IsSetGetName2 returns true if GetName2 is not nil.

func (*AccessorConflict) IsSetIsSetName2 Uses

func (v *AccessorConflict) IsSetIsSetName2() bool

IsSetIsSetName2 returns true if IsSetName2 is not nil.

func (*AccessorConflict) IsSetName Uses

func (v *AccessorConflict) IsSetName() bool

IsSetName returns true if Name is not nil.

func (*AccessorConflict) MarshalLogObject Uses

func (v *AccessorConflict) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of AccessorConflict.

func (*AccessorConflict) String Uses

func (v *AccessorConflict) String() string

String returns a readable string representation of a AccessorConflict struct.

func (*AccessorConflict) ToWire Uses

func (v *AccessorConflict) ToWire() (wire.Value, error)

ToWire translates a AccessorConflict 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 AccessorNoConflict Uses

type AccessorNoConflict struct {
    Getname *string `json:"getname,omitempty"`
    GetName *string `json:"get_name,omitempty"`
}

func (*AccessorNoConflict) Equals Uses

func (v *AccessorNoConflict) Equals(rhs *AccessorNoConflict) bool

Equals returns true if all the fields of this AccessorNoConflict match the provided AccessorNoConflict.

This function performs a deep comparison.

func (*AccessorNoConflict) FromWire Uses

func (v *AccessorNoConflict) FromWire(w wire.Value) error

FromWire deserializes a AccessorNoConflict 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 AccessorNoConflict struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v AccessorNoConflict
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*AccessorNoConflict) GetGetName Uses

func (v *AccessorNoConflict) GetGetName() (o string)

GetGetName returns the value of GetName if it is set or its zero value if it is unset.

func (*AccessorNoConflict) GetGetname Uses

func (v *AccessorNoConflict) GetGetname() (o string)

GetGetname returns the value of Getname if it is set or its zero value if it is unset.

func (*AccessorNoConflict) IsSetGetName Uses

func (v *AccessorNoConflict) IsSetGetName() bool

IsSetGetName returns true if GetName is not nil.

func (*AccessorNoConflict) IsSetGetname Uses

func (v *AccessorNoConflict) IsSetGetname() bool

IsSetGetname returns true if Getname is not nil.

func (*AccessorNoConflict) MarshalLogObject Uses

func (v *AccessorNoConflict) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of AccessorNoConflict.

func (*AccessorNoConflict) String Uses

func (v *AccessorNoConflict) String() string

String returns a readable string representation of a AccessorNoConflict struct.

func (*AccessorNoConflict) ToWire Uses

func (v *AccessorNoConflict) ToWire() (wire.Value, error)

ToWire translates a AccessorNoConflict 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 LittlePotatoe Uses

type LittlePotatoe int64

func (LittlePotatoe) Equals Uses

func (lhs LittlePotatoe) Equals(rhs LittlePotatoe) bool

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

func (*LittlePotatoe) FromWire Uses

func (v *LittlePotatoe) FromWire(w wire.Value) error

FromWire deserializes LittlePotatoe from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (LittlePotatoe) Ptr Uses

func (v LittlePotatoe) Ptr() *LittlePotatoe

LittlePotatoePtr returns a pointer to a LittlePotatoe

func (LittlePotatoe) String Uses

func (v LittlePotatoe) String() string

String returns a readable string representation of LittlePotatoe.

func (LittlePotatoe) ToWire Uses

func (v LittlePotatoe) ToWire() (wire.Value, error)

ToWire translates LittlePotatoe into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type LittlePotatoe2 Uses

type LittlePotatoe2 float64

func (LittlePotatoe2) Equals Uses

func (lhs LittlePotatoe2) Equals(rhs LittlePotatoe2) bool

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

func (*LittlePotatoe2) FromWire Uses

func (v *LittlePotatoe2) FromWire(w wire.Value) error

FromWire deserializes LittlePotatoe2 from its Thrift-level representation. The Thrift-level representation may be obtained from a ThriftRW protocol implementation.

func (LittlePotatoe2) Ptr Uses

func (v LittlePotatoe2) Ptr() *LittlePotatoe2

LittlePotatoe2Ptr returns a pointer to a LittlePotatoe2

func (LittlePotatoe2) String Uses

func (v LittlePotatoe2) String() string

String returns a readable string representation of LittlePotatoe2.

func (LittlePotatoe2) ToWire Uses

func (v LittlePotatoe2) ToWire() (wire.Value, error)

ToWire translates LittlePotatoe2 into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

type MyEnum Uses

type MyEnum int32
const (
    MyEnumX       MyEnum = 123
    MyEnumY       MyEnum = 456
    MyEnumZ       MyEnum = 789
    MyEnumFooBar  MyEnum = 790
    MyEnumFooBar2 MyEnum = 791
)

func MyEnum_Values Uses

func MyEnum_Values() []MyEnum

MyEnum_Values returns all recognized values of MyEnum.

func (MyEnum) Equals Uses

func (v MyEnum) Equals(rhs MyEnum) bool

Equals returns true if this MyEnum value matches the provided value.

func (*MyEnum) FromWire Uses

func (v *MyEnum) FromWire(w wire.Value) error

FromWire deserializes MyEnum from its Thrift-level representation.

x, err := binaryProtocol.Decode(reader, wire.TI32)
if err != nil {
  return MyEnum(0), err
}

var v MyEnum
if err := v.FromWire(x); err != nil {
  return MyEnum(0), err
}
return v, nil

func (MyEnum) MarshalJSON Uses

func (v MyEnum) MarshalJSON() ([]byte, error)

MarshalJSON serializes MyEnum into JSON.

If the enum value is recognized, its name is returned. Otherwise, its integer value is returned.

This implements json.Marshaler.

func (MyEnum) MarshalLogObject Uses

func (v MyEnum) MarshalLogObject(enc zapcore.ObjectEncoder) error

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of MyEnum. Enums are logged as objects, where the value is logged with key "value", and if this value's name is known, the name is logged with key "name".

func (MyEnum) MarshalText Uses

func (v MyEnum) MarshalText() ([]byte, error)

MarshalText encodes MyEnum to text.

If the enum value is recognized, its name is returned. Otherwise, its integer value is returned.

This implements the TextMarshaler interface.

func (MyEnum) Ptr Uses

func (v MyEnum) Ptr() *MyEnum

Ptr returns a pointer to this enum value.

func (MyEnum) String Uses

func (v MyEnum) String() string

String returns a readable string representation of MyEnum.

func (MyEnum) ToWire Uses

func (v MyEnum) ToWire() (wire.Value, error)

ToWire translates MyEnum into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

Enums are represented as 32-bit integers over the wire.

func (*MyEnum) UnmarshalJSON Uses

func (v *MyEnum) UnmarshalJSON(text []byte) error

UnmarshalJSON attempts to decode MyEnum from its JSON representation.

This implementation supports both, numeric and string inputs. If a string is provided, it must be a known enum name.

This implements json.Unmarshaler.

func (*MyEnum) UnmarshalText Uses

func (v *MyEnum) UnmarshalText(value []byte) error

UnmarshalText tries to decode MyEnum from a byte slice containing its name.

var v MyEnum
err := v.UnmarshalText([]byte("X"))

type MyEnum2 Uses

type MyEnum2 int32
const (
    MyEnum2X MyEnum2 = 12
    MyEnum2Y MyEnum2 = 34
    MyEnum2Z MyEnum2 = 56
)

func MyEnum2_Values Uses

func MyEnum2_Values() []MyEnum2

MyEnum2_Values returns all recognized values of MyEnum2.

func (MyEnum2) Equals Uses

func (v MyEnum2) Equals(rhs MyEnum2) bool

Equals returns true if this MyEnum2 value matches the provided value.

func (*MyEnum2) FromWire Uses

func (v *MyEnum2) FromWire(w wire.Value) error

FromWire deserializes MyEnum2 from its Thrift-level representation.

x, err := binaryProtocol.Decode(reader, wire.TI32)
if err != nil {
  return MyEnum2(0), err
}

var v MyEnum2
if err := v.FromWire(x); err != nil {
  return MyEnum2(0), err
}
return v, nil

func (MyEnum2) MarshalJSON Uses

func (v MyEnum2) MarshalJSON() ([]byte, error)

MarshalJSON serializes MyEnum2 into JSON.

If the enum value is recognized, its name is returned. Otherwise, its integer value is returned.

This implements json.Marshaler.

func (MyEnum2) MarshalLogObject Uses

func (v MyEnum2) MarshalLogObject(enc zapcore.ObjectEncoder) error

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of MyEnum2. Enums are logged as objects, where the value is logged with key "value", and if this value's name is known, the name is logged with key "name".

func (MyEnum2) MarshalText Uses

func (v MyEnum2) MarshalText() ([]byte, error)

MarshalText encodes MyEnum2 to text.

If the enum value is recognized, its name is returned. Otherwise, its integer value is returned.

This implements the TextMarshaler interface.

func (MyEnum2) Ptr Uses

func (v MyEnum2) Ptr() *MyEnum2

Ptr returns a pointer to this enum value.

func (MyEnum2) String Uses

func (v MyEnum2) String() string

String returns a readable string representation of MyEnum2.

func (MyEnum2) ToWire Uses

func (v MyEnum2) ToWire() (wire.Value, error)

ToWire translates MyEnum2 into a Thrift-level intermediate representation. This intermediate representation may be serialized into bytes using a ThriftRW protocol implementation.

Enums are represented as 32-bit integers over the wire.

func (*MyEnum2) UnmarshalJSON Uses

func (v *MyEnum2) UnmarshalJSON(text []byte) error

UnmarshalJSON attempts to decode MyEnum2 from its JSON representation.

This implementation supports both, numeric and string inputs. If a string is provided, it must be a known enum name.

This implements json.Unmarshaler.

func (*MyEnum2) UnmarshalText Uses

func (v *MyEnum2) UnmarshalText(value []byte) error

UnmarshalText tries to decode MyEnum2 from a byte slice containing its name.

var v MyEnum2
err := v.UnmarshalText([]byte("X"))

type PrimitiveContainers Uses

type PrimitiveContainers struct {
    A   []string            `json:"ListOrSetOrMap,omitempty"`
    B   map[string]struct{} `json:"List_Or_SetOrMap,omitempty"`
    C   map[string]string   `json:"ListOrSet_Or_Map,omitempty"`
}

func (*PrimitiveContainers) Equals Uses

func (v *PrimitiveContainers) Equals(rhs *PrimitiveContainers) bool

Equals returns true if all the fields of this PrimitiveContainers match the provided PrimitiveContainers.

This function performs a deep comparison.

func (*PrimitiveContainers) FromWire Uses

func (v *PrimitiveContainers) FromWire(w wire.Value) error

FromWire deserializes a PrimitiveContainers 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 PrimitiveContainers struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v PrimitiveContainers
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*PrimitiveContainers) GetA Uses

func (v *PrimitiveContainers) GetA() (o []string)

GetA returns the value of A if it is set or its zero value if it is unset.

func (*PrimitiveContainers) GetB Uses

func (v *PrimitiveContainers) GetB() (o map[string]struct{})

GetB returns the value of B if it is set or its zero value if it is unset.

func (*PrimitiveContainers) GetC Uses

func (v *PrimitiveContainers) GetC() (o map[string]string)

GetC returns the value of C if it is set or its zero value if it is unset.

func (*PrimitiveContainers) IsSetA Uses

func (v *PrimitiveContainers) IsSetA() bool

IsSetA returns true if A is not nil.

func (*PrimitiveContainers) IsSetB Uses

func (v *PrimitiveContainers) IsSetB() bool

IsSetB returns true if B is not nil.

func (*PrimitiveContainers) IsSetC Uses

func (v *PrimitiveContainers) IsSetC() bool

IsSetC returns true if C is not nil.

func (*PrimitiveContainers) MarshalLogObject Uses

func (v *PrimitiveContainers) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of PrimitiveContainers.

func (*PrimitiveContainers) String Uses

func (v *PrimitiveContainers) String() string

String returns a readable string representation of a PrimitiveContainers struct.

func (*PrimitiveContainers) ToWire Uses

func (v *PrimitiveContainers) ToWire() (wire.Value, error)

ToWire translates a PrimitiveContainers 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 StructCollision Uses

type StructCollision struct {
    CollisionField  bool   `json:"collisionField,required"`
    CollisionField2 string `json:"collision_field,required"`
}

func (*StructCollision) Equals Uses

func (v *StructCollision) Equals(rhs *StructCollision) bool

Equals returns true if all the fields of this StructCollision match the provided StructCollision.

This function performs a deep comparison.

func (*StructCollision) FromWire Uses

func (v *StructCollision) FromWire(w wire.Value) error

FromWire deserializes a StructCollision 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 StructCollision struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v StructCollision
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*StructCollision) GetCollisionField Uses

func (v *StructCollision) GetCollisionField() (o bool)

GetCollisionField returns the value of CollisionField if it is set or its zero value if it is unset.

func (*StructCollision) GetCollisionField2 Uses

func (v *StructCollision) GetCollisionField2() (o string)

GetCollisionField2 returns the value of CollisionField2 if it is set or its zero value if it is unset.

func (*StructCollision) MarshalLogObject Uses

func (v *StructCollision) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of StructCollision.

func (*StructCollision) String Uses

func (v *StructCollision) String() string

String returns a readable string representation of a StructCollision struct.

func (*StructCollision) ToWire Uses

func (v *StructCollision) ToWire() (wire.Value, error)

ToWire translates a StructCollision 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 StructCollision2 Uses

type StructCollision2 struct {
    CollisionField  bool   `json:"collisionField,required"`
    CollisionField2 string `json:"collision_field,required"`
}
var StructConstant *StructCollision2 = &StructCollision2{
    CollisionField:  false,
    CollisionField2: "false indeed",
}

func (*StructCollision2) Equals Uses

func (v *StructCollision2) Equals(rhs *StructCollision2) bool

Equals returns true if all the fields of this StructCollision2 match the provided StructCollision2.

This function performs a deep comparison.

func (*StructCollision2) FromWire Uses

func (v *StructCollision2) FromWire(w wire.Value) error

FromWire deserializes a StructCollision2 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 StructCollision2 struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v StructCollision2
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*StructCollision2) GetCollisionField Uses

func (v *StructCollision2) GetCollisionField() (o bool)

GetCollisionField returns the value of CollisionField if it is set or its zero value if it is unset.

func (*StructCollision2) GetCollisionField2 Uses

func (v *StructCollision2) GetCollisionField2() (o string)

GetCollisionField2 returns the value of CollisionField2 if it is set or its zero value if it is unset.

func (*StructCollision2) MarshalLogObject Uses

func (v *StructCollision2) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of StructCollision2.

func (*StructCollision2) String Uses

func (v *StructCollision2) String() string

String returns a readable string representation of a StructCollision2 struct.

func (*StructCollision2) ToWire Uses

func (v *StructCollision2) ToWire() (wire.Value, error)

ToWire translates a StructCollision2 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 UnionCollision Uses

type UnionCollision struct {
    CollisionField  *bool   `json:"collisionField,omitempty"`
    CollisionField2 *string `json:"collision_field,omitempty"`
}

func (*UnionCollision) Equals Uses

func (v *UnionCollision) Equals(rhs *UnionCollision) bool

Equals returns true if all the fields of this UnionCollision match the provided UnionCollision.

This function performs a deep comparison.

func (*UnionCollision) FromWire Uses

func (v *UnionCollision) FromWire(w wire.Value) error

FromWire deserializes a UnionCollision 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 UnionCollision struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v UnionCollision
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*UnionCollision) GetCollisionField Uses

func (v *UnionCollision) GetCollisionField() (o bool)

GetCollisionField returns the value of CollisionField if it is set or its zero value if it is unset.

func (*UnionCollision) GetCollisionField2 Uses

func (v *UnionCollision) GetCollisionField2() (o string)

GetCollisionField2 returns the value of CollisionField2 if it is set or its zero value if it is unset.

func (*UnionCollision) IsSetCollisionField Uses

func (v *UnionCollision) IsSetCollisionField() bool

IsSetCollisionField returns true if CollisionField is not nil.

func (*UnionCollision) IsSetCollisionField2 Uses

func (v *UnionCollision) IsSetCollisionField2() bool

IsSetCollisionField2 returns true if CollisionField2 is not nil.

func (*UnionCollision) MarshalLogObject Uses

func (v *UnionCollision) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of UnionCollision.

func (*UnionCollision) String Uses

func (v *UnionCollision) String() string

String returns a readable string representation of a UnionCollision struct.

func (*UnionCollision) ToWire Uses

func (v *UnionCollision) ToWire() (wire.Value, error)

ToWire translates a UnionCollision 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 UnionCollision2 Uses

type UnionCollision2 struct {
    CollisionField  *bool   `json:"collisionField,omitempty"`
    CollisionField2 *string `json:"collision_field,omitempty"`
}

func (*UnionCollision2) Equals Uses

func (v *UnionCollision2) Equals(rhs *UnionCollision2) bool

Equals returns true if all the fields of this UnionCollision2 match the provided UnionCollision2.

This function performs a deep comparison.

func (*UnionCollision2) FromWire Uses

func (v *UnionCollision2) FromWire(w wire.Value) error

FromWire deserializes a UnionCollision2 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 UnionCollision2 struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v UnionCollision2
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*UnionCollision2) GetCollisionField Uses

func (v *UnionCollision2) GetCollisionField() (o bool)

GetCollisionField returns the value of CollisionField if it is set or its zero value if it is unset.

func (*UnionCollision2) GetCollisionField2 Uses

func (v *UnionCollision2) GetCollisionField2() (o string)

GetCollisionField2 returns the value of CollisionField2 if it is set or its zero value if it is unset.

func (*UnionCollision2) IsSetCollisionField Uses

func (v *UnionCollision2) IsSetCollisionField() bool

IsSetCollisionField returns true if CollisionField is not nil.

func (*UnionCollision2) IsSetCollisionField2 Uses

func (v *UnionCollision2) IsSetCollisionField2() bool

IsSetCollisionField2 returns true if CollisionField2 is not nil.

func (*UnionCollision2) MarshalLogObject Uses

func (v *UnionCollision2) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of UnionCollision2.

func (*UnionCollision2) String Uses

func (v *UnionCollision2) String() string

String returns a readable string representation of a UnionCollision2 struct.

func (*UnionCollision2) ToWire Uses

func (v *UnionCollision2) ToWire() (wire.Value, error)

ToWire translates a UnionCollision2 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 WithDefault Uses

type WithDefault struct {
    Pouet *StructCollision2 `json:"pouet,omitempty"`
}

func Default_WithDefault Uses

func Default_WithDefault() *WithDefault

Default_WithDefault constructs a new WithDefault struct, pre-populating any fields with defined default values.

func (*WithDefault) Equals Uses

func (v *WithDefault) Equals(rhs *WithDefault) bool

Equals returns true if all the fields of this WithDefault match the provided WithDefault.

This function performs a deep comparison.

func (*WithDefault) FromWire Uses

func (v *WithDefault) FromWire(w wire.Value) error

FromWire deserializes a WithDefault 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 WithDefault struct from the provided intermediate representation.

x, err := binaryProtocol.Decode(reader, wire.TStruct)
if err != nil {
  return nil, err
}

var v WithDefault
if err := v.FromWire(x); err != nil {
  return nil, err
}
return &v, nil

func (*WithDefault) GetPouet Uses

func (v *WithDefault) GetPouet() (o *StructCollision2)

GetPouet returns the value of Pouet if it is set or its default value if it is unset.

func (*WithDefault) IsSetPouet Uses

func (v *WithDefault) IsSetPouet() bool

IsSetPouet returns true if Pouet is not nil.

func (*WithDefault) MarshalLogObject Uses

func (v *WithDefault) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)

MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of WithDefault.

func (*WithDefault) String Uses

func (v *WithDefault) String() string

String returns a readable string representation of a WithDefault struct.

func (*WithDefault) ToWire Uses

func (v *WithDefault) ToWire() (wire.Value, error)

ToWire translates a WithDefault 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 collision imports 11 packages (graph). Updated 2020-07-10. Refresh now. Tools for package owners.