exceptions

package
v1.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ThriftModule = &thriftreflect.ThriftModule{
	Name:     "exceptions",
	Package:  "go.uber.org/thriftrw/gen/internal/tests/exceptions",
	FilePath: "exceptions.thrift",
	SHA1:     "a31a29f9f7bca3221100e43e32b0d833ca9c774e",
	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

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) 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 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) Equals added in v1.21.0

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) 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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL