accesscontrol

package
v1.1.0-preview Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: Apache-2.0 Imports: 21 Imported by: 266 modules, 629 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	// DisableAccessCheck disables the access control
	// enforcement of the Authenticator
	DisableAccessCheck()

	// Generate returns a pair of certificate and private key,
	// and associates the hash of the certificate with the given
	// chaincode name
	Generate(ccName string) (*CertAndPrivKeyPair, error)

	// ChaincodeSupportServer - The Authenticator is registered
	// as a chaincode service
	pb.ChaincodeSupportServer
}

Authenticator wraps a chaincode service and authenticates chaincode shims (containers)

func NewAuthenticator

func NewAuthenticator(srv pb.ChaincodeSupportServer, ca CA) Authenticator

NewAuthenticator returns a new authenticator that would wrap the given chaincode service

type CA

type CA interface {
	// CertBytes returns the certificate of the CA in PEM encoding
	CertBytes() []byte
	// contains filtered or unexported methods
}

CA defines a certificate authority that can generate certificates signed by it

func NewCA

func NewCA() (CA, error)

type CertAndPrivKeyPair

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

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() (*certKeyPair, error)

Jump to

Keyboard shortcuts

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