Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
type GreetRequest ¶
type GreetRequest struct {
Name string `json:"name,omitempty"`
}
type GreetResponse ¶
type GreetResponse struct { ErrorResponse Message string `json:"message,omitempty"` }
type RPCHandler ¶
var RPCHandlerSpec RPCHandler = &rpcHandler{}
func NewRPCHandler ¶
func NewRPCHandler( svc Service, opt *RPCHandlerOptions, ) RPCHandler
type RPCHandlerOptions ¶
type RPCHandlerOptions struct { }
type SendPostcardRequest ¶
type SendPostcardRequest struct {
Card *Postcard `json:"card,omitempty"`
}
type SendPostcardResponse ¶
type SendPostcardResponse struct {
ErrorResponse
}
type Service ¶
type Service interface { Greet(name string) (message string, err error) SendPostcard(card *Postcard) (err error) }
func NewService ¶
func NewService() Service
type ServiceClient ¶
type ServiceClient interface { Service }
func NewServiceClient ¶
func NewServiceClient( httpClient HTTPClient, opt *ServiceClientOptions, ) ServiceClient
type ServiceClientOptions ¶
type ServiceClientOptions struct { }
Click to show internal directories.
Click to hide internal directories.