-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.go
37 lines (31 loc) · 891 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
package clients
import (
client "clients/gen/client"
"context"
"log"
)
// client service example implementation.
// The example methods log the requests and return zero values.
type clientsrvc struct {
logger *log.Logger
}
// NewClient returns the client service implementation.
func NewClient(logger *log.Logger) client.Service {
return &clientsrvc{logger}
}
// Add implements add.
func (s *clientsrvc) Add(ctx context.Context, p *client.AddPayload) (err error) {
s.logger.Print("client.add")
return
}
// Get implements get.
func (s *clientsrvc) Get(ctx context.Context, p *client.GetPayload) (res *client.ClientManagement, err error) {
res = &client.ClientManagement{}
s.logger.Print("client.get")
return
}
// Show implements show.
func (s *clientsrvc) Show(ctx context.Context) (res client.ClientManagementCollection, err error) {
s.logger.Print("client.show")
return
}