structs

package
v1.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ThriftModule = &thriftreflect.ThriftModule{
	Name:     "structs",
	Package:  "go.uber.org/thriftrw/gen/internal/tests/structs",
	FilePath: "structs.thrift",
	SHA1:     "2f43f38d30f0f9e3b089118d7ffc6b4dc532ada6",
	Includes: []*thriftreflect.ThriftModule{
		enums.ThriftModule,
	},
	Raw: rawIDL,
}

ThriftModule represents the IDL file used to generate this package.

Functions

This section is empty.

Types

type ContactInfo

type ContactInfo struct {
	EmailAddress string `json:"emailAddress,required"`
}

func (*ContactInfo) Decode added in v1.29.0

func (v *ContactInfo) Decode(sr stream.Reader) error

Decode deserializes a ContactInfo struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a ContactInfo struct could not be generated from the wire representation.

func (*ContactInfo) Encode added in v1.29.0

func (v *ContactInfo) Encode(sw stream.Writer) error

Encode serializes a ContactInfo struct directly into bytes, without going through an intermediary type.

An error is returned if a ContactInfo struct could not be encoded.

func (*ContactInfo) Equals

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

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

This function performs a deep comparison.

func (*ContactInfo) FromWire

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

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

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

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

func (*ContactInfo) GetEmailAddress

func (v *ContactInfo) GetEmailAddress() (o string)

GetEmailAddress returns the value of EmailAddress if it is set or its zero value if it is unset.

func (*ContactInfo) MarshalLogObject

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

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

func (*ContactInfo) String

func (v *ContactInfo) String() string

String returns a readable string representation of a ContactInfo struct.

func (*ContactInfo) ToWire

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

ToWire translates a ContactInfo 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 DefaultsStruct

type DefaultsStruct struct {
	RequiredPrimitive        *int32             `json:"requiredPrimitive,omitempty"`
	OptionalPrimitive        *int32             `json:"optionalPrimitive,omitempty"`
	RequiredEnum             *enums.EnumDefault `json:"requiredEnum,omitempty"`
	OptionalEnum             *enums.EnumDefault `json:"optionalEnum,omitempty"`
	RequiredList             []string           `json:"requiredList,omitempty"`
	OptionalList             []float64          `json:"optionalList,omitempty"`
	RequiredStruct           *Frame             `json:"requiredStruct,omitempty"`
	OptionalStruct           *Edge              `json:"optionalStruct,omitempty"`
	RequiredBoolDefaultTrue  *bool              `json:"requiredBoolDefaultTrue,omitempty"`
	OptionalBoolDefaultTrue  *bool              `json:"optionalBoolDefaultTrue,omitempty"`
	RequiredBoolDefaultFalse *bool              `json:"requiredBoolDefaultFalse,omitempty"`
	OptionalBoolDefaultFalse *bool              `json:"optionalBoolDefaultFalse,omitempty"`
}

func Default_DefaultsStruct added in v1.24.0

func Default_DefaultsStruct() *DefaultsStruct

Default_DefaultsStruct constructs a new DefaultsStruct struct, pre-populating any fields with defined default values.

func (*DefaultsStruct) Decode added in v1.29.0

func (v *DefaultsStruct) Decode(sr stream.Reader) error

Decode deserializes a DefaultsStruct struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a DefaultsStruct struct could not be generated from the wire representation.

func (*DefaultsStruct) Encode added in v1.29.0

func (v *DefaultsStruct) Encode(sw stream.Writer) error

Encode serializes a DefaultsStruct struct directly into bytes, without going through an intermediary type.

An error is returned if a DefaultsStruct struct could not be encoded.

func (*DefaultsStruct) Equals

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

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

This function performs a deep comparison.

func (*DefaultsStruct) FromWire

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

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

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

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

func (*DefaultsStruct) GetOptionalBoolDefaultFalse added in v1.25.1

func (v *DefaultsStruct) GetOptionalBoolDefaultFalse() (o bool)

GetOptionalBoolDefaultFalse returns the value of OptionalBoolDefaultFalse if it is set or its default value if it is unset.

func (*DefaultsStruct) GetOptionalBoolDefaultTrue added in v1.25.1

func (v *DefaultsStruct) GetOptionalBoolDefaultTrue() (o bool)

GetOptionalBoolDefaultTrue returns the value of OptionalBoolDefaultTrue if it is set or its default value if it is unset.

func (*DefaultsStruct) GetOptionalEnum

func (v *DefaultsStruct) GetOptionalEnum() (o enums.EnumDefault)

GetOptionalEnum returns the value of OptionalEnum if it is set or its default value if it is unset.

func (*DefaultsStruct) GetOptionalList

func (v *DefaultsStruct) GetOptionalList() (o []float64)

GetOptionalList returns the value of OptionalList if it is set or its default value if it is unset.

func (*DefaultsStruct) GetOptionalPrimitive

func (v *DefaultsStruct) GetOptionalPrimitive() (o int32)

GetOptionalPrimitive returns the value of OptionalPrimitive if it is set or its default value if it is unset.

func (*DefaultsStruct) GetOptionalStruct

func (v *DefaultsStruct) GetOptionalStruct() (o *Edge)

GetOptionalStruct returns the value of OptionalStruct if it is set or its default value if it is unset.

func (*DefaultsStruct) GetRequiredBoolDefaultFalse added in v1.25.1

func (v *DefaultsStruct) GetRequiredBoolDefaultFalse() (o bool)

GetRequiredBoolDefaultFalse returns the value of RequiredBoolDefaultFalse if it is set or its default value if it is unset.

func (*DefaultsStruct) GetRequiredBoolDefaultTrue added in v1.25.1

func (v *DefaultsStruct) GetRequiredBoolDefaultTrue() (o bool)

GetRequiredBoolDefaultTrue returns the value of RequiredBoolDefaultTrue if it is set or its default value if it is unset.

func (*DefaultsStruct) GetRequiredEnum

func (v *DefaultsStruct) GetRequiredEnum() (o enums.EnumDefault)

