MarshalJSON returns marshaled JSON bytes corresponding to this config.
()
| 576 | |
| 577 | // MarshalJSON returns marshaled JSON bytes corresponding to this config. |
| 578 | func (c *Config) MarshalJSON() ([]byte, error) { |
| 579 | config := &configJSON{ |
| 580 | XDSServers: c.xDSServers, |
| 581 | CertificateProviders: c.cpcs, |
| 582 | ServerListenerResourceNameTemplate: c.serverListenerResourceNameTemplate, |
| 583 | ClientDefaultListenerResourceNameTemplate: c.clientDefaultListenerResourceNameTemplate, |
| 584 | Authorities: c.authorities, |
| 585 | Node: c.node, |
| 586 | } |
| 587 | return json.MarshalIndent(config, " ", " ") |
| 588 | } |
| 589 | |
| 590 | // UnmarshalJSON takes the json data (the complete bootstrap configuration) and |
| 591 | // unmarshals it to the struct. |
no outgoing calls
no test coverage detected