MCPcopy Index your code
hub / github.com/docker/cli / SecretList

Method SecretList

cli/command/stack/client_test.go:80–93  ·  view source on GitHub ↗
(_ context.Context, options client.SecretListOptions)

Source from the content-addressed store, hash-verified

78}
79
80func (cli *fakeClient) SecretList(_ context.Context, options client.SecretListOptions) (client.SecretListResult, error) {
81 if cli.secretListFunc != nil {
82 return cli.secretListFunc(options)
83 }
84
85 namespace := namespaceFromFilters(options.Filters)
86 secretsList := client.SecretListResult{}
87 for _, name := range cli.secrets {
88 if belongToNamespace(name, namespace) {
89 secretsList.Items = append(secretsList.Items, secretFromName(name))
90 }
91 }
92 return secretsList, nil
93}
94
95func (cli *fakeClient) ConfigList(_ context.Context, options client.ConfigListOptions) (client.ConfigListResult, error) {
96 if cli.configListFunc != nil {

Callers 2

getStackSecretsFunction · 0.45
secretNamesFunction · 0.45

Calls 3

namespaceFromFiltersFunction · 0.85
belongToNamespaceFunction · 0.85
secretFromNameFunction · 0.85

Tested by

no test coverage detected