Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit802993c

Browse files
committed
implement yaml methods
1 parentdbea003 commit802993c

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

‎cli/clibase/values.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,17 @@ func (e *Enum) String() string {
517517
return*e.Value
518518
}
519519

520+
func (e*Enum)MarshalYAML() (interface{},error) {
521+
return yaml.Node{
522+
Kind:yaml.ScalarNode,
523+
Value:e.String(),
524+
},nil
525+
}
526+
527+
func (e*Enum)UnmarshalYAML(n*yaml.Node)error {
528+
returne.Set(n.Value)
529+
}
530+
520531
typeRegexp regexp.Regexp
521532

522533
func (r*Regexp)MarshalJSON() ([]byte,error) {

‎cli/testdata/server-config.yaml.golden

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -402,18 +402,9 @@ cacheDir: [cache dir]
402402
# Controls whether data will be stored in an in-memory database.
403403
# (default: <unset>, type: bool)
404404
inMemoryDatabase: false
405-
# URL of a PostgreSQL database. If empty, PostgreSQL binaries will be downloaded
406-
# from Maven (https://repo1.maven.org/maven2) and store all data in the config
407-
# root. Access the built-in database with "coder server postgres-builtin-url".
408-
# (default: <unset>, type: string)
409-
pgConnectionURL: ""
410405
# Type of auth to use when connecting to postgres.
411406
# (default: password, type: enum[password\|awsrdsiam])
412-
pgAuth:
413-
choices:
414-
- password
415-
- awsrdsiam
416-
value: password
407+
pgAuth: password
417408
# The algorithm to use for generating ssh keys. Accepted values are "ed25519",
418409
# "ecdsa", or "rsa4096".
419410
# (default: ed25519, type: string)

‎codersdk/deployment.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,6 @@ when required by your organization's security policy.`,
16231623
Env:"CODER_PG_CONNECTION_URL",
16241624
Annotations: clibase.Annotations{}.Mark(annotationSecretKey,"true"),
16251625
Value:&c.PostgresURL,
1626-
YAML:"pgConnectionURL",
16271626
},
16281627
{
16291628
Name:"Postgres Auth",

‎docs/cli/server.md

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp