()
| 80 | } |
| 81 | |
| 82 | func (c *KVMetadataPatchCommand) Flags() *FlagSets { |
| 83 | set := c.flagSet(FlagSetHTTP | FlagSetOutputFormat) |
| 84 | |
| 85 | // Common Options |
| 86 | f := set.NewFlagSet("Common Options") |
| 87 | |
| 88 | f.IntVar(&IntVar{ |
| 89 | Name: "max-versions", |
| 90 | Target: &c.flagMaxVersions, |
| 91 | Default: -1, |
| 92 | Usage: `The number of versions to keep. If not set, the backend’s configured max version is used.`, |
| 93 | }) |
| 94 | |
| 95 | f.BoolPtrVar(&BoolPtrVar{ |
| 96 | Name: "cas-required", |
| 97 | Target: &c.flagCASRequired, |
| 98 | Usage: `If true the key will require the cas parameter to be set on all write requests. If false, the backend’s configuration will be used.`, |
| 99 | }) |
| 100 | |
| 101 | f.DurationVar(&DurationVar{ |
| 102 | Name: "delete-version-after", |
| 103 | Target: &c.flagDeleteVersionAfter, |
| 104 | Default: -1, |
| 105 | EnvVar: "", |
| 106 | Completion: complete.PredictAnything, |
| 107 | Usage: `Specifies the length of time before a version is deleted. |
| 108 | If not set, the backend's configured delete-version-after is used. Cannot be |
| 109 | greater than the backend's delete-version-after. The delete-version-after is |
| 110 | specified as a numeric string with a suffix like "30s" or |
| 111 | "3h25m19s".`, |
| 112 | }) |
| 113 | |
| 114 | f.StringMapVar(&StringMapVar{ |
| 115 | Name: "custom-metadata", |
| 116 | Target: &c.flagCustomMetadata, |
| 117 | Default: map[string]string{}, |
| 118 | Usage: `Specifies arbitrary version-agnostic key=value metadata meant to describe a secret. |
| 119 | This can be specified multiple times to add multiple pieces of metadata.`, |
| 120 | }) |
| 121 | |
| 122 | f.StringSliceVar(&StringSliceVar{ |
| 123 | Name: "remove-custom-metadata", |
| 124 | Target: &c.flagRemoveCustomMetadata, |
| 125 | Default: []string{}, |
| 126 | Usage: "Key to remove from custom metadata. To specify multiple values, specify this flag multiple times.", |
| 127 | }) |
| 128 | |
| 129 | f.StringVar(&StringVar{ |
| 130 | Name: "mount", |
| 131 | Target: &c.flagMount, |
| 132 | Default: "", // no default, because the handling of the next arg is determined by whether this flag has a value |
| 133 | Usage: `Specifies the path where the KV backend is mounted. If specified, |
| 134 | the next argument will be interpreted as the secret path. If this flag is |
| 135 | not specified, the next argument will be interpreted as the combined mount |
| 136 | path and secret path, with /metadata/ automatically appended between KV |
| 137 | v2 secrets.`, |
| 138 | }) |
| 139 |
no test coverage detected