Skip to content
Snippets Groups Projects

Create SET cache endpoint

Merged Yordan Kinkov requested to merge 3-implement-cache-set-endpoint into main
All threads resolved!
16 files
+ 483
65
Compare changes
  • Side-by-side
  • Inline
Files
16
  • 5251adf9
    #3 add GOA dsl for cache set endpoint · 5251adf9
    Yordan Kinkov authored
+ 9
1
@@ -16,12 +16,14 @@ import (
// Client is the "cache" service client.
type Client struct {
GetEndpoint goa.Endpoint
SetEndpoint goa.Endpoint
}
// NewClient initializes a "cache" service client given the endpoints.
func NewClient(get goa.Endpoint) *Client {
func NewClient(get, set goa.Endpoint) *Client {
return &Client{
GetEndpoint: get,
SetEndpoint: set,
}
}
@@ -34,3 +36,9 @@ func (c *Client) Get(ctx context.Context, p *CacheGetRequest) (res []byte, err e
}
return ires.([]byte), nil
}
// Set calls the "Set" endpoint of the "cache" service.
func (c *Client) Set(ctx context.Context, p *CacheSetRequest) (err error) {
_, err = c.SetEndpoint(ctx, p)
return
}
Loading