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

        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

                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

                        type DoesNotExistException2 struct {
                        	// Key that was missing.
                        	Key    string  `json:"key,required"`
                        	Error2 *string `json:"Error,omitempty"`
                        }

                        func (*DoesNotExistException2) Equals

                          Equals returns true if all the fields of this DoesNotExistException2 match the provided DoesNotExistException2.

                          This function performs a deep comparison.

                          func (*DoesNotExistException2) Error

                          func (v *DoesNotExistException2) Error() string

                          func (*DoesNotExistException2) ErrorName

                          func (*DoesNotExistException2) ErrorName() string

                            ErrorName is the name of this type as defined in the Thrift file.

                            func (*DoesNotExistException2) FromWire

                            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

                              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

                                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

                                  func (v *DoesNotExistException2) IsSetError2() bool

                                    IsSetError2 returns true if Error2 is not nil.

                                    func (*DoesNotExistException2) MarshalLogObject

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

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

                                      func (*DoesNotExistException2) String

                                      func (v *DoesNotExistException2) String() string

                                        String returns a readable string representation of a DoesNotExistException2 struct.

                                        func (*DoesNotExistException2) ToWire

                                        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

                                            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
                                                      }
                                                      

                                                      Source Files