GetRequiredEnum returns the value of RequiredEnum if it is set or its default value if it is unset.

func (*DefaultsStruct) GetRequiredList

func (v *DefaultsStruct) GetRequiredList() (o []string)

GetRequiredList returns the value of RequiredList if it is set or its default value if it is unset.

func (*DefaultsStruct) GetRequiredPrimitive

func (v *DefaultsStruct) GetRequiredPrimitive() (o int32)

GetRequiredPrimitive returns the value of RequiredPrimitive if it is set or its default value if it is unset.

func (*DefaultsStruct) GetRequiredStruct

func (v *DefaultsStruct) GetRequiredStruct() (o *Frame)

GetRequiredStruct returns the value of RequiredStruct if it is set or its default value if it is unset.

func (*DefaultsStruct) IsSetOptionalBoolDefaultFalse added in v1.25.1

func (v *DefaultsStruct) IsSetOptionalBoolDefaultFalse() bool

IsSetOptionalBoolDefaultFalse returns true if OptionalBoolDefaultFalse is not nil.

func (*DefaultsStruct) IsSetOptionalBoolDefaultTrue added in v1.25.1

func (v *DefaultsStruct) IsSetOptionalBoolDefaultTrue() bool

IsSetOptionalBoolDefaultTrue returns true if OptionalBoolDefaultTrue is not nil.

func (*DefaultsStruct) IsSetOptionalEnum added in v1.14.0

func (v *DefaultsStruct) IsSetOptionalEnum() bool

IsSetOptionalEnum returns true if OptionalEnum is not nil.

func (*DefaultsStruct) IsSetOptionalList added in v1.14.0

func (v *DefaultsStruct) IsSetOptionalList() bool

IsSetOptionalList returns true if OptionalList is not nil.

func (*DefaultsStruct) IsSetOptionalPrimitive added in v1.14.0

func (v *DefaultsStruct) IsSetOptionalPrimitive() bool

IsSetOptionalPrimitive returns true if OptionalPrimitive is not nil.

func (*DefaultsStruct) IsSetOptionalStruct added in v1.14.0

func (v *DefaultsStruct) IsSetOptionalStruct() bool

IsSetOptionalStruct returns true if OptionalStruct is not nil.

func (*DefaultsStruct) IsSetRequiredBoolDefaultFalse added in v1.25.1

func (v *DefaultsStruct) IsSetRequiredBoolDefaultFalse() bool

IsSetRequiredBoolDefaultFalse returns true if RequiredBoolDefaultFalse is not nil.

func (*DefaultsStruct) IsSetRequiredBoolDefaultTrue added in v1.25.1

func (v *DefaultsStruct) IsSetRequiredBoolDefaultTrue() bool

IsSetRequiredBoolDefaultTrue returns true if RequiredBoolDefaultTrue is not nil.

func (*DefaultsStruct) IsSetRequiredEnum added in v1.14.0

func (v *DefaultsStruct) IsSetRequiredEnum() bool

IsSetRequiredEnum returns true if RequiredEnum is not nil.

func (*DefaultsStruct) IsSetRequiredList added in v1.14.0

func (v *DefaultsStruct) IsSetRequiredList() bool

IsSetRequiredList returns true if RequiredList is not nil.

func (*DefaultsStruct) IsSetRequiredPrimitive added in v1.14.0

func (v *DefaultsStruct) IsSetRequiredPrimitive() bool

IsSetRequiredPrimitive returns true if RequiredPrimitive is not nil.

func (*DefaultsStruct) IsSetRequiredStruct added in v1.14.0

func (v *DefaultsStruct) IsSetRequiredStruct() bool

IsSetRequiredStruct returns true if RequiredStruct is not nil.

func (*DefaultsStruct) MarshalLogObject

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

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

func (*DefaultsStruct) String

func (v *DefaultsStruct) String() string

String returns a readable string representation of a DefaultsStruct struct.

func (*DefaultsStruct) ToWire

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

ToWire translates a DefaultsStruct 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 Edge

type Edge struct {
	StartPoint *Point `json:"startPoint,required"`
	EndPoint   *Point `json:"endPoint,required"`
}

func (*Edge) Decode added in v1.29.0

func (v *Edge) Decode(sr stream.Reader) error

Decode deserializes a Edge struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Edge struct could not be generated from the wire representation.

func (*Edge) Encode added in v1.29.0

func (v *Edge) Encode(sw stream.Writer) error

Encode serializes a Edge struct directly into bytes, without going through an intermediary type.

An error is returned if a Edge struct could not be encoded.

func (*Edge) Equals

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

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

This function performs a deep comparison.

func (*Edge) FromWire

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

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

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

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

func (*Edge) GetEndPoint

func (v *Edge) GetEndPoint() (o *Point)

GetEndPoint returns the value of EndPoint if it is set or its zero value if it is unset.

func (*Edge) GetStartPoint

func (v *Edge) GetStartPoint() (o *Point)

GetStartPoint returns the value of StartPoint if it is set or its zero value if it is unset.

func (*Edge) IsSetEndPoint added in v1.14.0

func (v *Edge) IsSetEndPoint() bool

IsSetEndPoint returns true if EndPoint is not nil.

func (*Edge) IsSetStartPoint added in v1.14.0

func (v *Edge) IsSetStartPoint() bool

IsSetStartPoint returns true if StartPoint is not nil.

func (*Edge) MarshalLogObject

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

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

func (*Edge) String

func (v *Edge) String() string

String returns a readable string representation of a Edge struct.

func (*Edge) ToWire

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

ToWire translates a Edge 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 EmptyStruct

type EmptyStruct struct {
}

func (*EmptyStruct) Decode added in v1.29.0

func (v *EmptyStruct) Decode(sr stream.Reader) error

Decode deserializes a EmptyStruct struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a EmptyStruct struct could not be generated from the wire representation.

func (*EmptyStruct) Encode added in v1.29.0

func (v *EmptyStruct) Encode(sw stream.Writer) error

