hyphenated_file

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ThriftModule = &thriftreflect.ThriftModule{
	Name:     "hyphenated-file",
	Package:  "go.uber.org/thriftrw/gen/internal/tests/hyphenated-file",
	FilePath: "hyphenated-file.thrift",
	SHA1:     "8513913ac76a3ba1c6b2b3b6fb241462e162c446",
	Includes: []*thriftreflect.ThriftModule{
		non_hyphenated.ThriftModule,
	},
	Raw: rawIDL,
}

ThriftModule represents the IDL file used to generate this package.

Functions

This section is empty.

Types

type DocumentStruct

type DocumentStruct struct {
	Second *non_hyphenated.Second `json:"second,required"`
}

func (*DocumentStruct) Decode added in v1.29.0

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

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

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

func (*DocumentStruct) Encode added in v1.29.0

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

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

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

func (*DocumentStruct) Equals

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

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

This function performs a deep comparison.

func (*DocumentStruct) FromWire

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

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

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

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

func (*DocumentStruct) GetSecond

func (v *DocumentStruct) GetSecond() (o *non_hyphenated.Second)

GetSecond returns the value of Second if it is set or its zero value if it is unset.

func (*DocumentStruct) IsSetSecond

func (v *DocumentStruct) IsSetSecond() bool

IsSetSecond returns true if Second is not nil.

func (*DocumentStruct) MarshalLogObject

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

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

func (*DocumentStruct) String

func (v *DocumentStruct) String() string

String returns a readable string representation of a DocumentStruct struct.

func (*DocumentStruct) ToWire

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

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