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