refactor: resolve circular import
This commit is contained in:
@ -3,8 +3,6 @@ package client
|
||||
import (
|
||||
"context"
|
||||
|
||||
appPkg "coopcloud.tech/abra/pkg/app"
|
||||
"github.com/docker/docker/api/types/filters"
|
||||
"github.com/docker/docker/api/types/swarm"
|
||||
"github.com/docker/docker/client"
|
||||
)
|
||||
@ -20,20 +18,6 @@ func StoreSecret(cl *client.Client, secretName, secretValue string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetSecretNamesForStack(cl *client.Client, app appPkg.App) ([]string, error) {
|
||||
filters, err := app.Filters(false, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
secretList, err := cl.SecretList(context.Background(), swarm.SecretListOptions{Filters: filters})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return GetSecretNames(secretList), nil
|
||||
}
|
||||
|
||||
func GetSecretNames(secrets []swarm.Secret) []string {
|
||||
var secretNames []string
|
||||
for _, secret := range secrets {
|
||||
|
Reference in New Issue
Block a user