Changed config json and yaml tags to PascalCase from camelCase

This commit is contained in:
Kelvin Clement Mwinuka
2024-02-03 06:46:49 +08:00
parent 69c9170f56
commit 8c35d3b001

View File

@@ -14,28 +14,28 @@ import (
) )
type Config struct { type Config struct {
TLS bool `json:"tls" yaml:"tls"` TLS bool `json:"TLS" yaml:"TLS"`
MTLS bool `json:"mtls" yaml:"mtls"` MTLS bool `json:"MTLS" yaml:"MTLS"`
CertKeyPairs [][]string `json:"certKeyPairs" yaml:"certKeyPairs"` CertKeyPairs [][]string `json:"CertKeyPairs" yaml:"CertKeyPairs"`
ClientCAs []string `json:"ClientCAs" yaml:"ClientCAs"` ClientCAs []string `json:"ClientCAs" yaml:"ClientCAs"`
Port uint16 `json:"port" yaml:"port"` Port uint16 `json:"Port" yaml:"Port"`
PluginDir string `json:"plugins" yaml:"plugins"` PluginDir string `json:"Plugins" yaml:"Plugins"`
ServerID string `json:"serverId" yaml:"serverId"` ServerID string `json:"ServerId" yaml:"ServerId"`
JoinAddr string `json:"joinAddr" yaml:"joinAddr"` JoinAddr string `json:"JoinAddr" yaml:"JoinAddr"`
BindAddr string `json:"bindAddr" yaml:"bindAddr"` BindAddr string `json:"BindAddr" yaml:"BindAddr"`
RaftBindPort uint16 `json:"raftPort" yaml:"raftPort"` RaftBindPort uint16 `json:"RaftPort" yaml:"RaftPort"`
MemberListBindPort uint16 `json:"mlPort" yaml:"mlPort"` MemberListBindPort uint16 `json:"MlPort" yaml:"MlPort"`
InMemory bool `json:"inMemory" yaml:"inMemory"` InMemory bool `json:"InMemory" yaml:"InMemory"`
DataDir string `json:"dataDir" yaml:"dataDir"` DataDir string `json:"DataDir" yaml:"DataDir"`
BootstrapCluster bool `json:"BootstrapCluster" yaml:"bootstrapCluster"` BootstrapCluster bool `json:"BootstrapCluster" yaml:"BootstrapCluster"`
AclConfig string `json:"AclConfig" yaml:"AclConfig"` AclConfig string `json:"AclConfig" yaml:"AclConfig"`
ForwardCommand bool `json:"forwardCommand" yaml:"forwardCommand"` ForwardCommand bool `json:"ForwardCommand" yaml:"ForwardCommand"`
RequirePass bool `json:"requirePass" yaml:"requirePass"` RequirePass bool `json:"RequirePass" yaml:"RequirePass"`
Password string `json:"password" yaml:"password"` Password string `json:"Password" yaml:"Password"`
SnapShotThreshold uint64 `json:"snapshotThreshold" yaml:"snapshotThreshold"` SnapShotThreshold uint64 `json:"SnapshotThreshold" yaml:"SnapshotThreshold"`
SnapshotInterval time.Duration `json:"snapshotInterval" yaml:"snapshotInterval"` SnapshotInterval time.Duration `json:"SnapshotInterval" yaml:"SnapshotInterval"`
RestoreSnapshot bool `json:"restoreSnapshot" yaml:"restoreSnapshot"` RestoreSnapshot bool `json:"RestoreSnapshot" yaml:"RestoreSnapshot"`
RestoreAOF bool `json:"restoreAOF" yaml:"restoreAOF"` RestoreAOF bool `json:"RestoreAOF" yaml:"RestoreAOF"`
} }
func GetConfig() (Config, error) { func GetConfig() (Config, error) {