Documentation
¶
Index ¶
- Variables
- type DoesNotExistException
- func (v *DoesNotExistException) Decode(sr stream.Reader) error
- func (v *DoesNotExistException) Encode(sw stream.Writer) error
- func (v *DoesNotExistException) Equals(rhs *DoesNotExistException) bool
- func (v *DoesNotExistException) Error() string
- func (*DoesNotExistException) ErrorName() string
- func (v *DoesNotExistException) FromWire(w wire.Value) error
- func (v *DoesNotExistException) GetError2() (o string)
- func (v *DoesNotExistException) GetKey() (o string)
- func (v *DoesNotExistException) GetUserName() (o string)
- func (v *DoesNotExistException) IsSetError2() bool
- func (v *DoesNotExistException) IsSetUserName() bool
- func (v *DoesNotExistException) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
- func (v *DoesNotExistException) String() string
- func (v *DoesNotExistException) ToWire() (wire.Value, error)
- type DoesNotExistException2
- func (v *DoesNotExistException2) Decode(sr stream.Reader) error
- func (v *DoesNotExistException2) Encode(sw stream.Writer) error
- func (v *DoesNotExistException2) Equals(rhs *DoesNotExistException2) bool
- func (v *DoesNotExistException2) Error() string
- func (*DoesNotExistException2) ErrorName() string
- func (v *DoesNotExistException2) FromWire(w wire.Value) error
- func (v *DoesNotExistException2) GetError2() (o string)
- func (v *DoesNotExistException2) GetKey() (o string)
- func (v *DoesNotExistException2) IsSetError2() bool
- func (v *DoesNotExistException2) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
- func (v *DoesNotExistException2) String() string
- func (v *DoesNotExistException2) ToWire() (wire.Value, error)
- type EmptyException
- func (v *EmptyException) Decode(sr stream.Reader) error
- func (v *EmptyException) Encode(sw stream.Writer) error
- func (v *EmptyException) Equals(rhs *EmptyException) bool
- func (v *EmptyException) Error() string
- func (*EmptyException) ErrorName() string
- func (v *EmptyException) FromWire(w wire.Value) error
- func (v *EmptyException) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
- func (v *EmptyException) String() string
- func (v *EmptyException) ToWire() (wire.Value, error)
Constants ¶
This section is empty.
Variables ¶
var ThriftModule = &thriftreflect.ThriftModule{
Name: "exceptions",
Package: "go.uber.org/thriftrw/gen/internal/tests/exceptions",
FilePath: "exceptions.thrift",
SHA1: "671449b355e9a5f64483f157e93dc762fe3d1944",
Raw: rawIDL,
}
ThriftModule represents the IDL file used to generate this package.
Functions ¶
This section is empty.
Types ¶
type DoesNotExistException ¶
type DoesNotExistException struct { // Key that was missing. Key string `json:"key,required"` Error2 *string `json:"Error,omitempty"` UserName *string `json:"userName,omitempty"` }
Raised when something doesn't exist.
func (*DoesNotExistException) Decode ¶ added in v1.29.0
func (v *DoesNotExistException) Decode(sr stream.Reader) error
Decode deserializes a DoesNotExistException struct directly from its Thrift-level representation, without going through an intemediary type.
An error is returned if a DoesNotExistException struct could not be generated from the wire representation.
func (*DoesNotExistException) Encode ¶ added in v1.29.0
func (v *DoesNotExistException) Encode(sw stream.Writer) error
Encode serializes a DoesNotExistException struct directly into bytes, without going through an intermediary type.
An error is returned if a DoesNotExistException struct could not be encoded.
func (*DoesNotExistException) Equals ¶
func (v *DoesNotExistException) Equals(rhs *DoesNotExistException) bool
Equals returns true if all the fields of this DoesNotExistException match the provided DoesNotExistException.
This function performs a deep comparison.
func (*DoesNotExistException) Error ¶
func (v *DoesNotExistException) Error() string
func (*DoesNotExistException) ErrorName ¶ added in v1.21.0
func (*DoesNotExistException) ErrorName() string
ErrorName is the name of this type as defined in the Thrift file.
func (*DoesNotExistException) FromWire ¶
func (v *DoesNotExistException) FromWire(w wire.Value) error
FromWire deserializes a DoesNotExistException 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 DoesNotExistException struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v DoesNotExistException if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*DoesNotExistException) GetError2 ¶
func (v *DoesNotExistException) GetError2() (o string)
GetError2 returns the value of Error2 if it is set or its zero value if it is unset.
func (*DoesNotExistException) GetKey ¶
func (v *DoesNotExistException) GetKey() (o string)
GetKey returns the value of Key if it is set or its zero value if it is unset.
func (*DoesNotExistException) GetUserName ¶ added in v1.32.0
func (v *DoesNotExistException) GetUserName() (o string)
GetUserName returns the value of UserName if it is set or its zero value if it is unset.
func (*DoesNotExistException) IsSetError2 ¶ added in v1.14.0
func (v *DoesNotExistException) IsSetError2() bool
IsSetError2 returns true if Error2 is not nil.
func (*DoesNotExistException) IsSetUserName ¶ added in v1.32.0
func (v *DoesNotExistException) IsSetUserName() bool
IsSetUserName returns true if UserName is not nil.
func (*DoesNotExistException) MarshalLogObject ¶
func (v *DoesNotExistException) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of DoesNotExistException.
func (*DoesNotExistException) String ¶
func (v *DoesNotExistException) String() string
String returns a readable string representation of a DoesNotExistException struct.
func (*DoesNotExistException) ToWire ¶
func (v *DoesNotExistException) ToWire() (wire.Value, error)
ToWire translates a DoesNotExistException 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 DoesNotExistException2 ¶ added in v1.21.0
type DoesNotExistException2 struct { // Key that was missing. Key string `json:"key,required"` Error2 *string `json:"Error,omitempty"` }
func (*DoesNotExistException2) Decode ¶ added in v1.29.0
func (v *DoesNotExistException2) Decode(sr stream.Reader) error
Decode deserializes a DoesNotExistException2 struct directly from its Thrift-level representation, without going through an intemediary type.
An error is returned if a DoesNotExistException2 struct could not be generated from the wire representation.
func (*DoesNotExistException2) Encode ¶ added in v1.29.0
func (v *DoesNotExistException2) Encode(sw stream.Writer) error
Encode serializes a DoesNotExistException2 struct directly into bytes, without going through an intermediary type.
An error is returned if a DoesNotExistException2 struct could not be encoded.
func (*DoesNotExistException2) Equals ¶ added in v1.21.0
func (v *DoesNotExistException2) Equals(rhs *DoesNotExistException2) bool
Equals returns true if all the fields of this DoesNotExistException2 match the provided DoesNotExistException2.
This function performs a deep comparison.
func (*DoesNotExistException2) Error ¶ added in v1.21.0
func (v *DoesNotExistException2) Error() string
func (*DoesNotExistException2) ErrorName ¶ added in v1.21.0
func (*DoesNotExistException2) ErrorName() string
ErrorName is the name of this type as defined in the Thrift file.
func (*DoesNotExistException2) FromWire ¶ added in v1.21.0
func (v *DoesNotExistException2) FromWire(w wire.Value) error
FromWire deserializes a DoesNotExistException2 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 DoesNotExistException2 struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v DoesNotExistException2 if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*DoesNotExistException2) GetError2 ¶ added in v1.21.0
func (v *DoesNotExistException2) GetError2() (o string)
GetError2 returns the value of Error2 if it is set or its zero value if it is unset.
func (*DoesNotExistException2) GetKey ¶ added in v1.21.0
func (v *DoesNotExistException2) GetKey() (o string)
GetKey returns the value of Key if it is set or its zero value if it is unset.
func (*DoesNotExistException2) IsSetError2 ¶ added in v1.21.0
func (v *DoesNotExistException2) IsSetError2() bool
IsSetError2 returns true if Error2 is not nil.
func (*DoesNotExistException2) MarshalLogObject ¶ added in v1.21.0
func (v *DoesNotExistException2) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of DoesNotExistException2.
func (*DoesNotExistException2) String ¶ added in v1.21.0
func (v *DoesNotExistException2) String() string
String returns a readable string representation of a DoesNotExistException2 struct.
func (*DoesNotExistException2) ToWire ¶ added in v1.21.0
func (v *DoesNotExistException2) ToWire() (wire.Value, error)
ToWire translates a DoesNotExistException2 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 EmptyException ¶
type EmptyException struct { }
func (*EmptyException) Decode ¶ added in v1.29.0
func (v *EmptyException) Decode(sr stream.Reader) error
Decode deserializes a EmptyException struct directly from its Thrift-level representation, without going through an intemediary type.
An error is returned if a EmptyException struct could not be generated from the wire representation.
func (*EmptyException) Encode ¶ added in v1.29.0
func (v *EmptyException) Encode(sw stream.Writer) error
Encode serializes a EmptyException struct directly into bytes, without going through an intermediary type.
An error is returned if a EmptyException struct could not be encoded.
func (*EmptyException) Equals ¶
func (v *EmptyException) Equals(rhs *EmptyException) bool
Equals returns true if all the fields of this EmptyException match the provided EmptyException.
This function performs a deep comparison.
func (*EmptyException) Error ¶
func (v *EmptyException) Error() string
func (*EmptyException) ErrorName ¶ added in v1.21.0
func (*EmptyException) ErrorName() string
ErrorName is the name of this type as defined in the Thrift file.
func (*EmptyException) FromWire ¶
func (v *EmptyException) FromWire(w wire.Value) error
FromWire deserializes a EmptyException 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 EmptyException struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v EmptyException if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*EmptyException) MarshalLogObject ¶
func (v *EmptyException) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of EmptyException.
func (*EmptyException) String ¶
func (v *EmptyException) String() string
String returns a readable string representation of a EmptyException struct.
func (*EmptyException) ToWire ¶
func (v *EmptyException) ToWire() (wire.Value, error)
ToWire translates a EmptyException 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 }