(opts *serpent.OptionSet)
| 316 | } |
| 317 | |
| 318 | func (f *decryptFlags) attach(opts *serpent.OptionSet) { |
| 319 | *opts = append( |
| 320 | *opts, |
| 321 | serpent.Option{ |
| 322 | Flag: "postgres-url", |
| 323 | Env: "CODER_PG_CONNECTION_URL", |
| 324 | Description: "The connection URL for the Postgres database.", |
| 325 | Value: serpent.StringOf(&f.PostgresURL), |
| 326 | }, |
| 327 | serpent.Option{ |
| 328 | Name: "Postgres Connection Auth", |
| 329 | Description: "Type of auth to use when connecting to postgres.", |
| 330 | Flag: "postgres-connection-auth", |
| 331 | Env: "CODER_PG_CONNECTION_AUTH", |
| 332 | Default: "password", |
| 333 | Value: serpent.EnumOf(&f.PostgresAuth, codersdk.PostgresAuthDrivers...), |
| 334 | }, |
| 335 | serpent.Option{ |
| 336 | Flag: "keys", |
| 337 | Env: "CODER_EXTERNAL_TOKEN_ENCRYPTION_DECRYPT_KEYS", |
| 338 | Description: "Keys required to decrypt existing data. Must be a comma-separated list of base64-encoded keys.", |
| 339 | Value: serpent.StringArrayOf(&f.Keys), |
| 340 | }, |
| 341 | cliui.SkipPromptOption(), |
| 342 | ) |
| 343 | } |
| 344 | |
| 345 | func (f *decryptFlags) valid() error { |
| 346 | if f.PostgresURL == "" { |
no test coverage detected