thriftrw: go.uber.org/thriftrw/gen/internal/tests/hyphenated-file Index | Files

package hyphenated_file

import "go.uber.org/thriftrw/gen/internal/tests/hyphenated-file"

Index

Package Files

hyphenated-file.go

Variables

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.

type DocumentStruct Uses

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

func (*DocumentStruct) Equals Uses

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 Uses

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 Uses

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 Uses

func (v *DocumentStruct) IsSetSecond() bool

IsSetSecond returns true if Second is not nil.

func (*DocumentStruct) MarshalLogObject Uses

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

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

func (*DocumentStruct) String Uses

func (v *DocumentStruct) String() string

String returns a readable string representation of a DocumentStruct struct.

func (*DocumentStruct) ToWire Uses

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
}

Package hyphenated_file imports 8 packages (graph). Updated 2020-04-01. Refresh now. Tools for package owners.