MCPcopy Create free account
hub / github.com/google/go-cloud / Encode

Method Encode

docstore/driver/document.go:171–176  ·  view source on GitHub ↗

Encode encodes the document using the given Encoder.

(e Encoder)

Source from the content-addressed store, hash-verified

169
170// Encode encodes the document using the given Encoder.
171func (d Document) Encode(e Encoder) error {
172 if d.m != nil {
173 return encodeMap(reflect.ValueOf(d.m), e)
174 }
175 return encodeStructWithFields(d.s, d.fields, e)
176}
177
178// Decode decodes the document using the given Decoder.
179func (d Document) Decode(dec Decoder) error {

Callers 15

applyPrefixParamFunction · 0.45
URLFromKeyMethod · 0.45
getMACMethod · 0.45
setAttrsFunction · 0.45
processOrderMethod · 0.45
TestOpenFunction · 0.45
OpenPostgresURLMethod · 0.45
OpenPostgresURLMethod · 0.45
encodeDocFunction · 0.45
saveDocsFunction · 0.45
encodeDocFunction · 0.45
encodeDocFunction · 0.45

Calls 2

encodeMapFunction · 0.85
encodeStructWithFieldsFunction · 0.85

Tested by 3

TestOpenFunction · 0.36
TestKafkaKeyFunction · 0.36
gobMarshalFunction · 0.36