compose/ecs/pkg/amazon/secrets.go
aiordache d09c8c7236
add private images support
Signed-off-by: aiordache <anca.iordache@docker.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-08-17 21:25:49 +02:00

31 lines
882 B
Go

package amazon
import (
"context"
"github.com/docker/ecs-plugin/pkg/docker"
)
type secretsAPI interface {
CreateSecret(ctx context.Context, secret docker.Secret) (string, error)
InspectSecret(ctx context.Context, id string) (docker.Secret, error)
ListSecrets(ctx context.Context) ([]docker.Secret, error)
DeleteSecret(ctx context.Context, id string, recover bool) error
}
func (c client) CreateSecret(ctx context.Context, secret docker.Secret) (string, error) {
return c.api.CreateSecret(ctx, secret)
}
func (c client) InspectSecret(ctx context.Context, id string) (docker.Secret, error) {
return c.api.InspectSecret(ctx, id)
}
func (c client) ListSecrets(ctx context.Context) ([]docker.Secret, error) {
return c.api.ListSecrets(ctx)
}
func (c client) DeleteSecret(ctx context.Context, id string, recover bool) error {
return c.api.DeleteSecret(ctx, id, recover)
}