non_hyphenated

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ThriftModule = &thriftreflect.ThriftModule{
	Name:     "non_hyphenated",
	Package:  "go.uber.org/thriftrw/gen/internal/tests/non_hyphenated",
	FilePath: "non_hyphenated.thrift",
	SHA1:     "5cbe76400805b1c5a248631c4ad87e3dfe6f183e",
	Raw:      rawIDL,
}

ThriftModule represents the IDL file used to generate this package.

Functions

This section is empty.

Types

type First

type First struct {
}

func (*First) Equals

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

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

This function performs a deep comparison.

func (*First) FromWire

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

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

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

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

func (*First) MarshalLogObject

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

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

func (*First) String

func (v *First) String() string

String returns a readable string representation of a First struct.

func (*First) ToWire

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

ToWire translates a First 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 Second

type Second struct {
}

func (*Second) Equals

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

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

This function performs a deep comparison.

func (*Second) FromWire

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

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

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

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

func (*Second) MarshalLogObject

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

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

func (*Second) String

func (v *Second) String() string

String returns a readable string representation of a Second struct.

func (*Second) ToWire

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

ToWire translates a Second 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