sarafu-vise/config/args.go

29 lines
580 B
Go
Raw Normal View History

2025-01-19 17:32:55 +01:00
package config
import (
viseconfig "git.grassecon.net/grassrootseconomics/visedriver/config"
2025-01-22 17:40:32 +01:00
"git.grassecon.net/grassrootseconomics/visedriver/storage"
2025-01-19 17:32:55 +01:00
)
2025-01-22 10:42:39 +01:00
func NewOverride() *viseconfig.Override {
var a string
var b string
var c string
var d string
2025-01-22 10:42:39 +01:00
o := &viseconfig.Override{
2025-01-21 16:43:26 +01:00
DbConn: &a,
StateConn: &b,
2025-01-22 17:40:32 +01:00
StateConnMode: storage.DBMODE_TEXT,
ResourceConn: &c,
2025-01-22 17:40:32 +01:00
ResourceConnMode: storage.DBMODE_TEXT,
2025-01-21 16:43:26 +01:00
UserConn: &d,
2025-01-22 17:40:32 +01:00
UserConnMode: storage.DBMODE_BINARY,
}
return o
}
2025-01-22 10:42:39 +01:00
func Apply(o *viseconfig.Override) error {
viseconfig.ApplyConn(o)
2025-01-19 17:32:55 +01:00
return nil
}