common

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CACfgTemplate = `` /* 20053-byte string literal not displayed */

)
View Source
const (
	FabricBinsPathEnvKey = "FAB_BINS"
)

Variables

This section is empty.

Functions

func CopyFile added in v0.4.0

func CopyFile(src, dst string) error

func IsOnlyUnity added in v0.4.0

func IsOnlyUnity(tms *topology.TMS) bool

IsOnlyUnity return true if this TMS requires to use the unity driver for all databases

func WithOnlyUnity added in v0.4.0

func WithOnlyUnity(tms *topology.TMS)

WithOnlyUnity notify the backend to use the unity driver for all databases

Types

type CA added in v0.4.0

type CA interface {
	Start() error
	Stop()
	Gen(owner string) (token.IdentityConfiguration, error)
}

func NewIdemixCASupport added in v0.4.0

func NewIdemixCASupport(tokenPlatform generators.TokenPlatform, tms *topology.TMS, issuerCryptoMaterialPath string) (CA, error)

type CAClientEnroll added in v0.4.0

type CAClientEnroll struct {
	NetworkPrefix  string
	Home           string
	CAServerURL    string
	CAName         string
	Output         string
	EnrollmentType string
	IdemixCurve    string
}

func (CAClientEnroll) Args added in v0.4.0

func (c CAClientEnroll) Args() []string

func (CAClientEnroll) SessionName added in v0.4.0

func (c CAClientEnroll) SessionName() string

type CAClientRegister added in v0.4.0

type CAClientRegister struct {
	NetworkPrefix  string
	CAServerURL    string
	CAName         string
	IDName         string
	IDSecret       string
	IDType         string
	EnrollmentType string
	IdemixCurve    string
	MSPDir         string
}

func (CAClientRegister) Args added in v0.4.0

func (c CAClientRegister) Args() []string

func (CAClientRegister) SessionName added in v0.4.0

func (c CAClientRegister) SessionName() string

type CAFactory added in v0.4.0

type CAFactory = func(generators.TokenPlatform, *topology.TMS, string) (CA, error)

type CAServer added in v0.4.0

type CAServer struct {
	NetworkPrefix string
	ConfigPath    string
}

func (CAServer) Args added in v0.4.0

func (c CAServer) Args() []string

func (CAServer) SessionName added in v0.4.0

func (c CAServer) SessionName() string

type DLogPublicParamsGenerator

type DLogPublicParamsGenerator struct {
	DefaultCurveID math3.CurveID
}

func NewDLogPublicParamsGenerator

func NewDLogPublicParamsGenerator(defaultCurveID math3.CurveID) *DLogPublicParamsGenerator

func (*DLogPublicParamsGenerator) Generate

func (d *DLogPublicParamsGenerator) Generate(tms *topology.TMS, wallets *generators.Wallets, args ...interface{}) ([]byte, error)

type FabTokenPublicParamsGenerator

type FabTokenPublicParamsGenerator struct{}

func NewFabTokenPublicParamsGenerator

func NewFabTokenPublicParamsGenerator() *FabTokenPublicParamsGenerator

func (*FabTokenPublicParamsGenerator) Generate

func (f *FabTokenPublicParamsGenerator) Generate(tms *topology.TMS, wallets *generators.Wallets, args ...interface{}) ([]byte, error)

type IdemixCASupport added in v0.4.0

type IdemixCASupport struct {
	IssuerCryptoMaterialPath string
	ColorIndex               int
	StartEventuallyTimeout   time.Duration
	EventuallyTimeout        time.Duration

	TokenPlatform generators.TokenPlatform
	TMS           *topology.TMS
	CAPort        string
	// contains filtered or unexported fields
}

func (*IdemixCASupport) Gen added in v0.4.0

func (i *IdemixCASupport) Gen(owner string) (res token.IdentityConfiguration, err error)

func (*IdemixCASupport) GenerateConfiguration added in v0.4.0

func (i *IdemixCASupport) GenerateConfiguration() error

func (*IdemixCASupport) Start added in v0.4.0

func (i *IdemixCASupport) Start() error

func (*IdemixCASupport) StartSession added in v0.4.0

func (i *IdemixCASupport) StartSession(cmd *exec.Cmd, name string) (*gexec.Session, error)

func (*IdemixCASupport) Stop added in v0.4.0

func (i *IdemixCASupport) Stop()

type NetworkHandler added in v0.4.0

type NetworkHandler struct {
	TokenPlatform            TokenPlatform
	CryptoMaterialGenerators map[string]generators.CryptoMaterialGenerator
	CASupports               map[string]CAFactory

	EventuallyTimeout time.Duration
	ColorIndex        int
}

func (*NetworkHandler) AuditDBSQLDataSourceDir added in v0.4.0

func (p *NetworkHandler) AuditDBSQLDataSourceDir(uniqueName string) string

func (*NetworkHandler) DBPath added in v0.4.0

func (p *NetworkHandler) DBPath(root string, tms *topology2.TMS) string

func (*NetworkHandler) DeleteDBs added in v0.4.0

func (p *NetworkHandler) DeleteDBs(node *sfcnode.Node)

func (*NetworkHandler) FSCNodeKVSDir added in v0.4.0

func (p *NetworkHandler) FSCNodeKVSDir(uniqueName string) string

func (*NetworkHandler) HelperConfigPath added in v0.4.0

func (p *NetworkHandler) HelperConfigPath() string

func (*NetworkHandler) IdentityDBSQLDataSourceDir added in v0.4.0

func (p *NetworkHandler) IdentityDBSQLDataSourceDir(uniqueName string) string

func (*NetworkHandler) TTXDBSQLDataSourceDir added in v0.4.0

func (p *NetworkHandler) TTXDBSQLDataSourceDir(uniqueName string) string

func (*NetworkHandler) TokensDBSQLDataSourceDir added in v0.4.0

func (p *NetworkHandler) TokensDBSQLDataSourceDir(uniqueName string) string

type TokenPlatform added in v0.4.0

type TokenPlatform interface {
	TokenGen(keygen common.Command) (*gexec.Session, error)
	PublicParametersFile(tms *topology2.TMS) string
	GetContext() api2.Context
	PublicParameters(tms *topology2.TMS) []byte
	GetPublicParamsGenerators(driver string) generators.PublicParamsGenerator
	PublicParametersDir() string
	GetBuilder() api2.Builder
	TokenDir() string
	UpdatePublicParams(tms *topology2.TMS, pp []byte)
}

Jump to

Keyboard shortcuts

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