Added Options and Path safety

This commit is contained in:
Pablu23
2023-12-11 12:04:20 +01:00
parent 6f60fe37db
commit e19a9ba4f5
5 changed files with 119 additions and 21 deletions

View File

@@ -0,0 +1,22 @@
package server
type Options struct {
Address string
Datapath string
LoadPrivkey bool
PrivKeyPath string
PubKeyPath string
SavePubKey bool
SavePrivKey bool
}
func NewDefaultOptions() *Options {
return &Options{
Address: "0.0.0.0",
Datapath: "./testFiles/",
LoadPrivkey: false,
SavePrivKey: false,
SavePubKey: true,
PubKeyPath: "pubkey.pem",
}
}