| 180 | } |
| 181 | |
| 182 | func vaultSpec(c star.Context) blobcache.VolumeSpec { |
| 183 | hashAlgo := blobcache.HashAlgo_BLAKE3_256 |
| 184 | if ha, ok := hashAlgoParam.LoadOpt(c); ok { |
| 185 | hashAlgo = ha |
| 186 | } |
| 187 | secret := blobcache.Secret{} |
| 188 | if s, ok := secretParam.LoadOpt(c); ok { |
| 189 | secret = s |
| 190 | } |
| 191 | return blobcache.VolumeSpec{ |
| 192 | Vault: &blobcache.VolumeBackend_Vault[blobcache.Handle]{ |
| 193 | X: volHParam.Load(c), |
| 194 | HashAlgo: hashAlgo, |
| 195 | Secret: secret, |
| 196 | }, |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | var ivolCmd = star.Command{ |
| 201 | Metadata: star.Metadata{Short: "inspect a volume and print JSON"}, |