fabric: github.com/hyperledger/fabric/core/chaincode/accesscontrol Index | Files

package accesscontrol

import "github.com/hyperledger/fabric/core/chaincode/accesscontrol"

Index

Package Files

access.go interceptor.go mapper.go

type Authenticator Uses

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

func NewAuthenticator Uses

func NewAuthenticator(ca tlsgen.CA) *Authenticator

NewAuthenticator returns a new authenticator that can wrap a chaincode service

func (*Authenticator) Generate Uses

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 Uses

func (auth *Authenticator) Wrap(srv pb.ChaincodeSupportServer) pb.ChaincodeSupportServer

type CertAndPrivKeyPair Uses

type CertAndPrivKeyPair struct {
    // Cert - an x509 certificate encoded in base64
    Cert string
    // Key  - a private key of the corresponding certificate
    Key string
}

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

type ChaincodeStream Uses

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 Uses

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

Package accesscontrol imports 13 packages (graph) and is imported by 6 packages. Updated 2018-12-12. Refresh now. Tools for package owners.