-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
32 lines (28 loc) · 878 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package src
import (
"encoding/json"
"github.com/lugondev/wallet-signer-manager/pkg/http/server"
"github.com/lugondev/wallet-signer-manager/src/infra/api-key/csv"
"github.com/lugondev/wallet-signer-manager/src/infra/jwt/jose"
"github.com/lugondev/wallet-signer-manager/src/infra/log/zap"
manifestreader "github.com/lugondev/wallet-signer-manager/src/infra/manifests/yaml"
"github.com/lugondev/wallet-signer-manager/src/infra/postgres/client"
tls "github.com/lugondev/wallet-signer-manager/src/infra/tls/filesystem"
)
type Config struct {
HTTP *server.Config
Logger *zap.Config
Postgres *client.Config
OIDC *jose.Config
APIKey *csv.Config
TLS *tls.Config
Manifest *manifestreader.Config
}
func (c Config) ToJson() string {
// convert struct to json
jsonByte, err := json.Marshal(c)
if err != nil {
return ""
}
return string(jsonByte)
}