Encode serializes a EmptyStruct struct directly into bytes, without going through an intermediary type.

An error is returned if a EmptyStruct struct could not be encoded.

func (*EmptyStruct) Equals

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

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

This function performs a deep comparison.

func (*EmptyStruct) FromWire

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

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

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

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

func (*EmptyStruct) MarshalLogObject

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

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

func (*EmptyStruct) String

func (v *EmptyStruct) String() string

String returns a readable string representation of a EmptyStruct struct.

func (*EmptyStruct) ToWire

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

ToWire translates a EmptyStruct 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 Frame

type Frame struct {
	TopLeft *Point `json:"topLeft,required"`
	Size    *Size  `json:"size,required"`
}

func (*Frame) Decode added in v1.29.0

func (v *Frame) Decode(sr stream.Reader) error

Decode deserializes a Frame struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Frame struct could not be generated from the wire representation.

func (*Frame) Encode added in v1.29.0

func (v *Frame) Encode(sw stream.Writer) error

Encode serializes a Frame struct directly into bytes, without going through an intermediary type.

An error is returned if a Frame struct could not be encoded.

func (*Frame) Equals

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

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

This function performs a deep comparison.

func (*Frame) FromWire

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

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

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

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

func (*Frame) GetSize

func (v *Frame) GetSize() (o *Size)

GetSize returns the value of Size if it is set or its zero value if it is unset.

func (*Frame) GetTopLeft

func (v *Frame) GetTopLeft() (o *Point)

GetTopLeft returns the value of TopLeft if it is set or its zero value if it is unset.

func (*Frame) IsSetSize added in v1.14.0

func (v *Frame) IsSetSize() bool

IsSetSize returns true if Size is not nil.

func (*Frame) IsSetTopLeft added in v1.14.0

func (v *Frame) IsSetTopLeft() bool

IsSetTopLeft returns true if TopLeft is not nil.

func (*Frame) MarshalLogObject

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

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

func (*Frame) String

func (v *Frame) String() string

String returns a readable string representation of a Frame struct.

func (*Frame) ToWire

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

ToWire translates a Frame 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 GoTags

type GoTags struct {
	Foo                 string  `json:"-" foo:"bar"`
	Bar                 *string `json:"Bar,omitempty" bar:"foo"`
	FooBar              string  `json:"foobar,option1,option2,required" bar:"foo,option1" foo:"foobar"`
	FooBarWithSpace     string  `json:"foobarWithSpace,required" foo:"foo bar foobar barfoo"`
	FooBarWithOmitEmpty *string `json:"foobarWithOmitEmpty,omitempty"`
	FooBarWithRequired  string  `json:"foobarWithRequired,required"`
}

func (*GoTags) Decode added in v1.29.0

func (v *GoTags) Decode(sr stream.Reader) error

Decode deserializes a GoTags struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a GoTags struct could not be generated from the wire representation.

func (*GoTags) Encode added in v1.29.0

func (v *GoTags) Encode(sw stream.Writer) error

Encode serializes a GoTags struct directly into bytes, without going through an intermediary type.

An error is returned if a GoTags struct could not be encoded.

func (*GoTags) Equals

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

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

This function performs a deep comparison.

func (*GoTags) FromWire

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

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

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

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

func (*GoTags) GetBar

func (v *GoTags) GetBar() (o string)

GetBar returns the value of Bar if it is set or its zero value if it is unset.

func (*GoTags) GetFoo

func (v *GoTags) GetFoo() (o string)

GetFoo returns the value of Foo if it is set or its zero value if it is unset.

func (*GoTags) GetFooBar

func (v *GoTags) GetFooBar() (o string)

GetFooBar returns the value of FooBar if it is set or its zero value if it is unset.

func (*GoTags) GetFooBarWithOmitEmpty

func (v *GoTags) GetFooBarWithOmitEmpty() (o string)

GetFooBarWithOmitEmpty returns the value of FooBarWithOmitEmpty if it is set or its zero value if it is unset.

func (*GoTags) GetFooBarWithRequired

func (v *GoTags) GetFooBarWithRequired() (o string)

GetFooBarWithRequired returns the value of FooBarWithRequired if it is set or its zero value if it is unset.

func (*GoTags) GetFooBarWithSpace

func (v *GoTags) GetFooBarWithSpace() (o string)

GetFooBarWithSpace returns the value of FooBarWithSpace if it is set or its zero value if it is unset.

func (*GoTags) IsSetBar added in v1.14.0

func (v *GoTags) IsSetBar() bool

IsSetBar returns true if Bar is not nil.

func (*GoTags) IsSetFooBarWithOmitEmpty added in v1.14.0

func (v *GoTags) IsSetFooBarWithOmitEmpty() bool

IsSetFooBarWithOmitEmpty returns true if FooBarWithOmitEmpty is not nil.

func (*GoTags) MarshalLogObject

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

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

func (*GoTags) String

func (v *GoTags) String() string

String returns a readable string representation of a GoTags struct.

func (*GoTags) ToWire

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

ToWire translates a GoTags 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 Graph

type Graph struct {
	// List of edges in the graph.
	//
	// May be empty.
	Edges []*Edge `json:"edges,required"`
}

A graph is comprised of zero or more edges.

func (*Graph) Decode added in v1.29.0

func (v *Graph) Decode(sr stream.Reader) error

Decode deserializes a Graph struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Graph struct could not be generated from the wire representation.

func (*Graph) Encode added in v1.29.0

func (v *Graph) Encode(sw stream.Writer) error

Encode serializes a Graph struct directly into bytes, without going through an intermediary type.

An error is returned if a Graph struct could not be encoded.

func (*Graph) Equals

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

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

This function performs a deep comparison.

func (*Graph) FromWire

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

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

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

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

func (*Graph) GetEdges

func (v *Graph) GetEdges() (o []*Edge)

GetEdges returns the value of Edges if it is set or its zero value if it is unset.

func (*Graph) IsSetEdges added in v1.14.0

