Back to

Package greeter

Latest Go to latest

The highest tagged major version is .

Published: Sep 6, 2019 | License: MIT | Module:


type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`

type GreetRequest

type GreetRequest struct {
	Name string `json:"name,omitempty"`

type GreetResponse

type GreetResponse struct {
	Message string `json:"message,omitempty"`

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)

type Handler

type Handler interface {
	Check(c *gin.Context)
var HandlerSpec Handler = &handler{}

func NewHandler

func NewHandler() Handler

type Postcard

type Postcard struct {
	PictureURL string
	Address    string
	Recipient  string
	Message    string

type RPCHandler

type RPCHandler interface {
	Greet(ctx *gin.Context)
	SendPostcard(ctx *gin.Context)
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 {

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 {

func NewServiceClient

func NewServiceClient(
	httpClient HTTPClient,
	opt *ServiceClientOptions,
) ServiceClient

type ServiceClientOptions

type ServiceClientOptions struct {

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier