MCPcopy
hub / github.com/nats-io/nats.go / PutString

Method PutString

object.go:864–866  ·  view source on GitHub ↗

PutString is convenience function to put a string into this object store.

(name string, data string, opts ...ObjectOpt)

Source from the content-addressed store, hash-verified

862
863// PutString is convenience function to put a string into this object store.
864func (obs *obs) PutString(name string, data string, opts ...ObjectOpt) (*ObjectInfo, error) {
865 return obs.Put(&ObjectMeta{Name: name}, strings.NewReader(data), opts...)
866}
867
868// GetString is a convenience function to pull an object from this object store and return it as a string.
869func (obs *obs) GetString(name string, opts ...GetObjectOpt) (string, error) {

Callers

nothing calls this directly

Calls 1

PutMethod · 0.95

Tested by

no test coverage detected