func (v *Graph) IsSetEdges() bool

IsSetEdges returns true if Edges is not nil.

func (*Graph) MarshalLogObject

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

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

func (*Graph) String

func (v *Graph) String() string

String returns a readable string representation of a Graph struct.

func (*Graph) ToWire

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

ToWire translates a Graph 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 List

type List Node

func (*List) Decode added in v1.29.0

func (v *List) Decode(sr stream.Reader) error

Decode deserializes List directly off the wire.

func (*List) Encode added in v1.29.0

func (v *List) Encode(sw stream.Writer) error

func (*List) Equals

func (lhs *List) Equals(rhs *List) bool

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

func (*List) FromWire

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

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

func (*List) MarshalLogObject

func (v *List) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*List) String

func (v *List) String() string

String returns a readable string representation of List.

func (*List) ToWire

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

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

type Node

type Node struct {
	Value int32 `json:"value,required"`
	Tail  *List `json:"tail,omitempty"`
}

Node is linked list of values. All values are 32-bit integers.

func (*Node) Decode added in v1.29.0

func (v *Node) Decode(sr stream.Reader) error

Decode deserializes a Node struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Node struct could not be generated from the wire representation.

func (*Node) Encode added in v1.29.0

func (v *Node) Encode(sw stream.Writer) error

Encode serializes a Node struct directly into bytes, without going through an intermediary type.

An error is returned if a Node struct could not be encoded.

func (*Node) Equals

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

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

This function performs a deep comparison.

func (*Node) FromWire

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

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

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

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

func (*Node) GetTail

func (v *Node) GetTail() (o *List)

GetTail returns the value of Tail if it is set or its zero value if it is unset.

func (*Node) GetValue

func (v *Node) GetValue() (o int32)

GetValue returns the value of Value if it is set or its zero value if it is unset.

func (*Node) IsSetTail added in v1.14.0

func (v *Node) IsSetTail() bool

IsSetTail returns true if Tail is not nil.

func (*Node) MarshalLogObject

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

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

func (*Node) String

func (v *Node) String() string

String returns a readable string representation of a Node struct.

func (*Node) ToWire

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

ToWire translates a Node 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 NotOmitEmpty added in v1.23.0

type NotOmitEmpty struct {
	NotOmitEmptyString                   *string           `json:"notOmitEmptyString,!omitempty"`
	NotOmitEmptyInt                      *string           `json:"notOmitEmptyInt,!omitempty"`
	NotOmitEmptyBool                     *string           `json:"notOmitEmptyBool,!omitempty"`
	NotOmitEmptyList                     []string          `json:"notOmitEmptyList,!omitempty"`
	NotOmitEmptyMap                      map[string]string `json:"notOmitEmptyMap,!omitempty"`
	NotOmitEmptyListMixedWithOmitEmpty   []string          `json:"notOmitEmptyListMixedWithOmitEmpty,!omitempty"`
	NotOmitEmptyListMixedWithOmitEmptyV2 []string          `json:"notOmitEmptyListMixedWithOmitEmptyV2,!omitempty"`
	OmitEmptyString                      *string           `json:"omitEmptyString,omitempty"`
}

func (*NotOmitEmpty) Decode added in v1.29.0

func (v *NotOmitEmpty) Decode(sr stream.Reader) error

Decode deserializes a NotOmitEmpty struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a NotOmitEmpty struct could not be generated from the wire representation.

func (*NotOmitEmpty) Encode added in v1.29.0

func (v *NotOmitEmpty) Encode(sw stream.Writer) error

Encode serializes a NotOmitEmpty struct directly into bytes, without going through an intermediary type.

An error is returned if a NotOmitEmpty struct could not be encoded.

func (*NotOmitEmpty) Equals added in v1.23.0

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

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

This function performs a deep comparison.

func (*NotOmitEmpty) FromWire added in v1.23.0

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

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

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

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

func (*NotOmitEmpty) GetNotOmitEmptyBool added in v1.23.0

func (v *NotOmitEmpty) GetNotOmitEmptyBool() (o string)

GetNotOmitEmptyBool returns the value of NotOmitEmptyBool if it is set or its zero value if it is unset.

func (*NotOmitEmpty) GetNotOmitEmptyInt added in v1.23.0

func (v *NotOmitEmpty) GetNotOmitEmptyInt() (o string)

GetNotOmitEmptyInt returns the value of NotOmitEmptyInt if it is set or its zero value if it is unset.

func (*NotOmitEmpty) GetNotOmitEmptyList added in v1.23.0

func (v *NotOmitEmpty) GetNotOmitEmptyList() (o []string)

GetNotOmitEmptyList returns the value of NotOmitEmptyList if it is set or its zero value if it is unset.

func (*NotOmitEmpty) GetNotOmitEmptyListMixedWithOmitEmpty added in v1.23.0

func (v *NotOmitEmpty) GetNotOmitEmptyListMixedWithOmitEmpty() (o []string)

GetNotOmitEmptyListMixedWithOmitEmpty returns the value of NotOmitEmptyListMixedWithOmitEmpty if it is set or its zero value if it is unset.

func (*NotOmitEmpty) GetNotOmitEmptyListMixedWithOmitEmptyV2 added in v1.23.0

func (v *NotOmitEmpty) GetNotOmitEmptyListMixedWithOmitEmptyV2() (o []string)

GetNotOmitEmptyListMixedWithOmitEmptyV2 returns the value of NotOmitEmptyListMixedWithOmitEmptyV2 if it is set or its zero value if it is unset.

func (*NotOmitEmpty) GetNotOmitEmptyMap added in v1.23.0

func (v *NotOmitEmpty) GetNotOmitEmptyMap() (o map[string]string)

GetNotOmitEmptyMap returns the value of NotOmitEmptyMap if it is set or its zero value if it is unset.

func (*NotOmitEmpty) GetNotOmitEmptyString added in v1.23.0

func (v *NotOmitEmpty) GetNotOmitEmptyString() (o string)

