Documentation ¶
Index ¶
Constants ¶
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 ¶
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 ¶
NewFooMethodEndpoint returns an endpoint function that calls the method "FooMethod" of service "FooService".
Types ¶
type Client ¶
Client is the "FooService" service client.
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 Endpoints ¶
Endpoints wraps the "FooService" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "FooService" service with 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.