initializer

package
v1.0.6-2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDomain

func GetDomain(address string) string

Types

type Config

type Config struct {
	ConfigTxFile       string
	OrdererFile        string
	OrdererV2File      string
	OrdererV24File     string
	OrdererV25File     string
	OUFile             string
	InterOUFile        string
	DeploymentFile     string
	PVCFile            string
	ServiceFile        string
	CMFile             string
	RoleFile           string
	ServiceAccountFile string
	RoleBindingFile    string
	IngressFile        string
	Ingressv1beta1File string
	RouteFile          string
	StoragePath        string
}

type IBPOrderer

type IBPOrderer interface {
	OverrideConfig(newConfig OrdererConfig) error
	GenerateCrypto() (*config.CryptoResponse, error)
	GetConfig() OrdererConfig
}

type Initializer

type Initializer struct {
	Config   *Config
	Scheme   *runtime.Scheme
	Client   k8sclient.Client
	Name     string
	Timeouts enroller.HSMEnrollJobTimeouts

	Validator     common.CryptoValidator
	SecretManager *secretmanager.SecretManager
}

func New

func New(client controllerclient.Client, scheme *runtime.Scheme, cfg *Config, name string, validator common.CryptoValidator) *Initializer

func (*Initializer) CheckIfAdminCertsUpdated

func (i *Initializer) CheckIfAdminCertsUpdated(instance *current.IBPOrderer) (bool, error)

func (*Initializer) Create

func (i *Initializer) Create(overrides OrdererConfig, orderer IBPOrderer, storagePath string) (*Response, error)

func (*Initializer) CreateOrUpdateConfigMap

func (i *Initializer) CreateOrUpdateConfigMap(instance *current.IBPOrderer, orderer OrdererConfig) error

func (*Initializer) Delete

func (i *Initializer) Delete(instance *current.IBPOrderer) error

func (*Initializer) GenerateSecrets

func (i *Initializer) GenerateSecrets(prefix common.SecretType, instance *current.IBPOrderer, crypto *config.Response) error

func (*Initializer) GenerateSecretsFromResponse

func (i *Initializer) GenerateSecretsFromResponse(instance *current.IBPOrderer, cryptoResponse *config.CryptoResponse) error

func (*Initializer) GetConfigFromConfigMap

func (i *Initializer) GetConfigFromConfigMap(instance *current.IBPOrderer) (*corev1.ConfigMap, error)

func (*Initializer) GetCoreConfigFromBytes

func (i *Initializer) GetCoreConfigFromBytes(instance *current.IBPOrderer, bytes []byte) (OrdererConfig, error)

func (*Initializer) GetCoreConfigFromFile

func (i *Initializer) GetCoreConfigFromFile(instance *current.IBPOrderer, file string) (OrdererConfig, error)

func (*Initializer) GetCrypto

func (i *Initializer) GetCrypto(instance *current.IBPOrderer) (*config.CryptoResponse, error)

func (*Initializer) GetEnrollers

func (i *Initializer) GetEnrollers(cryptos *config.Cryptos, instance *current.IBPOrderer, storagePath string) error

func (*Initializer) GetInitOrderer

func (i *Initializer) GetInitOrderer(instance *current.IBPOrderer, storagePath string) (*Orderer, error)

func (*Initializer) GetLabels

func (i *Initializer) GetLabels(instance metav1.Object) map[string]string

func (*Initializer) GetMSPCrypto

func (i *Initializer) GetMSPCrypto(cryptos *config.Cryptos, instance *current.IBPOrderer) error

func (*Initializer) GetUpdatedOrderer

func (i *Initializer) GetUpdatedOrderer(instance *current.IBPOrderer) (*Orderer, error)

func (*Initializer) MissingCrypto

func (i *Initializer) MissingCrypto(instance *current.IBPOrderer) bool

func (*Initializer) Update

func (i *Initializer) Update(overrides OrdererConfig, orderer IBPOrderer) (*Response, error)

func (*Initializer) UpdateAdminSecret

func (i *Initializer) UpdateAdminSecret(instance *current.IBPOrderer) error

func (*Initializer) UpdateSecrets

func (i *Initializer) UpdateSecrets(prefix common.SecretType, instance *current.IBPOrderer, crypto *config.Response) error

func (*Initializer) UpdateSecretsFromResponse

func (i *Initializer) UpdateSecretsFromResponse(instance *current.IBPOrderer, cryptoResponse *config.CryptoResponse) error

type Orderer

type Orderer struct {
	Config        OrdererConfig
	Cryptos       *commonconfig.Cryptos
	UsingHSMProxy bool
}

func (*Orderer) GenerateCrypto

func (o *Orderer) GenerateCrypto() (*commonconfig.CryptoResponse, error)

func (*Orderer) GetConfig

func (o *Orderer) GetConfig() OrdererConfig

func (*Orderer) OverrideConfig

func (o *Orderer) OverrideConfig(newConfig OrdererConfig) (err error)

type OrdererConfig

type OrdererConfig interface {
	MergeWith(interface{}, bool) error
	ToBytes() ([]byte, error)
	UsingPKCS11() bool
	SetPKCS11Defaults(bool)
	GetBCCSPSection() *commonapi.BCCSP
	SetDefaultKeyStore()
	SetBCCSPLibrary(string)
}

type Response

type Response struct {
	Config OrdererConfig
	Crypto *config.CryptoResponse
}

Directories

Path Synopsis
config
v1
v2
v24
v25
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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