accesscontrol

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

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

func NewAuthenticator

func NewAuthenticator(ca tlsgen.CA) *Authenticator

NewAuthenticator returns a new authenticator that can wrap a chaincode service

func (*Authenticator) Generate

func (ac *Authenticator) Generate(ccName string) (*CertAndPrivKeyPair, error)

Generate returns a pair of certificate and private key, and associates the hash of the certificate with the given chaincode name

func (*Authenticator) Wrap added in v1.3.0

type CertAndPrivKeyPair

type CertAndPrivKeyPair struct {
	// Cert is an x509 certificate
	Cert []byte
	// Key is a private key of the corresponding certificate
	Key []byte
}

CertAndPrivKeyPair contains a certificate and its corresponding private key in base64 format

type ChaincodeStream

type ChaincodeStream interface {
	// Send sends a chaincode message
	Send(*pb.ChaincodeMessage) error
	// Recv receives a chaincode message
	Recv() (*pb.ChaincodeMessage, error)
}

ChaincodeStream defines a gRPC stream for sending and receiving chaincode messages

type KeyGenFunc

type KeyGenFunc func() (*tlsgen.CertKeyPair, error)

Jump to

Keyboard shortcuts

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