Skip to content

Commit

Permalink
made config structs public accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoSax committed Jul 27, 2020
1 parent ab9d528 commit e523d48
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions transports/Replicant/v3/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,20 @@ type ServerConfig struct {
Polish polish.ServerConfig
}

func (config ServerConfig) Marshal() (string, error) {
type ClientJSONConfig struct {
Config string `json:"config"`
Address string `json:"address"`
}

type ServerJSONInnerConfig struct {
Config string `json:"config"`
}
type ServerJSONInnerConfig struct {
Config string `json:"config"`
}

type ServerJSONOuterConfig struct {
Replicant ServerJSONInnerConfig
}
type ServerJSONOuterConfig struct {
Replicant ServerJSONInnerConfig
}

func (config ServerConfig) Marshal() (string, error) {
configString, configStringError := config.Encode()
if configStringError != nil {
return "", configStringError
Expand All @@ -69,11 +73,6 @@ func (config ServerConfig) Marshal() (string, error) {

func (config ClientConfig) Marshal() (string, error) {

type ClientJSONConfig struct {
Config string `json:"config"`
Address string `json:"address"`
}

configString, configStringError := config.Encode()
if configStringError != nil {
return "", configStringError
Expand Down

0 comments on commit e523d48

Please sign in to comment.