MCPcopy Create free account
hub / github.com/GetStream/stream-go2 / decode

Method decode

personalization.go:15–24  ·  view source on GitHub ↗
(resp []byte, err error)

Source from the content-addressed store, hash-verified

13}
14
15func (c *PersonalizationClient) decode(resp []byte, err error) (*PersonalizationResponse, error) {
16 if err != nil {
17 return nil, err
18 }
19 var result PersonalizationResponse
20 if err := json.Unmarshal(resp, &result); err != nil {
21 return nil, fmt.Errorf("cannot unmarshal resp: %w", err)
22 }
23 return &result, nil
24}
25
26// Get obtains a PersonalizationResponse for the given resource and params.
27func (c *PersonalizationClient) Get(ctx context.Context, resource string, params map[string]any) (*PersonalizationResponse, error) {

Callers 3

GetMethod · 0.95
PostMethod · 0.95
DeleteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected