Documentation ¶
Index ¶
- Variables
- type ExWithAnnotation
- func (v *ExWithAnnotation) Decode(sr stream.Reader) error
- func (v *ExWithAnnotation) Encode(sw stream.Writer) error
- func (v *ExWithAnnotation) Equals(rhs *ExWithAnnotation) bool
- func (v *ExWithAnnotation) Error() string
- func (*ExWithAnnotation) ErrorName() string
- func (v *ExWithAnnotation) FromWire(w wire.Value) error
- func (v *ExWithAnnotation) GetFoo() (o string)
- func (v *ExWithAnnotation) IsSetFoo() bool
- func (v *ExWithAnnotation) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
- func (v *ExWithAnnotation) String() string
- func (v *ExWithAnnotation) ToWire() (wire.Value, error)
- func (e *ExWithAnnotation) YARPCErrorCode() *yarpcerrors.Code
- func (e *ExWithAnnotation) YARPCErrorName() string
- type ExWithoutAnnotation
- func (v *ExWithoutAnnotation) Decode(sr stream.Reader) error
- func (v *ExWithoutAnnotation) Encode(sw stream.Writer) error
- func (v *ExWithoutAnnotation) Equals(rhs *ExWithoutAnnotation) bool
- func (v *ExWithoutAnnotation) Error() string
- func (*ExWithoutAnnotation) ErrorName() string
- func (v *ExWithoutAnnotation) FromWire(w wire.Value) error
- func (v *ExWithoutAnnotation) GetBar() (o string)
- func (v *ExWithoutAnnotation) IsSetBar() bool
- func (v *ExWithoutAnnotation) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
- func (v *ExWithoutAnnotation) String() string
- func (v *ExWithoutAnnotation) ToWire() (wire.Value, error)
- func (e *ExWithoutAnnotation) YARPCErrorCode() *yarpcerrors.Code
- func (e *ExWithoutAnnotation) YARPCErrorName() string
- type Struct
- func (v *Struct) Decode(sr stream.Reader) error
- func (v *Struct) Encode(sw stream.Writer) error
- func (v *Struct) Equals(rhs *Struct) bool
- func (v *Struct) FromWire(w wire.Value) error
- func (v *Struct) GetBaz() (o string)
- func (v *Struct) IsSetBaz() bool
- func (v *Struct) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
- func (v *Struct) String() string
- func (v *Struct) ToWire() (wire.Value, error)
Constants ¶
This section is empty.
Variables ¶
var ThriftModule = &thriftreflect.ThriftModule{
Name: "NOSERVICES",
Package: "go.uber.org/yarpc/encoding/thrift/thriftrw-plugin-yarpc/internal/tests/NOSERVICES",
FilePath: "NOSERVICES.thrift",
SHA1: "bc28a223c8e87e320722bf77136e0eec1f1d18d6",
Raw: rawIDL,
}
ThriftModule represents the IDL file used to generate this package.
Functions ¶
This section is empty.
Types ¶
type ExWithAnnotation ¶
type ExWithAnnotation struct {
Foo *string `json:"foo,omitempty"`
}
func (*ExWithAnnotation) Decode ¶ added in v1.57.0
func (v *ExWithAnnotation) Decode(sr stream.Reader) error
Decode deserializes a ExWithAnnotation struct directly from its Thrift-level representation, without going through an intemediary type.
An error is returned if a ExWithAnnotation struct could not be generated from the wire representation.
func (*ExWithAnnotation) Encode ¶ added in v1.57.0
func (v *ExWithAnnotation) Encode(sw stream.Writer) error
Encode serializes a ExWithAnnotation struct directly into bytes, without going through an intermediary type.
An error is returned if a ExWithAnnotation struct could not be encoded.
func (*ExWithAnnotation) Equals ¶
func (v *ExWithAnnotation) Equals(rhs *ExWithAnnotation) bool
Equals returns true if all the fields of this ExWithAnnotation match the provided ExWithAnnotation.
This function performs a deep comparison.
func (*ExWithAnnotation) Error ¶
func (v *ExWithAnnotation) Error() string
func (*ExWithAnnotation) ErrorName ¶
func (*ExWithAnnotation) ErrorName() string
ErrorName is the name of this type as defined in the Thrift file.
func (*ExWithAnnotation) FromWire ¶
func (v *ExWithAnnotation) FromWire(w wire.Value) error
FromWire deserializes a ExWithAnnotation 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 ExWithAnnotation struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v ExWithAnnotation if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*ExWithAnnotation) GetFoo ¶
func (v *ExWithAnnotation) GetFoo() (o string)
GetFoo returns the value of Foo if it is set or its zero value if it is unset.
func (*ExWithAnnotation) IsSetFoo ¶
func (v *ExWithAnnotation) IsSetFoo() bool
IsSetFoo returns true if Foo is not nil.
func (*ExWithAnnotation) MarshalLogObject ¶
func (v *ExWithAnnotation) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of ExWithAnnotation.
func (*ExWithAnnotation) String ¶
func (v *ExWithAnnotation) String() string
String returns a readable string representation of a ExWithAnnotation struct.
func (*ExWithAnnotation) ToWire ¶
func (v *ExWithAnnotation) ToWire() (wire.Value, error)
ToWire translates a ExWithAnnotation 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 }
func (*ExWithAnnotation) YARPCErrorCode ¶
func (e *ExWithAnnotation) YARPCErrorCode() *yarpcerrors.Code
YARPCErrorCode returns a yarpcerrors.CodeOutOfRange for ExWithAnnotation.
This is derived from the rpc.code annotation on the Thrift exception.
func (*ExWithAnnotation) YARPCErrorName ¶
func (e *ExWithAnnotation) YARPCErrorName() string
Name is the error name for ExWithAnnotation.
type ExWithoutAnnotation ¶
type ExWithoutAnnotation struct {
Bar *string `json:"bar,omitempty"`
}
func (*ExWithoutAnnotation) Decode ¶ added in v1.57.0
func (v *ExWithoutAnnotation) Decode(sr stream.Reader) error
Decode deserializes a ExWithoutAnnotation struct directly from its Thrift-level representation, without going through an intemediary type.
An error is returned if a ExWithoutAnnotation struct could not be generated from the wire representation.
func (*ExWithoutAnnotation) Encode ¶ added in v1.57.0
func (v *ExWithoutAnnotation) Encode(sw stream.Writer) error
Encode serializes a ExWithoutAnnotation struct directly into bytes, without going through an intermediary type.
An error is returned if a ExWithoutAnnotation struct could not be encoded.
func (*ExWithoutAnnotation) Equals ¶
func (v *ExWithoutAnnotation) Equals(rhs *ExWithoutAnnotation) bool
Equals returns true if all the fields of this ExWithoutAnnotation match the provided ExWithoutAnnotation.
This function performs a deep comparison.
func (*ExWithoutAnnotation) Error ¶
func (v *ExWithoutAnnotation) Error() string
func (*ExWithoutAnnotation) ErrorName ¶
func (*ExWithoutAnnotation) ErrorName() string
ErrorName is the name of this type as defined in the Thrift file.
func (*ExWithoutAnnotation) FromWire ¶
func (v *ExWithoutAnnotation) FromWire(w wire.Value) error
FromWire deserializes a ExWithoutAnnotation 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 ExWithoutAnnotation struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v ExWithoutAnnotation if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*ExWithoutAnnotation) GetBar ¶
func (v *ExWithoutAnnotation) GetBar() (o string)
GetBar returns the value of Bar if it is set or its zero value if it is unset.
func (*ExWithoutAnnotation) IsSetBar ¶
func (v *ExWithoutAnnotation) IsSetBar() bool
IsSetBar returns true if Bar is not nil.
func (*ExWithoutAnnotation) MarshalLogObject ¶
func (v *ExWithoutAnnotation) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of ExWithoutAnnotation.
func (*ExWithoutAnnotation) String ¶
func (v *ExWithoutAnnotation) String() string
String returns a readable string representation of a ExWithoutAnnotation struct.
func (*ExWithoutAnnotation) ToWire ¶
func (v *ExWithoutAnnotation) ToWire() (wire.Value, error)
ToWire translates a ExWithoutAnnotation 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 }
func (*ExWithoutAnnotation) YARPCErrorCode ¶
func (e *ExWithoutAnnotation) YARPCErrorCode() *yarpcerrors.Code
YARPCErrorCode returns nil for ExWithoutAnnotation.
This is derived from the rpc.code annotation on the Thrift exception.
func (*ExWithoutAnnotation) YARPCErrorName ¶
func (e *ExWithoutAnnotation) YARPCErrorName() string
Name is the error name for ExWithoutAnnotation.
type Struct ¶
type Struct struct {
Baz *string `json:"baz,omitempty"`
}
func (*Struct) Decode ¶ added in v1.57.0
Decode deserializes a Struct struct directly from its Thrift-level representation, without going through an intemediary type.
An error is returned if a Struct struct could not be generated from the wire representation.
func (*Struct) Encode ¶ added in v1.57.0
Encode serializes a Struct struct directly into bytes, without going through an intermediary type.
An error is returned if a Struct struct could not be encoded.
func (*Struct) Equals ¶
Equals returns true if all the fields of this Struct match the provided Struct.
This function performs a deep comparison.
func (*Struct) FromWire ¶
FromWire deserializes a Struct 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 Struct struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v Struct if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*Struct) GetBaz ¶
GetBaz returns the value of Baz if it is set or its zero value if it is unset.
func (*Struct) MarshalLogObject ¶
func (v *Struct) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Struct.
func (*Struct) ToWire ¶
ToWire translates a Struct 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 }