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

Method decode

users.go:14–23  ·  view source on GitHub ↗
(resp []byte, err error)

Source from the content-addressed store, hash-verified

12}
13
14func (c *UsersClient) decode(resp []byte, err error) (*UserResponse, error) {
15 if err != nil {
16 return nil, err
17 }
18 var result UserResponse
19 if err := json.Unmarshal(resp, &result); err != nil {
20 return nil, err
21 }
22 return &result, nil
23}
24
25// Add adds a new user with the specified id and optional extra data.
26func (c *UsersClient) Add(ctx context.Context, user User, getOrCreate bool) (*UserResponse, error) {

Callers 3

AddMethod · 0.95
UpdateMethod · 0.95
GetMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected