1234567891011121314151617181920 |
- package secret
- import (
- "github.com/docker/docker/api/types"
- "github.com/docker/docker/api/types/filters"
- "github.com/docker/docker/api/types/swarm"
- "github.com/docker/docker/client"
- "golang.org/x/net/context"
- )
- func getSecretsByName(ctx context.Context, client client.APIClient, names []string) ([]swarm.Secret, error) {
- args := filters.NewArgs()
- for _, n := range names {
- args.Add("names", n)
- }
- return client.SecretList(ctx, types.SecretListOptions{
- Filters: args,
- })
- }
|