MCPcopy Create free account
hub / github.com/docker/secrets-engine / unpackValue

Function unpackValue

plugins/pass/plugin.go:63–76  ·  view source on GitHub ↗
(id store.ID, secret store.Secret)

Source from the content-addressed store, hash-verified

61}
62
63func unpackValue(id store.ID, secret store.Secret) (*plugin.Envelope, error) {
64 impl, ok := secret.(*pass.PassValue)
65 if !ok {
66 return nil, errUnknownSecretType
67 }
68 value, err := impl.Marshal()
69 if err != nil {
70 return nil, err
71 }
72 return &plugin.Envelope{
73 ID: id,
74 Value: value,
75 }, nil
76}
77
78func (m *passPlugin) Run(ctx context.Context) error {
79 <-ctx.Done()

Callers 1

GetSecretsMethod · 0.85

Calls 1

MarshalMethod · 0.65

Tested by

no test coverage detected