hello

package
v0.0.0-...-02e4f75 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "hello"

ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.

Variables

View Source
var MethodNames = [1]string{"say-hello"}

MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.

Functions

func NewSayHelloEndpoint

func NewSayHelloEndpoint(s Service) goa.Endpoint

NewSayHelloEndpoint returns an endpoint function that calls the method "say-hello" of service "hello".

Types

type Client

type Client struct {
	SayHelloEndpoint goa.Endpoint
}

Client is the "hello" service client.

func NewClient

func NewClient(sayHello goa.Endpoint) *Client

NewClient initializes a "hello" service client given the endpoints.

func (*Client) SayHello

func (c *Client) SayHello(ctx context.Context, p *SayHelloPayload) (res string, err error)

SayHello calls the "say-hello" endpoint of the "hello" service.

type Endpoints

type Endpoints struct {
	SayHello goa.Endpoint
}

Endpoints wraps the "hello" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "hello" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "hello" service endpoints.

type SayHelloPayload

type SayHelloPayload struct {
	// The name to say hello to
	Name string
}

SayHelloPayload is the payload type of the hello service say-hello method.

type Service

type Service interface {
	// SayHello implements say-hello.
	SayHello(context.Context, *SayHelloPayload) (res string, err error)
}

The hello service, it says hello

Jump to

Keyboard shortcuts

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