Back to godoc.org

Package structs

v1.24.0
Latest Go to latest

The latest major version is .

Published: Jun 24, 2020 | License: MIT | Module: go.uber.org/thriftrw

Index

Variables

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

ThriftModule represents the IDL file used to generate this package.

type ContactInfo

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

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"`
}

func Default_DefaultsStruct

func Default_DefaultsStruct() *DefaultsStruct

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

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

func (v *DefaultsStruct) IsSetOptionalEnum() bool

IsSetOptionalEnum returns true if OptionalEnum is not nil.

func (*DefaultsStruct) IsSetOptionalList

func (v *DefaultsStruct) IsSetOptionalList() bool

IsSetOptionalList returns true if OptionalList is not nil.

func (*DefaultsStruct) IsSetOptionalPrimitive

func (v *DefaultsStruct) IsSetOptionalPrimitive() bool

IsSetOptionalPrimitive returns true if OptionalPrimitive is not nil.

func (*DefaultsStruct) IsSetOptionalStruct

func (v *DefaultsStruct) IsSetOptionalStruct() bool

IsSetOptionalStruct returns true if OptionalStruct is not nil.

func (*DefaultsStruct) IsSetRequiredEnum

func (v *DefaultsStruct) IsSetRequiredEnum() bool

IsSetRequiredEnum returns true if RequiredEnum is not nil.

func (*DefaultsStruct) IsSetRequiredList

func (v *DefaultsStruct) IsSetRequiredList() bool

IsSetRequiredList returns true if RequiredList is not nil.

func (*DefaultsStruct) IsSetRequiredPrimitive

func (v *DefaultsStruct) IsSetRequiredPrimitive() bool

IsSetRequiredPrimitive returns true if RequiredPrimitive is not nil.

func (*DefaultsStruct) IsSetRequiredStruct

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

func (v *Edge) IsSetEndPoint() bool

IsSetEndPoint returns true if EndPoint is not nil.

func (*Edge) IsSetStartPoint

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

func (v *Frame) IsSetSize() bool

IsSetSize returns true if Size is not nil.

func (*Frame) IsSetTopLeft

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

func (v *GoTags) IsSetBar() bool

IsSetBar returns true if Bar is not nil.

func (*GoTags) IsSetFooBarWithOmitEmpty

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func (v *NotOmitEmpty) IsSetNotOmitEmptyBool() bool

IsSetNotOmitEmptyBool returns true if NotOmitEmptyBool is not nil.

func (*NotOmitEmpty) IsSetNotOmitEmptyInt

func (v *NotOmitEmpty) IsSetNotOmitEmptyInt() bool

IsSetNotOmitEmptyInt returns true if NotOmitEmptyInt is not nil.

func (*NotOmitEmpty) IsSetNotOmitEmptyList

func (v *NotOmitEmpty) IsSetNotOmitEmptyList() bool

IsSetNotOmitEmptyList returns true if NotOmitEmptyList is not nil.

func (*NotOmitEmpty) IsSetNotOmitEmptyListMixedWithOmitEmpty

func (v *NotOmitEmpty) IsSetNotOmitEmptyListMixedWithOmitEmpty() bool

IsSetNotOmitEmptyListMixedWithOmitEmpty returns true if NotOmitEmptyListMixedWithOmitEmpty is not nil.

func (*NotOmitEmpty) IsSetNotOmitEmptyListMixedWithOmitEmptyV2

func (v *NotOmitEmpty) IsSetNotOmitEmptyListMixedWithOmitEmptyV2() bool

IsSetNotOmitEmptyListMixedWithOmitEmptyV2 returns true if NotOmitEmptyListMixedWithOmitEmptyV2 is not nil.

func (*NotOmitEmpty) IsSetNotOmitEmptyMap

func (v *NotOmitEmpty) IsSetNotOmitEmptyMap() bool

IsSetNotOmitEmptyMap returns true if NotOmitEmptyMap is not nil.

func (*NotOmitEmpty) IsSetNotOmitEmptyString

func (v *NotOmitEmpty) IsSetNotOmitEmptyString() bool

IsSetNotOmitEmptyString returns true if NotOmitEmptyString is not nil.

func (*NotOmitEmpty) IsSetOmitEmptyString

func (v *NotOmitEmpty) IsSetOmitEmptyString() bool

IsSetOmitEmptyString returns true if OmitEmptyString is not nil.

func (*NotOmitEmpty) MarshalLogObject

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

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

func (*NotOmitEmpty) String

func (v *NotOmitEmpty) String() string

String returns a readable string representation of a NotOmitEmpty struct.

func (*NotOmitEmpty) ToWire

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

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

func (*PersonalInfo) Equals

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

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

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

func (v *PersonalInfo) IsSetAge() bool

IsSetAge returns true if Age is not nil.

func (*PersonalInfo) MarshalLogObject

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

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

func (*PersonalInfo) String

func (v *PersonalInfo) String() string

String returns a readable string representation of a PersonalInfo struct.

func (*PersonalInfo) ToWire

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

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

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

func (v *PrimitiveOptionalStruct) IsSetBinaryField() bool

IsSetBinaryField returns true if BinaryField is not nil.

func (*PrimitiveOptionalStruct) IsSetBoolField

func (v *PrimitiveOptionalStruct) IsSetBoolField() bool

IsSetBoolField returns true if BoolField is not nil.

func (*PrimitiveOptionalStruct) IsSetByteField

func (v *PrimitiveOptionalStruct) IsSetByteField() bool

IsSetByteField returns true if ByteField is not nil.

func (*PrimitiveOptionalStruct) IsSetDoubleField

func (v *PrimitiveOptionalStruct) IsSetDoubleField() bool

IsSetDoubleField returns true if DoubleField is not nil.

func (*PrimitiveOptionalStruct) IsSetInt16Field

func (v *PrimitiveOptionalStruct) IsSetInt16Field() bool

IsSetInt16Field returns true if Int16Field is not nil.

func (*PrimitiveOptionalStruct) IsSetInt32Field

func (v *PrimitiveOptionalStruct) IsSetInt32Field() bool

IsSetInt32Field returns true if Int32Field is not nil.

func (*PrimitiveOptionalStruct) IsSetInt64Field

func (v *PrimitiveOptionalStruct) IsSetInt64Field() bool

IsSetInt64Field returns true if Int64Field is not nil.

func (*PrimitiveOptionalStruct) IsSetStringField

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

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

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

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

func (v *StructLabels) IsSetFoo() bool

IsSetFoo returns true if Foo is not nil.

func (*StructLabels) IsSetIsRequired

func (v *StructLabels) IsSetIsRequired() bool

IsSetIsRequired returns true if IsRequired is not nil.

func (*StructLabels) IsSetQuux

func (v *StructLabels) IsSetQuux() bool

IsSetQuux returns true if Quux is not nil.

func (*StructLabels) IsSetQux

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

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

func (v *User) IsSetContact() bool

IsSetContact returns true if Contact is not nil.

func (*User) IsSetPersonal

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

Package Files

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

Jump to identifier

Keyboard shortcuts

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