fooservice

package
v0.0.0-...-9b758a2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "FooService"

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{"FooMethod"}

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 NewFooMethodEndpoint

func NewFooMethodEndpoint(s Service) goa.Endpoint

NewFooMethodEndpoint returns an endpoint function that calls the method "FooMethod" of service "FooService".

Types

type Bar

type Bar struct {
	Bar uint
}

type Client

type Client struct {
	FooMethodEndpoint goa.Endpoint
}

Client is the "FooService" service client.

func NewClient

func NewClient(fooMethod goa.Endpoint) *Client

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

func (*Client) FooMethod

func (c *Client) FooMethod(ctx context.Context, p *FooMethodPayload) (res []*ExampleType, err error)

FooMethod calls the "FooMethod" endpoint of the "FooService" service.

type DateTime

type DateTime string

type Endpoints

type Endpoints struct {
	FooMethod goa.Endpoint
}

Endpoints wraps the "FooService" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

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

func (*Endpoints) Use

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

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

type ExampleType

type ExampleType struct {
	FieldWithExtension *FieldWithExtension
	External           *types.ExternalType
	SecondExternal     *types.SecondExternalType
	DateField          DateTime
}

type FieldWithExtension

type FieldWithExtension struct {
	BarField *Bar
}

type FooMethodPayload

type FooMethodPayload struct {
	FieldWithExtension *FieldWithExtension
	External           *types.ExternalType
	SecondExternal     *types.SecondExternalType
	DateField          DateTime
}

FooMethodPayload is the payload type of the FooService service FooMethod method.

type Service

type Service interface {
	// FooMethod implements FooMethod.
	FooMethod(context.Context, *FooMethodPayload) (res []*ExampleType, err error)
}

Service is the FooService service interface.

Jump to

Keyboard shortcuts

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