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

Method decodeObject

collections.go:67–76  ·  view source on GitHub ↗
(resp []byte, err error)

Source from the content-addressed store, hash-verified

65}
66
67func (c *CollectionsClient) decodeObject(resp []byte, err error) (*CollectionObjectResponse, error) {
68 if err != nil {
69 return nil, err
70 }
71 var result CollectionObjectResponse
72 if err := json.Unmarshal(resp, &result); err != nil {
73 return nil, err
74 }
75 return &result, nil
76}
77
78// Add adds a single object to a collection.
79func (c *CollectionsClient) Add(ctx context.Context, collection string, object CollectionObject, opts ...AddObjectOption) (*CollectionObjectResponse, error) {

Callers 3

AddMethod · 0.95
GetMethod · 0.95
UpdateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected