Documentation ¶
Overview ¶
Package httpconfig implement httpconfig
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 over http.
func NewService ¶
func NewService(opts ...Option) *ConfigService
NewService create new ConfigService.
func (*ConfigService) GetConsortium ¶
func (cs *ConfigService) GetConsortium(url, domain string) (*models.ConsortiumFileData, error)
GetConsortium fetches and parses the consortium file at the given domain.
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 fetches and parses a stakeholder file under the given url with the given domain.
type Option ¶
type Option func(opts *ConfigService)
Option is a config service instance option.
func WithTLSConfig ¶
WithTLSConfig option is for definition of secured HTTP transport using a tls.Config instance.
Click to show internal directories.
Click to hide internal directories.