MCPcopy Index your code
hub / github.com/coder/coder / attach

Method attach

enterprise/cli/server_dbcrypt.go:318–343  ·  view source on GitHub ↗
(opts *serpent.OptionSet)

Source from the content-addressed store, hash-verified

316}
317
318func (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
345func (f *decryptFlags) valid() error {
346 if f.PostgresURL == "" {

Callers 1

dbcryptDecryptCmdMethod · 0.95

Calls 1

SkipPromptOptionFunction · 0.92

Tested by

no test coverage detected