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

Method attach

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

Source from the content-addressed store, hash-verified

246}
247
248func (f *rotateFlags) attach(opts *serpent.OptionSet) {
249 *opts = append(
250 *opts,
251 serpent.Option{
252 Flag: "postgres-url",
253 Env: "CODER_PG_CONNECTION_URL",
254 Description: "The connection URL for the Postgres database.",
255 Value: serpent.StringOf(&f.PostgresURL),
256 },
257 serpent.Option{
258 Name: "Postgres Connection Auth",
259 Description: "Type of auth to use when connecting to postgres.",
260 Flag: "postgres-connection-auth",
261 Env: "CODER_PG_CONNECTION_AUTH",
262 Default: "password",
263 Value: serpent.EnumOf(&f.PostgresAuth, codersdk.PostgresAuthDrivers...),
264 },
265 serpent.Option{
266 Flag: "new-key",
267 Env: "CODER_EXTERNAL_TOKEN_ENCRYPTION_ENCRYPT_NEW_KEY",
268 Description: "The new external token encryption key. Must be base64-encoded.",
269 Value: serpent.StringOf(&f.New),
270 },
271 serpent.Option{
272 Flag: "old-keys",
273 Env: "CODER_EXTERNAL_TOKEN_ENCRYPTION_ENCRYPT_OLD_KEYS",
274 Description: "The old external token encryption keys. Must be a comma-separated list of base64-encoded keys.",
275 Value: serpent.StringArrayOf(&f.Old),
276 },
277 cliui.SkipPromptOption(),
278 )
279}
280
281func (f *rotateFlags) valid() error {
282 if f.PostgresURL == "" {

Callers 1

dbcryptRotateCmdMethod · 0.95

Calls 1

SkipPromptOptionFunction · 0.92

Tested by

no test coverage detected