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

Method Delete

collections.go:121–128  ·  view source on GitHub ↗

Delete removes from a collection the object having the given ID.

(ctx context.Context, collection, id string)

Source from the content-addressed store, hash-verified

119
120// Delete removes from a collection the object having the given ID.
121func (c *CollectionsClient) Delete(ctx context.Context, collection, id string) (*BaseResponse, error) {
122 if collection == "" {
123 return nil, errors.New("collection name required")
124 }
125 endpoint := c.client.makeEndpoint("collections/%s/%s/", collection, id)
126
127 return decode(c.client.delete(ctx, endpoint, nil, c.client.authenticator.collectionsAuth))
128}
129
130// CreateReference returns a new reference string in the form SO:<collection>:<id>.
131func (c *CollectionsClient) CreateReference(collection, id string) string {

Callers

nothing calls this directly

Calls 3

decodeFunction · 0.85
makeEndpointMethod · 0.80
deleteMethod · 0.80

Tested by

no test coverage detected