Documentation ¶
Index ¶
- Variables
- type BaseService_Healthy_Args
- func (v *BaseService_Healthy_Args) EnvelopeType() wire.EnvelopeType
- func (v *BaseService_Healthy_Args) Equals(rhs *BaseService_Healthy_Args) bool
- func (v *BaseService_Healthy_Args) FromWire(w wire.Value) error
- func (v *BaseService_Healthy_Args) MethodName() string
- func (v *BaseService_Healthy_Args) String() string
- func (v *BaseService_Healthy_Args) ToWire() (wire.Value, error)
- type BaseService_Healthy_Result
- func (v *BaseService_Healthy_Result) EnvelopeType() wire.EnvelopeType
- func (v *BaseService_Healthy_Result) Equals(rhs *BaseService_Healthy_Result) bool
- func (v *BaseService_Healthy_Result) FromWire(w wire.Value) error
- func (v *BaseService_Healthy_Result) GetSuccess() (o bool)
- func (v *BaseService_Healthy_Result) MethodName() string
- func (v *BaseService_Healthy_Result) String() string
- func (v *BaseService_Healthy_Result) ToWire() (wire.Value, error)
- type ExtendEmpty_Hello_Args
- func (v *ExtendEmpty_Hello_Args) EnvelopeType() wire.EnvelopeType
- func (v *ExtendEmpty_Hello_Args) Equals(rhs *ExtendEmpty_Hello_Args) bool
- func (v *ExtendEmpty_Hello_Args) FromWire(w wire.Value) error
- func (v *ExtendEmpty_Hello_Args) MethodName() string
- func (v *ExtendEmpty_Hello_Args) String() string
- func (v *ExtendEmpty_Hello_Args) ToWire() (wire.Value, error)
- type ExtendEmpty_Hello_Result
- func (v *ExtendEmpty_Hello_Result) EnvelopeType() wire.EnvelopeType
- func (v *ExtendEmpty_Hello_Result) Equals(rhs *ExtendEmpty_Hello_Result) bool
- func (v *ExtendEmpty_Hello_Result) FromWire(w wire.Value) error
- func (v *ExtendEmpty_Hello_Result) MethodName() string
- func (v *ExtendEmpty_Hello_Result) String() string
- func (v *ExtendEmpty_Hello_Result) ToWire() (wire.Value, error)
Constants ¶
This section is empty.
Variables ¶
var BaseService_Healthy_Helper = struct { // Args accepts the parameters of healthy in-order and returns // the arguments struct for the function. Args func() *BaseService_Healthy_Args // IsException returns true if the given error can be thrown // by healthy. // // An error can be thrown by healthy 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 healthy // given its return value and error. // // This allows mapping values and errors returned by // healthy into a serializable result struct. // WrapResponse returns a non-nil error if the provided // error cannot be thrown by healthy // // value, err := healthy(args) // result, err := BaseService_Healthy_Helper.WrapResponse(value, err) // if err != nil { // return fmt.Errorf("unexpected error from healthy: %v", err) // } // serialize(result) WrapResponse func(bool, error) (*BaseService_Healthy_Result, error) // UnwrapResponse takes the result struct for healthy // and returns the value or error returned by it. // // The error is non-nil only if healthy threw an // exception. // // result := deserialize(bytes) // value, err := BaseService_Healthy_Helper.UnwrapResponse(result) UnwrapResponse func(*BaseService_Healthy_Result) (bool, error) }{}
BaseService_Healthy_Helper provides functions that aid in handling the parameters and return values of the BaseService.healthy function.
var ExtendEmpty_Hello_Helper = struct { // Args accepts the parameters of hello in-order and returns // the arguments struct for the function. Args func() *ExtendEmpty_Hello_Args // IsException returns true if the given error can be thrown // by hello. // // An error can be thrown by hello 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 hello // given the error returned by it. The provided error may // be nil if hello did not fail. // // This allows mapping errors returned by hello into a // serializable result struct. WrapResponse returns a // non-nil error if the provided error cannot be thrown by // hello // // err := hello(args) // result, err := ExtendEmpty_Hello_Helper.WrapResponse(err) // if err != nil { // return fmt.Errorf("unexpected error from hello: %v", err) // } // serialize(result) WrapResponse func(error) (*ExtendEmpty_Hello_Result, error) // UnwrapResponse takes the result struct for hello // and returns the erorr returned by it (if any). // // The error is non-nil only if hello threw an // exception. // // result := deserialize(bytes) // err := ExtendEmpty_Hello_Helper.UnwrapResponse(result) UnwrapResponse func(*ExtendEmpty_Hello_Result) error }{}
ExtendEmpty_Hello_Helper provides functions that aid in handling the parameters and return values of the ExtendEmpty.hello function.
var ThriftModule = &thriftreflect.ThriftModule{
Name: "common",
Package: "go.uber.org/yarpc/encoding/thrift/thriftrw-plugin-yarpc/internal/tests/common",
FilePath: "common.thrift",
SHA1: "1bd2b34a2289d2767d66eff00fa74778a14a625f",
Raw: rawIDL,
}
ThriftModule represents the IDL file used to generate this package.
Functions ¶
This section is empty.
Types ¶
type BaseService_Healthy_Args ¶
type BaseService_Healthy_Args struct { }
BaseService_Healthy_Args represents the arguments for the BaseService.healthy function.
The arguments for healthy are sent and received over the wire as this struct.
func (*BaseService_Healthy_Args) EnvelopeType ¶
func (v *BaseService_Healthy_Args) EnvelopeType() wire.EnvelopeType
EnvelopeType returns the kind of value inside this struct.
This will always be Call for this struct.
func (*BaseService_Healthy_Args) Equals ¶ added in v1.8.0
func (v *BaseService_Healthy_Args) Equals(rhs *BaseService_Healthy_Args) bool
Equals returns true if all the fields of this BaseService_Healthy_Args match the provided BaseService_Healthy_Args.
This function performs a deep comparison.
func (*BaseService_Healthy_Args) FromWire ¶
func (v *BaseService_Healthy_Args) FromWire(w wire.Value) error
FromWire deserializes a BaseService_Healthy_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 BaseService_Healthy_Args struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v BaseService_Healthy_Args if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*BaseService_Healthy_Args) MethodName ¶
func (v *BaseService_Healthy_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 "healthy" for this struct.
func (*BaseService_Healthy_Args) String ¶
func (v *BaseService_Healthy_Args) String() string
String returns a readable string representation of a BaseService_Healthy_Args struct.
func (*BaseService_Healthy_Args) ToWire ¶
func (v *BaseService_Healthy_Args) ToWire() (wire.Value, error)
ToWire translates a BaseService_Healthy_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 BaseService_Healthy_Result ¶
type BaseService_Healthy_Result struct { // Value returned by healthy after a successful execution. Success *bool `json:"success,omitempty"` }
BaseService_Healthy_Result represents the result of a BaseService.healthy function call.
The result of a healthy execution is sent and received over the wire as this struct.
Success is set only if the function did not throw an exception.
func (*BaseService_Healthy_Result) EnvelopeType ¶
func (v *BaseService_Healthy_Result) EnvelopeType() wire.EnvelopeType
EnvelopeType returns the kind of value inside this struct.
This will always be Reply for this struct.
func (*BaseService_Healthy_Result) Equals ¶ added in v1.8.0
func (v *BaseService_Healthy_Result) Equals(rhs *BaseService_Healthy_Result) bool
Equals returns true if all the fields of this BaseService_Healthy_Result match the provided BaseService_Healthy_Result.
This function performs a deep comparison.
func (*BaseService_Healthy_Result) FromWire ¶
func (v *BaseService_Healthy_Result) FromWire(w wire.Value) error
FromWire deserializes a BaseService_Healthy_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 BaseService_Healthy_Result struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v BaseService_Healthy_Result if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*BaseService_Healthy_Result) GetSuccess ¶ added in v1.14.0
func (v *BaseService_Healthy_Result) GetSuccess() (o bool)
GetSuccess returns the value of Success if it is set or its zero value if it is unset.
func (*BaseService_Healthy_Result) MethodName ¶
func (v *BaseService_Healthy_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 "healthy" for this struct.
func (*BaseService_Healthy_Result) String ¶
func (v *BaseService_Healthy_Result) String() string
String returns a readable string representation of a BaseService_Healthy_Result struct.
func (*BaseService_Healthy_Result) ToWire ¶
func (v *BaseService_Healthy_Result) ToWire() (wire.Value, error)
ToWire translates a BaseService_Healthy_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 }
type ExtendEmpty_Hello_Args ¶
type ExtendEmpty_Hello_Args struct { }
ExtendEmpty_Hello_Args represents the arguments for the ExtendEmpty.hello function.
The arguments for hello are sent and received over the wire as this struct.
func (*ExtendEmpty_Hello_Args) EnvelopeType ¶
func (v *ExtendEmpty_Hello_Args) EnvelopeType() wire.EnvelopeType
EnvelopeType returns the kind of value inside this struct.
This will always be Call for this struct.
func (*ExtendEmpty_Hello_Args) Equals ¶ added in v1.8.0
func (v *ExtendEmpty_Hello_Args) Equals(rhs *ExtendEmpty_Hello_Args) bool
Equals returns true if all the fields of this ExtendEmpty_Hello_Args match the provided ExtendEmpty_Hello_Args.
This function performs a deep comparison.
func (*ExtendEmpty_Hello_Args) FromWire ¶
func (v *ExtendEmpty_Hello_Args) FromWire(w wire.Value) error
FromWire deserializes a ExtendEmpty_Hello_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 ExtendEmpty_Hello_Args struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v ExtendEmpty_Hello_Args if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*ExtendEmpty_Hello_Args) MethodName ¶
func (v *ExtendEmpty_Hello_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 "hello" for this struct.
func (*ExtendEmpty_Hello_Args) String ¶
func (v *ExtendEmpty_Hello_Args) String() string
String returns a readable string representation of a ExtendEmpty_Hello_Args struct.
func (*ExtendEmpty_Hello_Args) ToWire ¶
func (v *ExtendEmpty_Hello_Args) ToWire() (wire.Value, error)
ToWire translates a ExtendEmpty_Hello_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 ExtendEmpty_Hello_Result ¶
type ExtendEmpty_Hello_Result struct { }
ExtendEmpty_Hello_Result represents the result of a ExtendEmpty.hello function call.
The result of a hello execution is sent and received over the wire as this struct.
func (*ExtendEmpty_Hello_Result) EnvelopeType ¶
func (v *ExtendEmpty_Hello_Result) EnvelopeType() wire.EnvelopeType
EnvelopeType returns the kind of value inside this struct.
This will always be Reply for this struct.
func (*ExtendEmpty_Hello_Result) Equals ¶ added in v1.8.0
func (v *ExtendEmpty_Hello_Result) Equals(rhs *ExtendEmpty_Hello_Result) bool
Equals returns true if all the fields of this ExtendEmpty_Hello_Result match the provided ExtendEmpty_Hello_Result.
This function performs a deep comparison.
func (*ExtendEmpty_Hello_Result) FromWire ¶
func (v *ExtendEmpty_Hello_Result) FromWire(w wire.Value) error
FromWire deserializes a ExtendEmpty_Hello_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 ExtendEmpty_Hello_Result struct from the provided intermediate representation.
x, err := binaryProtocol.Decode(reader, wire.TStruct) if err != nil { return nil, err } var v ExtendEmpty_Hello_Result if err := v.FromWire(x); err != nil { return nil, err } return &v, nil
func (*ExtendEmpty_Hello_Result) MethodName ¶
func (v *ExtendEmpty_Hello_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 "hello" for this struct.
func (*ExtendEmpty_Hello_Result) String ¶
func (v *ExtendEmpty_Hello_Result) String() string
String returns a readable string representation of a ExtendEmpty_Hello_Result struct.
func (*ExtendEmpty_Hello_Result) ToWire ¶
func (v *ExtendEmpty_Hello_Result) ToWire() (wire.Value, error)
ToWire translates a ExtendEmpty_Hello_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 }
Directories ¶
Path | Synopsis |
---|---|
Package baseservicefx provides better integration for Fx for services implementing or calling BaseService.
|
Package baseservicefx provides better integration for Fx for services implementing or calling BaseService. |
Package emptyservicefx provides better integration for Fx for services implementing or calling EmptyService.
|
Package emptyservicefx provides better integration for Fx for services implementing or calling EmptyService. |
Package extendemptyfx provides better integration for Fx for services implementing or calling ExtendEmpty.
|
Package extendemptyfx provides better integration for Fx for services implementing or calling ExtendEmpty. |
Package extendonlyfx provides better integration for Fx for services implementing or calling ExtendOnly.
|
Package extendonlyfx provides better integration for Fx for services implementing or calling ExtendOnly. |