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