Documentation
¶
Index ¶
- Variables
- type Bounce_Bounce_Args
- func (v *Bounce_Bounce_Args) Decode(sr stream.Reader) error
- func (v *Bounce_Bounce_Args) Encode(sw stream.Writer) error
- func (v *Bounce_Bounce_Args) EnvelopeType() wire.EnvelopeType
- func (v *Bounce_Bounce_Args) Equals(rhs *Bounce_Bounce_Args) bool
- func (v *Bounce_Bounce_Args) FromWire(w wire.Value) error
- func (v *Bounce_Bounce_Args) GetMsg() (o string)
- func (v *Bounce_Bounce_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
- func (v *Bounce_Bounce_Args) MethodName() string
- func (v *Bounce_Bounce_Args) String() string
- func (v *Bounce_Bounce_Args) ToWire() (wire.Value, error)
- type Bounce_Bounce_Result
- func (v *Bounce_Bounce_Result) Decode(sr stream.Reader) error
- func (v *Bounce_Bounce_Result) Encode(sw stream.Writer) error
- func (v *Bounce_Bounce_Result) EnvelopeType() wire.EnvelopeType
- func (v *Bounce_Bounce_Result) Equals(rhs *Bounce_Bounce_Result) bool
- func (v *Bounce_Bounce_Result) FromWire(w wire.Value) error
- func (v *Bounce_Bounce_Result) GetSuccess() (o string)
- func (v *Bounce_Bounce_Result) IsSetSuccess() bool
- func (v *Bounce_Bounce_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
- func (v *Bounce_Bounce_Result) MethodName() string
- func (v *Bounce_Bounce_Result) String() string
- func (v *Bounce_Bounce_Result) ToWire() (wire.Value, error)
Constants ¶
This section is empty.
Variables ¶
var Bounce_Bounce_Helper = struct { // Args accepts the parameters of bounce in-order and returns // the arguments struct for the function. Args func( msg string, ) *Bounce_Bounce_Args // IsException returns true if the given error can be thrown // by bounce. // // An error can be thrown by bounce only if the // corresponding exception type was mentioned in the 'throws' // section for it in the Thrift file. IsException func(error) bool // WrapResponse returns the result struct for bounce // given its return value and error. // // This allows mapping values and errors returned by // bounce into a serializable result struct. // WrapResponse returns a non-nil error if the provided // error cannot be thrown by bounce // // value, err := bounce(args) // result, err := Bounce_Bounce_Helper.WrapResponse(value, err) // if err != nil { // return fmt.Errorf("unexpected error from bounce: %v", err) // } // serialize(result) WrapResponse func(string, error) (*Bounce_Bounce_Result, error) // UnwrapResponse takes the result struct for bounce // and returns the value or error returned by it. // // The error is non-nil only if bounce threw an // exception. // // result := deserialize(bytes) // value, err := Bounce_Bounce_Helper.UnwrapResponse(result) UnwrapResponse func(*Bounce_Bounce_Result) (string, error) }{}
Bounce_Bounce_Helper provides functions that aid in handling the parameters and return values of the Bounce.bounce function.
Functions ¶
This section is empty.
Types ¶
type Bounce_Bounce_Args ¶
type Bounce_Bounce_Args struct {
Msg string `json:"msg,required"`
}
Bounce_Bounce_Args represents the arguments for the Bounce.bounce function.
The arguments for bounce are sent and received over the wire as this struct.
func (*Bounce_Bounce_Args) Decode ¶
func (v *Bounce_Bounce_Args) Decode(sr stream.Reader) error
Decode deserializes a Bounce_Bounce_Args struct directly from its Thrift-level representation, without going through an intemediary type.
An error is returned if a Bounce_Bounce_Args struct could not be generated from the wire representation.
func (*Bounce_Bounce_Args) Encode ¶
func (v *Bounce_Bounce_Args) Encode(sw stream.Writer) error
Encode serializes a Bounce_Bounce_Args struct directly into bytes, without going through an intermediary type.
An error is returned if a Bounce_Bounce_Args struct could not be encoded.
func (*Bounce_Bounce_Args) EnvelopeType ¶
func (v *Bounce_Bounce_Args) EnvelopeType() wire.EnvelopeType
EnvelopeType returns the kind of value inside this struct.
This will always be Call for this struct.
func (*Bounce_Bounce_Args) Equals ¶
func (v *Bounce_Bounce_Args) Equals(rhs *Bounce_Bounce_Args) bool
Equals returns true if all the fields of this Bounce_Bounce_Args match the provided Bounce_Bounce_Args.
This function performs a deep comparison.
func (*Bounce_Bounce_Args) FromWire ¶
func (v *Bounce_Bounce_Args) FromWire(w wire.Value) error
FromWire deserializes a Bounce_Bounce_Args 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 Bounce_Bounce_Args struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v Bounce_Bounce_Args if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*Bounce_Bounce_Args) GetMsg ¶
func (v *Bounce_Bounce_Args) GetMsg() (o string)
GetMsg returns the value of Msg if it is set or its zero value if it is unset.
func (*Bounce_Bounce_Args) MarshalLogObject ¶
func (v *Bounce_Bounce_Args) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Bounce_Bounce_Args.
func (*Bounce_Bounce_Args) MethodName ¶
func (v *Bounce_Bounce_Args) MethodName() string
MethodName returns the name of the Thrift function as specified in the IDL, for which this struct represent the arguments.
This will always be "bounce" for this struct.
func (*Bounce_Bounce_Args) String ¶
func (v *Bounce_Bounce_Args) String() string
String returns a readable string representation of a Bounce_Bounce_Args struct.
func (*Bounce_Bounce_Args) ToWire ¶
func (v *Bounce_Bounce_Args) ToWire() (wire.Value, error)
ToWire translates a Bounce_Bounce_Args 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 Bounce_Bounce_Result ¶
type Bounce_Bounce_Result struct { // Value returned by bounce after a successful execution. Success *string `json:"success,omitempty"` }
Bounce_Bounce_Result represents the result of a Bounce.bounce function call.
The result of a bounce execution is sent and received over the wire as this struct.
Success is set only if the function did not throw an exception.
func (*Bounce_Bounce_Result) Decode ¶
func (v *Bounce_Bounce_Result) Decode(sr stream.Reader) error
Decode deserializes a Bounce_Bounce_Result struct directly from its Thrift-level representation, without going through an intemediary type.
An error is returned if a Bounce_Bounce_Result struct could not be generated from the wire representation.
func (*Bounce_Bounce_Result) Encode ¶
func (v *Bounce_Bounce_Result) Encode(sw stream.Writer) error
Encode serializes a Bounce_Bounce_Result struct directly into bytes, without going through an intermediary type.
An error is returned if a Bounce_Bounce_Result struct could not be encoded.
func (*Bounce_Bounce_Result) EnvelopeType ¶
func (v *Bounce_Bounce_Result) EnvelopeType() wire.EnvelopeType
EnvelopeType returns the kind of value inside this struct.
This will always be Reply for this struct.
func (*Bounce_Bounce_Result) Equals ¶
func (v *Bounce_Bounce_Result) Equals(rhs *Bounce_Bounce_Result) bool
Equals returns true if all the fields of this Bounce_Bounce_Result match the provided Bounce_Bounce_Result.
This function performs a deep comparison.
func (*Bounce_Bounce_Result) FromWire ¶
func (v *Bounce_Bounce_Result) FromWire(w wire.Value) error
FromWire deserializes a Bounce_Bounce_Result 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 Bounce_Bounce_Result struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v Bounce_Bounce_Result if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*Bounce_Bounce_Result) GetSuccess ¶
func (v *Bounce_Bounce_Result) GetSuccess() (o string)
GetSuccess returns the value of Success if it is set or its zero value if it is unset.
func (*Bounce_Bounce_Result) IsSetSuccess ¶
func (v *Bounce_Bounce_Result) IsSetSuccess() bool
IsSetSuccess returns true if Success is not nil.
func (*Bounce_Bounce_Result) MarshalLogObject ¶
func (v *Bounce_Bounce_Result) MarshalLogObject(enc zapcore.ObjectEncoder) (err error)
MarshalLogObject implements zapcore.ObjectMarshaler, enabling fast logging of Bounce_Bounce_Result.
func (*Bounce_Bounce_Result) MethodName ¶
func (v *Bounce_Bounce_Result) MethodName() string
MethodName returns the name of the Thrift function as specified in the IDL, for which this struct represent the result.
This will always be "bounce" for this struct.
func (*Bounce_Bounce_Result) String ¶
func (v *Bounce_Bounce_Result) String() string
String returns a readable string representation of a Bounce_Bounce_Result struct.
func (*Bounce_Bounce_Result) ToWire ¶
func (v *Bounce_Bounce_Result) ToWire() (wire.Value, error)
ToWire translates a Bounce_Bounce_Result 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 }