GetNotOmitEmptyString returns the value of NotOmitEmptyString if it is set or its zero value if it is unset.

func (*NotOmitEmpty) GetOmitEmptyString added in v1.23.0

func (v *NotOmitEmpty) GetOmitEmptyString() (o string)

GetOmitEmptyString returns the value of OmitEmptyString if it is set or its zero value if it is unset.

func (*NotOmitEmpty) IsSetNotOmitEmptyBool added in v1.23.0

func (v *NotOmitEmpty) IsSetNotOmitEmptyBool() bool

IsSetNotOmitEmptyBool returns true if NotOmitEmptyBool is not nil.

func (*NotOmitEmpty) IsSetNotOmitEmptyInt added in v1.23.0

func (v *NotOmitEmpty) IsSetNotOmitEmptyInt() bool

IsSetNotOmitEmptyInt returns true if NotOmitEmptyInt is not nil.

func (*NotOmitEmpty) IsSetNotOmitEmptyList added in v1.23.0

func (v *NotOmitEmpty) IsSetNotOmitEmptyList() bool

IsSetNotOmitEmptyList returns true if NotOmitEmptyList is not nil.

func (*NotOmitEmpty) IsSetNotOmitEmptyListMixedWithOmitEmpty added in v1.23.0

func (v *NotOmitEmpty) IsSetNotOmitEmptyListMixedWithOmitEmpty() bool

IsSetNotOmitEmptyListMixedWithOmitEmpty returns true if NotOmitEmptyListMixedWithOmitEmpty is not nil.

func (*NotOmitEmpty) IsSetNotOmitEmptyListMixedWithOmitEmptyV2 added in v1.23.0

func (v *NotOmitEmpty) IsSetNotOmitEmptyListMixedWithOmitEmptyV2() bool

IsSetNotOmitEmptyListMixedWithOmitEmptyV2 returns true if NotOmitEmptyListMixedWithOmitEmptyV2 is not nil.

func (*NotOmitEmpty) IsSetNotOmitEmptyMap added in v1.23.0

func (v *NotOmitEmpty) IsSetNotOmitEmptyMap() bool

IsSetNotOmitEmptyMap returns true if NotOmitEmptyMap is not nil.

func (*NotOmitEmpty) IsSetNotOmitEmptyString added in v1.23.0

func (v *NotOmitEmpty) IsSetNotOmitEmptyString() bool

IsSetNotOmitEmptyString returns true if NotOmitEmptyString is not nil.

func (*NotOmitEmpty) IsSetOmitEmptyString added in v1.23.0

func (v *NotOmitEmpty) IsSetOmitEmptyString() bool

IsSetOmitEmptyString returns true if OmitEmptyString is not nil.

func (*NotOmitEmpty) MarshalLogObject added in v1.23.0

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

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

func (*NotOmitEmpty) String added in v1.23.0

func (v *NotOmitEmpty) String() string

String returns a readable string representation of a NotOmitEmpty struct.

func (*NotOmitEmpty) ToWire added in v1.23.0

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

ToWire translates a NotOmitEmpty 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 Omit

type Omit struct {
	Serialized string `json:"serialized,required"`
	Hidden     string `json:"-"`
}

func (*Omit) Decode added in v1.29.0

func (v *Omit) Decode(sr stream.Reader) error

Decode deserializes a Omit struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Omit struct could not be generated from the wire representation.

func (*Omit) Encode added in v1.29.0

func (v *Omit) Encode(sw stream.Writer) error

Encode serializes a Omit struct directly into bytes, without going through an intermediary type.

An error is returned if a Omit struct could not be encoded.

func (*Omit) Equals

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

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

This function performs a deep comparison.

func (*Omit) FromWire

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

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

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

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

func (*Omit) GetHidden

func (v *Omit) GetHidden() (o string)

GetHidden returns the value of Hidden if it is set or its zero value if it is unset.

func (*Omit) GetSerialized

func (v *Omit) GetSerialized() (o string)

GetSerialized returns the value of Serialized if it is set or its zero value if it is unset.

func (*Omit) MarshalLogObject

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

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

func (*Omit) String

func (v *Omit) String() string

String returns a readable string representation of a Omit struct.

func (*Omit) ToWire

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

ToWire translates a Omit 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 PersonalInfo added in v1.15.0

type PersonalInfo struct {
	Age *int32 `json:"age,omitempty"`
}

func (*PersonalInfo) Decode added in v1.29.0

func (v *PersonalInfo) Decode(sr stream.Reader) error

Decode deserializes a PersonalInfo struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a PersonalInfo struct could not be generated from the wire representation.

func (*PersonalInfo) Encode added in v1.29.0

func (v *PersonalInfo) Encode(sw stream.Writer) error

Encode serializes a PersonalInfo struct directly into bytes, without going through an intermediary type.

An error is returned if a PersonalInfo struct could not be encoded.

func (*PersonalInfo) Equals added in v1.15.0

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

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

This function performs a deep comparison.

func (*PersonalInfo) FromWire added in v1.15.0

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

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

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

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

func (*PersonalInfo) GetAge added in v1.15.0

func (v *PersonalInfo) GetAge() (o int32)

GetAge returns the value of Age if it is set or its zero value if it is unset.

func (*PersonalInfo) IsSetAge added in v1.15.0

func (v *PersonalInfo) IsSetAge() bool

IsSetAge returns true if Age is not nil.

func (*PersonalInfo) MarshalLogObject added in v1.15.0

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

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

func (*PersonalInfo) String added in v1.15.0

func (v *PersonalInfo) String() string

String returns a readable string representation of a PersonalInfo struct.

func (*PersonalInfo) ToWire added in v1.15.0

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

ToWire translates a PersonalInfo 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 Point

type Point struct {
	X float64 `json:"x,required"`
	Y float64 `json:"y,required"`
}

A point in 2D space.

func (*Point) Decode added in v1.29.0

func (v *Point) Decode(sr stream.Reader) error

Decode deserializes a Point struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Point struct could not be generated from the wire representation.

