sarafu-vise/config/args.go

32 lines
505 B
Go
Raw Normal View History

2025-01-19 17:32:55 +01:00
package config
import (
viseconfig "git.grassecon.net/grassrootseconomics/visedriver/config"
)
type Override struct {
2025-01-20 11:28:42 +01:00
DbConn *string
StateConn *string
ResourceConn *string
UserConn *string
2025-01-19 17:32:55 +01:00
}
func NewOverride() *Override {
var a string
var b string
var c string
var d string
o := &Override{
DbConn: &a,
StateConn: &b,
ResourceConn: &c,
UserConn: &d,
}
return o
}
2025-01-19 17:32:55 +01:00
func Apply(o *Override) error {
2025-01-20 11:28:42 +01:00
viseconfig.ApplyConn(o.DbConn, o.StateConn, o.ResourceConn, o.UserConn)
2025-01-19 17:32:55 +01:00
return nil
}