mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-17 05:20:47 +08:00
Changed config json and yaml tags to PascalCase from camelCase
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user