greeterendpoint

package
v0.0.0-...-cb8cfd3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2022 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeGreetingEndpoint

func MakeGreetingEndpoint(s greeterservice.Service) server.JSONContextEndpoint

MakeGreetingEndpoint constructs a Greeting endpoint.

func MakeHealthEndpoint

func MakeHealthEndpoint(s greeterservice.Service) server.JSONContextEndpoint

MakeHealthEndpoint constructs a Health endpoint.

Types

type Endpoints

type Endpoints struct {
	HealthEndpoint   server.JSONContextEndpoint
	GreetingEndpoint server.JSONContextEndpoint
}

Endpoints collects all of the endpoints that compose a greeter service.

func MakeServerEndpoints

func MakeServerEndpoints(s greeterservice.Service) Endpoints

MakeServerEndpoints returns service Endoints

type GreetingRequest

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

GreetingRequest collects the request parameters for the Greeting method.

type GreetingResponse

type GreetingResponse struct {
	Greeting string `json:"greeting,omitempty"`
}

GreetingResponse collects the response values for the Greeting method.

type HealthRequest

type HealthRequest struct{}

HealthRequest collects the request parameters for the Health method.

type HealthResponse

type HealthResponse struct {
	Healthy bool `json:"healthy,omitempty"`
}

HealthResponse collects the response values for the Health method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL