MCPcopy Create free account
hub / github.com/docker/go-plugins-helpers / Get

Method Get

secrets/api_test.go:82–91  ·  view source on GitHub ↗
(req Request)

Source from the content-addressed store, hash-verified

80var secret = []byte("secret")
81
82func (p *testPlugin) Get(req Request) Response {
83 p.get++
84 if req.SecretName == "" {
85 return Response{Err: "missing secret name"}
86 }
87 if prefix, exists := req.SecretLabels["prefix"]; exists {
88 return Response{Value: append([]byte(prefix), secret...)}
89 }
90 return Response{Value: secret}
91}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected