Documentation ¶
Index ¶
- Variables
- type DoesNotExistException
- func (v *DoesNotExistException) Equals(rhs *DoesNotExistException) bool
- func (v *DoesNotExistException) Error() string
- func (v *DoesNotExistException) FromWire(w wire.Value) error
- func (v *DoesNotExistException) GetError2() (o string)
- func (v *DoesNotExistException) GetKey() (o string)
- func (v *DoesNotExistException) IsSetError2() bool
- func (v *DoesNotExistException) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
- func (v *DoesNotExistException) String() string
- func (v *DoesNotExistException) ToWire() (wire.Value, error)
- type EmptyException
- func (v *EmptyException) Equals(rhs *EmptyException) bool
- func (v *EmptyException) Error() 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: "743daa9bfc5a3d69637e7c67dd6f35a7d10e79a3",
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"` }
Raised when something doesn't exist.
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) 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) IsSetError2 ¶ added in v1.14.0
func (v *DoesNotExistException) IsSetError2() bool
IsSetError2 returns true if Error2 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 EmptyException ¶
type EmptyException struct { }
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) 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 }