Skip to content

feat: Support config files with viper #4558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
305f2af
wip
f0ssel Oct 13, 2022
bf152f3
idk
f0ssel Oct 14, 2022
3794097
add script
f0ssel Oct 17, 2022
d819ef6
get working with normal fields
f0ssel Oct 17, 2022
14cdd59
get formatting right
f0ssel Oct 17, 2022
a819afd
make arrays work
f0ssel Oct 17, 2022
976be19
support structs
f0ssel Oct 18, 2022
ddfd59f
rename
f0ssel Oct 18, 2022
817704c
fix
f0ssel Oct 18, 2022
451b7c4
more fix
f0ssel Oct 18, 2022
8928789
relay
f0ssel Oct 18, 2022
bc53e5e
fix env
f0ssel Oct 18, 2022
387293e
pass tests
f0ssel Oct 18, 2022
65d73b4
fix tests
f0ssel Oct 18, 2022
c098307
docs
f0ssel Oct 18, 2022
de46a07
remove script test
f0ssel Oct 18, 2022
65d7d56
fix gen
f0ssel Oct 18, 2022
3826228
fix gen
f0ssel Oct 18, 2022
c14f58e
frontend refactor
f0ssel Oct 18, 2022
e306ff1
back to reflect
f0ssel Oct 18, 2022
3cafe7a
more convert
f0ssel Oct 18, 2022
cb95772
move to reflect
f0ssel Oct 19, 2022
45dd962
clean docs
f0ssel Oct 19, 2022
687f474
fix ent
f0ssel Oct 20, 2022
b776d7d
lint
f0ssel Oct 20, 2022
eac9ad3
make gen
f0ssel Oct 20, 2022
42e70ee
try supporting flag
f0ssel Oct 20, 2022
3940948
fix tests
f0ssel Oct 21, 2022
dd2f4ff
add back test
f0ssel Oct 21, 2022
26e698d
add back test2
f0ssel Oct 21, 2022
b3c1ec8
centralize flag name
f0ssel Oct 21, 2022
63587f6
fix ts
f0ssel Oct 21, 2022
d947363
fix ts
f0ssel Oct 21, 2022
9520daf
fix merge
f0ssel Oct 21, 2022
555aaac
make fmt
f0ssel Oct 21, 2022
ef682b9
remove verbose from flag set
f0ssel Oct 21, 2022
ee1ac0b
add json flags
f0ssel Oct 21, 2022
301e4e7
remove server.yaml
f0ssel Oct 21, 2022
8e2e900
fix ts
f0ssel Oct 21, 2022
0d548ed
ensure as much parity as possible
f0ssel Oct 21, 2022
c85657b
revert tls breaking changes
f0ssel Oct 21, 2022
903db7f
make gen
f0ssel Oct 21, 2022
8fae06a
fix docs
f0ssel Oct 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cli/config/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import (
"path/filepath"
)

const (
FlagName = "global-config"
)

// Root represents the configuration directory.
type Root string

Expand Down Expand Up @@ -42,6 +46,10 @@ func (r Root) PostgresPort() File {
return File(filepath.Join(r.PostgresPath(), "port"))
}

func (r Root) DeploymentConfigPath() string {
return filepath.Join(string(r), "server.yaml")
}

// File provides convenience methods for interacting with *os.File.
type File string

Expand Down
Loading