-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.go
37 lines (31 loc) · 837 Bytes
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Code generated by goa v3.7.13, DO NOT EDIT.
//
// FooService client
//
// Command:
// $ goa gen
// github.com/ernesto-jimenez/example-failing-goa-design/design/example -o .
package fooservice
import (
"context"
goa "goa.design/goa/v3/pkg"
)
// Client is the "FooService" service client.
type Client struct {
FooMethodEndpoint goa.Endpoint
}
// NewClient initializes a "FooService" service client given the endpoints.
func NewClient(fooMethod goa.Endpoint) *Client {
return &Client{
FooMethodEndpoint: fooMethod,
}
}
// FooMethod calls the "FooMethod" endpoint of the "FooService" service.
func (c *Client) FooMethod(ctx context.Context, p *FooMethodPayload) (res []*ExampleType, err error) {
var ires interface{}
ires, err = c.FooMethodEndpoint(ctx, p)
if err != nil {
return
}
return ires.([]*ExampleType), nil
}