httpconfig

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: 10 Imported by: 0

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 WithAuthToken

func WithAuthToken(authToken string) Option

WithAuthToken add auth token.

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) Option

WithTLSConfig option is for definition of secured HTTP transport using a tls.Config instance.

Jump to

Keyboard shortcuts

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