func (*Point) Encode added in v1.29.0

func (v *Point) Encode(sw stream.Writer) error

Encode serializes a Point struct directly into bytes, without going through an intermediary type.

An error is returned if a Point struct could not be encoded.

func (*Point) Equals

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

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

This function performs a deep comparison.

func (*Point) FromWire

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

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

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

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

func (*Point) GetX

func (v *Point) GetX() (o float64)

GetX returns the value of X if it is set or its zero value if it is unset.

func (*Point) GetY

func (v *Point) GetY() (o float64)

GetY returns the value of Y if it is set or its zero value if it is unset.

func (*Point) MarshalLogObject

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

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

func (*Point) String

func (v *Point) String() string

String returns a readable string representation of a Point struct.

func (*Point) ToWire

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

ToWire translates a Point 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 PrimitiveOptionalStruct

type PrimitiveOptionalStruct struct {
	BoolField   *bool    `json:"boolField,omitempty"`
	ByteField   *int8    `json:"byteField,omitempty"`
	Int16Field  *int16   `json:"int16Field,omitempty"`
	Int32Field  *int32   `json:"int32Field,omitempty"`
	Int64Field  *int64   `json:"int64Field,omitempty"`
	DoubleField *float64 `json:"doubleField,omitempty"`
	StringField *string  `json:"stringField,omitempty"`
	BinaryField []byte   `json:"binaryField,omitempty"`
}

A struct that contains primitive fields exclusively.

All fields are optional.

func (*PrimitiveOptionalStruct) Decode added in v1.29.0

Decode deserializes a PrimitiveOptionalStruct struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a PrimitiveOptionalStruct struct could not be generated from the wire representation.

func (*PrimitiveOptionalStruct) Encode added in v1.29.0

Encode serializes a PrimitiveOptionalStruct struct directly into bytes, without going through an intermediary type.

An error is returned if a PrimitiveOptionalStruct struct could not be encoded.

func (*PrimitiveOptionalStruct) Equals

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

This function performs a deep comparison.

func (*PrimitiveOptionalStruct) FromWire

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

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

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

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

func (*PrimitiveOptionalStruct) GetBinaryField

func (v *PrimitiveOptionalStruct) GetBinaryField() (o []byte)

GetBinaryField returns the value of BinaryField if it is set or its zero value if it is unset.

func (*PrimitiveOptionalStruct) GetBoolField

func (v *PrimitiveOptionalStruct) GetBoolField() (o bool)

GetBoolField returns the value of BoolField if it is set or its zero value if it is unset.

func (*PrimitiveOptionalStruct) GetByteField

func (v *PrimitiveOptionalStruct) GetByteField() (o int8)

GetByteField returns the value of ByteField if it is set or its zero value if it is unset.

func (*PrimitiveOptionalStruct) GetDoubleField

func (v *PrimitiveOptionalStruct) GetDoubleField() (o float64)

GetDoubleField returns the value of DoubleField if it is set or its zero value if it is unset.

func (*PrimitiveOptionalStruct) GetInt16Field

func (v *PrimitiveOptionalStruct) GetInt16Field() (o int16)

GetInt16Field returns the value of Int16Field if it is set or its zero value if it is unset.

func (*PrimitiveOptionalStruct) GetInt32Field

func (v *PrimitiveOptionalStruct) GetInt32Field() (o int32)

GetInt32Field returns the value of Int32Field if it is set or its zero value if it is unset.

func (*PrimitiveOptionalStruct) GetInt64Field

func (v *PrimitiveOptionalStruct) GetInt64Field() (o int64)

GetInt64Field returns the value of Int64Field if it is set or its zero value if it is unset.

func (*PrimitiveOptionalStruct) GetStringField

func (v *PrimitiveOptionalStruct) GetStringField() (o string)

GetStringField returns the value of StringField if it is set or its zero value if it is unset.

func (*PrimitiveOptionalStruct) IsSetBinaryField added in v1.14.0

func (v *PrimitiveOptionalStruct) IsSetBinaryField() bool

IsSetBinaryField returns true if BinaryField is not nil.

func (*PrimitiveOptionalStruct) IsSetBoolField added in v1.14.0

func (v *PrimitiveOptionalStruct) IsSetBoolField() bool

IsSetBoolField returns true if BoolField is not nil.

func (*PrimitiveOptionalStruct) IsSetByteField added in v1.14.0

func (v *PrimitiveOptionalStruct) IsSetByteField() bool

IsSetByteField returns true if ByteField is not nil.

func (*PrimitiveOptionalStruct) IsSetDoubleField added in v1.14.0

func (v *PrimitiveOptionalStruct) IsSetDoubleField() bool

IsSetDoubleField returns true if DoubleField is not nil.

func (*PrimitiveOptionalStruct) IsSetInt16Field added in v1.14.0

func (v *PrimitiveOptionalStruct) IsSetInt16Field() bool

IsSetInt16Field returns true if Int16Field is not nil.

func (*PrimitiveOptionalStruct) IsSetInt32Field added in v1.14.0

func (v *PrimitiveOptionalStruct) IsSetInt32Field() bool

IsSetInt32Field returns true if Int32Field is not nil.

func (*PrimitiveOptionalStruct) IsSetInt64Field added in v1.14.0

func (v *PrimitiveOptionalStruct) IsSetInt64Field() bool

IsSetInt64Field returns true if Int64Field is not nil.

func (*PrimitiveOptionalStruct) IsSetStringField added in v1.14.0

func (v *PrimitiveOptionalStruct) IsSetStringField() bool

IsSetStringField returns true if StringField is not nil.

func (*PrimitiveOptionalStruct) MarshalLogObject

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

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

func (*PrimitiveOptionalStruct) String

func (v *PrimitiveOptionalStruct) String() string

String returns a readable string representation of a PrimitiveOptionalStruct struct.

func (*PrimitiveOptionalStruct) ToWire

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

ToWire translates a PrimitiveOptionalStruct 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 PrimitiveRequiredStruct

