composite

package
v0.2400.0 Latest Latest
Warning

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

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

Documentation

Overview

Package composite provides a composite signer.

Index

Constants

View Source
const SignerName = "composite"

SignerName is the name used to identify the composite signer.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory(config interface{}, roles ...signature.SignerRole) (signature.SignerFactory, error)

NewFactory creates a new factory with the specified roles, with the specified pre-created SignerFactory(s).

Types

type FactoryConfig

type FactoryConfig map[signature.SignerRole]signature.SignerFactory

FactoryConfig is the composite factory configuration.

type SignerFactory

type SignerFactory struct {
	// contains filtered or unexported fields
}

SignerFactory is a SignerFactory that is a composite of multiple other SignerFactory(s).

func (*SignerFactory) EnsureRole

func (sf *SignerFactory) EnsureRole(role signature.SignerRole) error

EnsureRole ensures that the SignerFactory is configured for the given role.

func (*SignerFactory) Generate

func (sf *SignerFactory) Generate(role signature.SignerRole, rng io.Reader) (signature.Signer, error)

Generate will generate and persist an new private key corresponding to the provided role, and return a Signer ready for use.

func (*SignerFactory) Load

Load will load the private key corresponding to the role, and return a Signer ready for use.

Jump to

Keyboard shortcuts

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