updatevalidationconfig

package
v0.0.0-...-1a43f7c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package updatevalidationconfig implement updatevalidationconfig

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL