MCPcopy
hub / github.com/keploy/keploy / Marshal

Method Marshal

pkg/http2.go:54–59  ·  view source on GitHub ↗

server already knows this one

(v interface{})

Source from the content-addressed store, hash-verified

52
53func (passthroughCodec) Name() string { return "proto" } // server already knows this one
54func (passthroughCodec) Marshal(v interface{}) ([]byte, error) {
55 if m, ok := v.(*rawMessage); ok {
56 return m.data, nil // send bytes exactly as we received them
57 }
58 return proto.Marshal(v.(proto.Message))
59}
60func (passthroughCodec) Unmarshal(data []byte, v interface{}) error {
61 if m, ok := v.(*rawMessage); ok {
62 m.data = append([]byte(nil), data...)

Callers 15

ProtoWireToJSONFunction · 0.80
WriteMethod · 0.80
jsonEscapeStringFunction · 0.80
SimulateGRPCFunction · 0.80
prepareHTTPRequestFunction · 0.80
canonicalizeNDJSONLineFunction · 0.80
canonicalizeSSEDataValueFunction · 0.80
MarshalRequestBodiesFunction · 0.80
MarshalResponseBodiesFunction · 0.80
ValidateAndMarshalJSONFunction · 0.80

Calls

no outgoing calls