Documentation ¶
Overview ¶
Package updatevalidationconfig implement updatevalidationconfig
Index ¶
- type ConfigService
- func (cs *ConfigService) AddGenesisFile(url, domain string, genesisFile []byte) error
- func (cs *ConfigService) GetConsortium(url, domain string) (*models.ConsortiumFileData, error)
- func (cs *ConfigService) GetSidetreeConfig(url string) (*models.SidetreeConfig, error)
- func (cs *ConfigService) GetStakeholder(url, domain string) (*models.StakeholderFileData, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigService ¶
type ConfigService struct {
// contains filtered or unexported fields
}
ConfigService fetches consortium and stakeholder configs Caches the current consortium config, and when updating, uses signature validation to verify that the updated consortium config is a valid update to the current one.
func NewService ¶
func NewService(config config) *ConfigService
NewService create new ConfigService.
func (*ConfigService) AddGenesisFile ¶
func (cs *ConfigService) AddGenesisFile(url, domain string, genesisFile []byte) error
AddGenesisFile adds a genesis file to the config.
func (*ConfigService) GetConsortium ¶
func (cs *ConfigService) GetConsortium(url, domain string) (*models.ConsortiumFileData, error)
GetConsortium fetches and parses the consortium file at the given domain, validating it against a cached version of the file. Validation passes if the retrieved file is either:
a) the same as the cached file or b) a valid successor, endorsed by the cached file.
func (*ConfigService) GetSidetreeConfig ¶
func (cs *ConfigService) GetSidetreeConfig(url string) (*models.SidetreeConfig, error)
GetSidetreeConfig get sidetree config.
func (*ConfigService) GetStakeholder ¶
func (cs *ConfigService) GetStakeholder(url, domain string) (*models.StakeholderFileData, error)
GetStakeholder returns the stakeholder config file fetched by the wrapped config service.