Quellcode durchsuchen

SecretRequestOptions -> SecretRequestOption

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Evan Hazlett vor 8 Jahren
Ursprung
Commit
5b2230a38b
3 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  1. 2 2
      api/types/client.go
  2. 1 1
      cli/command/service/parse.go
  3. 3 3
      opts/secret.go

+ 2 - 2
api/types/client.go

@@ -341,8 +341,8 @@ type PluginInstallOptions struct {
 	Args                  []string
 }
 
-// SecretRequestOptions is a type for requesting secrets
-type SecretRequestOptions struct {
+// SecretRequestOption is a type for requesting secrets
+type SecretRequestOption struct {
 	Source string
 	Target string
 	UID    string

+ 1 - 1
cli/command/service/parse.go

@@ -12,7 +12,7 @@ import (
 
 // parseSecrets retrieves the secrets from the requested names and converts
 // them to secret references to use with the spec
-func parseSecrets(client client.APIClient, requestedSecrets []*types.SecretRequestOptions) ([]*swarmtypes.SecretReference, error) {
+func parseSecrets(client client.APIClient, requestedSecrets []*types.SecretRequestOption) ([]*swarmtypes.SecretReference, error) {
 	secretRefs := make(map[string]*swarmtypes.SecretReference)
 	ctx := context.Background()
 

+ 3 - 3
opts/secret.go

@@ -13,7 +13,7 @@ import (
 
 // SecretOpt is a Value type for parsing secrets
 type SecretOpt struct {
-	values []*types.SecretRequestOptions
+	values []*types.SecretRequestOption
 }
 
 // Set a new secret value
@@ -24,7 +24,7 @@ func (o *SecretOpt) Set(value string) error {
 		return err
 	}
 
-	options := &types.SecretRequestOptions{
+	options := &types.SecretRequestOption{
 		Source: "",
 		Target: "",
 		UID:    "0",
@@ -102,6 +102,6 @@ func (o *SecretOpt) String() string {
 }
 
 // Value returns the secret requests
-func (o *SecretOpt) Value() []*types.SecretRequestOptions {
+func (o *SecretOpt) Value() []*types.SecretRequestOption {
 	return o.values
 }