endpoint

package
v0.0.0-...-3c3176f Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2017 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCountEndpoint

func MakeCountEndpoint(svc service.StringService) endpoint.Endpoint

MakeCountEndpoint constructs a Count endpoint wrapping the service.

func MakeUppercaseEndpoint

func MakeUppercaseEndpoint(svc service.StringService) endpoint.Endpoint

MakeUppercaseEndpoint constructs an Uppercase endpoint wrapping the service.

Types

type CountRequest

type CountRequest struct {
	S string `json:"s"`
}

CountRequest collects the request parameters for the Count method.

type CountResponse

type CountResponse struct {
	V int `json:"v"`
}

CountResponse collects the response values for the Count method.

type Set

type Set struct {
	UppercaseEndpoint endpoint.Endpoint
	CountEndpoint     endpoint.Endpoint
}

Set collects all of the endpoints that compose an add service. It's meant to be used as a helper struct, to collect all of the endpoints into a single parameter.

func New

func New(svc service.StringService) Set

New returns a Set that wraps the provided server, and wires in all of the expected endpoint middlewares via the various parameters.

type UppercaseRequest

type UppercaseRequest struct {
	S string `json:"s"`
}

UppercaseRequest collects the request parameters for the Uppercase method.

type UppercaseResponse

type UppercaseResponse struct {
	V   string `json:"v"`
	Err string `json:"err,omitempty"`
}

UppercaseResponse collects the response values for the Uppercase method.

Jump to

Keyboard shortcuts

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