type PrimitiveRequiredStruct struct {
	BoolField   bool    `json:"boolField,required"`
	ByteField   int8    `json:"byteField,required"`
	Int16Field  int16   `json:"int16Field,required"`
	Int32Field  int32   `json:"int32Field,required"`
	Int64Field  int64   `json:"int64Field,required"`
	DoubleField float64 `json:"doubleField,required"`
	StringField string  `json:"stringField,required"`
	BinaryField []byte  `json:"binaryField,required"`
}

A struct that contains primitive fields exclusively.

All fields are required.

func (*PrimitiveRequiredStruct) Decode added in v1.29.0

Decode deserializes a PrimitiveRequiredStruct struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a PrimitiveRequiredStruct struct could not be generated from the wire representation.

func (*PrimitiveRequiredStruct) Encode added in v1.29.0

Encode serializes a PrimitiveRequiredStruct struct directly into bytes, without going through an intermediary type.

An error is returned if a PrimitiveRequiredStruct struct could not be encoded.

func (*PrimitiveRequiredStruct) Equals

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

This function performs a deep comparison.

func (*PrimitiveRequiredStruct) FromWire

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

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

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

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

func (*PrimitiveRequiredStruct) GetBinaryField

func (v *PrimitiveRequiredStruct) GetBinaryField() (o []byte)

GetBinaryField returns the value of BinaryField if it is set or its zero value if it is unset.

func (*PrimitiveRequiredStruct) GetBoolField

func (v *PrimitiveRequiredStruct) GetBoolField() (o bool)

GetBoolField returns the value of BoolField if it is set or its zero value if it is unset.

func (*PrimitiveRequiredStruct) GetByteField

func (v *PrimitiveRequiredStruct) GetByteField() (o int8)

GetByteField returns the value of ByteField if it is set or its zero value if it is unset.

func (*PrimitiveRequiredStruct) GetDoubleField

func (v *PrimitiveRequiredStruct) GetDoubleField() (o float64)

GetDoubleField returns the value of DoubleField if it is set or its zero value if it is unset.

func (*PrimitiveRequiredStruct) GetInt16Field

func (v *PrimitiveRequiredStruct) GetInt16Field() (o int16)

GetInt16Field returns the value of Int16Field if it is set or its zero value if it is unset.

func (*PrimitiveRequiredStruct) GetInt32Field

func (v *PrimitiveRequiredStruct) GetInt32Field() (o int32)

GetInt32Field returns the value of Int32Field if it is set or its zero value if it is unset.

func (*PrimitiveRequiredStruct) GetInt64Field

func (v *PrimitiveRequiredStruct) GetInt64Field() (o int64)

GetInt64Field returns the value of Int64Field if it is set or its zero value if it is unset.

func (*PrimitiveRequiredStruct) GetStringField

func (v *PrimitiveRequiredStruct) GetStringField() (o string)

GetStringField returns the value of StringField if it is set or its zero value if it is unset.

func (*PrimitiveRequiredStruct) IsSetBinaryField added in v1.14.0

func (v *PrimitiveRequiredStruct) IsSetBinaryField() bool

IsSetBinaryField returns true if BinaryField is not nil.

func (*PrimitiveRequiredStruct) MarshalLogObject

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

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

func (*PrimitiveRequiredStruct) String

func (v *PrimitiveRequiredStruct) String() string

String returns a readable string representation of a PrimitiveRequiredStruct struct.

func (*PrimitiveRequiredStruct) ToWire

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

ToWire translates a PrimitiveRequiredStruct 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 Rename

type Rename struct {
	Default   string `json:"default,required"`
	CamelCase string `json:"snake_case,required"`
}

func (*Rename) Decode added in v1.29.0

func (v *Rename) Decode(sr stream.Reader) error

Decode deserializes a Rename struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Rename struct could not be generated from the wire representation.

func (*Rename) Encode added in v1.29.0

func (v *Rename) Encode(sw stream.Writer) error

Encode serializes a Rename struct directly into bytes, without going through an intermediary type.

An error is returned if a Rename struct could not be encoded.

func (*Rename) Equals

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

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

This function performs a deep comparison.

func (*Rename) FromWire

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

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

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

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

func (*Rename) GetCamelCase

func (v *Rename) GetCamelCase() (o string)

GetCamelCase returns the value of CamelCase if it is set or its zero value if it is unset.

func (*Rename) GetDefault

func (v *Rename) GetDefault() (o string)

GetDefault returns the value of Default if it is set or its zero value if it is unset.

func (*Rename) MarshalLogObject

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

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

func (*Rename) String

func (v *Rename) String() string

String returns a readable string representation of a Rename struct.

func (*Rename) ToWire

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

ToWire translates a Rename 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 Size

type Size struct {
	// Width in pixels.
	Width float64 `json:"width,required"`
	// Height in pixels.
	Height float64 `json:"height,required"`
}

Size of something.

func (*Size) Decode added in v1.29.0

func (v *Size) Decode(sr stream.Reader) error

Decode deserializes a Size struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a Size struct could not be generated from the wire representation.

func (*Size) Encode added in v1.29.0

func (v *Size) Encode(sw stream.Writer) error

Encode serializes a Size struct directly into bytes, without going through an intermediary type.

An error is returned if a Size struct could not be encoded.

func (*Size) Equals

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

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

This function performs a deep comparison.

func (*Size) FromWire

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

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

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

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

func (*Size) GetHeight

func (v *Size) GetHeight() (o float64)

GetHeight returns the value of Height if it is set or its zero value if it is unset.

func (*Size) GetWidth

func (v *Size) GetWidth() (o float64)

GetWidth returns the value of Width if it is set or its zero value if it is unset.

func (*Size) MarshalLogObject

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

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

func (*Size) String

func (v *Size) String() string

String returns a readable string representation of a Size struct.

func (*Size) ToWire

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

ToWire translates a Size 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 StructLabels

type StructLabels struct {
	IsRequired *bool   `json:"required,omitempty"`
	Foo        *string `json:"not_bar,omitempty"`
	Qux        *string `json:"qux,omitempty"`
	Quux       *string `json:"QUUX,omitempty"`
}

func (*StructLabels) Decode added in v1.29.0

func (v *StructLabels) Decode(sr stream.Reader) error

Decode deserializes a StructLabels struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a StructLabels struct could not be generated from the wire representation.

func (*StructLabels) Encode added in v1.29.0

func (v *StructLabels) Encode(sw stream.Writer) error

Encode serializes a StructLabels struct directly into bytes, without going through an intermediary type.

An error is returned if a StructLabels struct could not be encoded.

func (*StructLabels) Equals

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

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

This function performs a deep comparison.

func (*StructLabels) FromWire

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

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

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

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

func (*StructLabels) GetFoo

func (v *StructLabels) GetFoo() (o string)

GetFoo returns the value of Foo if it is set or its zero value if it is unset.

func (*StructLabels) GetIsRequired

func (v *StructLabels) GetIsRequired() (o bool)

GetIsRequired returns the value of IsRequired if it is set or its zero value if it is unset.

func (*StructLabels) GetQuux

func (v *StructLabels) GetQuux() (o string)

GetQuux returns the value of Quux if it is set or its zero value if it is unset.

func (*StructLabels) GetQux

func (v *StructLabels) GetQux() (o string)

GetQux returns the value of Qux if it is set or its zero value if it is unset.

func (*StructLabels) IsSetFoo added in v1.14.0

func (v *StructLabels) IsSetFoo() bool

IsSetFoo returns true if Foo is not nil.

func (*StructLabels) IsSetIsRequired added in v1.14.0

func (v *StructLabels) IsSetIsRequired() bool

IsSetIsRequired returns true if IsRequired is not nil.

func (*StructLabels) IsSetQuux added in v1.14.0

func (v *StructLabels) IsSetQuux() bool

IsSetQuux returns true if Quux is not nil.

func (*StructLabels) IsSetQux added in v1.14.0

func (v *StructLabels) IsSetQux() bool

IsSetQux returns true if Qux is not nil.

func (*StructLabels) MarshalLogObject

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

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

func (*StructLabels) String

func (v *StructLabels) String() string

String returns a readable string representation of a StructLabels struct.

func (*StructLabels) ToWire

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

ToWire translates a StructLabels 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 User

type User struct {
	Name     string        `json:"name,required"`
	Contact  *ContactInfo  `json:"contact,omitempty"`
	Personal *PersonalInfo `json:"personal,omitempty"`
}

func (*User) Decode added in v1.29.0

func (v *User) Decode(sr stream.Reader) error

Decode deserializes a User struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a User struct could not be generated from the wire representation.

func (*User) Encode added in v1.29.0

func (v *User) Encode(sw stream.Writer) error

Encode serializes a User struct directly into bytes, without going through an intermediary type.

An error is returned if a User struct could not be encoded.

func (*User) Equals

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

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

This function performs a deep comparison.

func (*User) FromWire

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

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

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

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

func (*User) GetContact

func (v *User) GetContact() (o *ContactInfo)

GetContact returns the value of Contact if it is set or its zero value if it is unset.

func (*User) GetName

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

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

func (*User) GetPersonal added in v1.15.0

func (v *User) GetPersonal() (o *PersonalInfo)

GetPersonal returns the value of Personal if it is set or its zero value if it is unset.

func (*User) IsSetContact added in v1.14.0

func (v *User) IsSetContact() bool

IsSetContact returns true if Contact is not nil.

func (*User) IsSetPersonal added in v1.15.0

func (v *User) IsSetPersonal() bool

IsSetPersonal returns true if Personal is not nil.

func (*User) MarshalLogObject

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

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

func (*User) String

func (v *User) String() string

String returns a readable string representation of a User struct.

func (*User) ToWire

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

ToWire translates a User 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 UserMap

type UserMap map[string]*User

func (*UserMap) Decode added in v1.29.0

func (v *UserMap) Decode(sr stream.Reader) error

Decode deserializes UserMap directly off the wire.

func (UserMap) Encode added in v1.29.0

func (v UserMap) Encode(sw stream.Writer) error

func (UserMap) Equals

func (lhs UserMap) Equals(rhs UserMap) bool

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

func (*UserMap) FromWire

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

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

func (UserMap) MarshalLogObject

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

func (UserMap) String

func (v UserMap) String() string

String returns a readable string representation of UserMap.

func (UserMap) ToWire

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

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

type ZapOptOutStruct

type ZapOptOutStruct struct {
	Name   string `json:"name,required"`
	Optout string `json:"optout,required"`
}

func (*ZapOptOutStruct) Decode added in v1.29.0

func (v *ZapOptOutStruct) Decode(sr stream.Reader) error

Decode deserializes a ZapOptOutStruct struct directly from its Thrift-level representation, without going through an intemediary type.

An error is returned if a ZapOptOutStruct struct could not be generated from the wire representation.

func (*ZapOptOutStruct) Encode added in v1.29.0

func (v *ZapOptOutStruct) Encode(sw stream.Writer) error

Encode serializes a ZapOptOutStruct struct directly into bytes, without going through an intermediary type.

An error is returned if a ZapOptOutStruct struct could not be encoded.

func (*ZapOptOutStruct) Equals

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

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

This function performs a deep comparison.

func (*ZapOptOutStruct) FromWire

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

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

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

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

func (*ZapOptOutStruct) GetName

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

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

func (*ZapOptOutStruct) GetOptout

func (v *ZapOptOutStruct) GetOptout() (o string)

GetOptout returns the value of Optout if it is set or its zero value if it is unset.

func (*ZapOptOutStruct) MarshalLogObject

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

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

func (*ZapOptOutStruct) String

func (v *ZapOptOutStruct) String() string

String returns a readable string representation of a ZapOptOutStruct struct.

func (*ZapOptOutStruct) ToWire

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

ToWire translates a ZapOptOutStruct 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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL