fabric: github.com/hyperledger/fabric/msp/mgmt Index | Files | Directories

package mgmt

import "github.com/hyperledger/fabric/msp/mgmt"


Package Files

deserializer.go mgmt.go principal.go


const (
    // Admins is the label for the local MSP admins
    Admins = "Admins"

    // Members is the label for the local MSP members
    Members = "Members"

func GetDeserializers Uses

func GetDeserializers() map[string]msp.IdentityDeserializer

GetManagers returns all the managers registered

func GetIdentityDeserializer Uses

func GetIdentityDeserializer(chainID string, cryptoProvider bccsp.BCCSP) msp.IdentityDeserializer

GetIdentityDeserializer returns the IdentityDeserializer for the given chain

func GetLocalMSP Uses

func GetLocalMSP(cryptoProvider bccsp.BCCSP) msp.MSP

GetLocalMSP returns the local msp (and creates it if it doesn't exist)

func GetLocalSigningIdentityOrPanic Uses

func GetLocalSigningIdentityOrPanic(cryptoProvider bccsp.BCCSP) msp.SigningIdentity

GetLocalSigningIdentityOrPanic returns the local signing identity or panic in case or error

func GetManagerForChain Uses

func GetManagerForChain(chainID string) msp.MSPManager

GetManagerForChain returns the msp manager for the supplied chain; if no such manager exists, one is created

func LoadLocalMsp Uses

func LoadLocalMsp(dir string, bccspConfig *factory.FactoryOpts, mspID string) error

LoadLocalMsp loads the local MSP from the specified directory

func LoadLocalMspWithType Uses

func LoadLocalMspWithType(dir string, bccspConfig *factory.FactoryOpts, mspID, mspType string) error

LoadLocalMspWithType loads the local MSP with the specified type from the specified directory

func XXXSetMSPManager Uses

func XXXSetMSPManager(chainID string, manager msp.MSPManager)

XXXSetMSPManager is a stopgap solution to transition from the custom MSP config block parsing to the channelconfig.Resources interface, while preserving the problematic singleton nature of the MSP manager

type DeserializersManager Uses

type DeserializersManager interface {

    // Deserialize receives SerializedIdentity bytes and returns the unmarshaled form
    // of the SerializedIdentity, or error on failure
    Deserialize(raw []byte) (*mspproto.SerializedIdentity, error)

    // GetLocalMSPIdentifier returns the local MSP identifier
    GetLocalMSPIdentifier() string

    // GetLocalDeserializer returns the local identity deserializer
    GetLocalDeserializer() msp.IdentityDeserializer

    // GetChannelDeserializers returns a map of the channel deserializers
    GetChannelDeserializers() map[string]msp.IdentityDeserializer

DeserializersManager is a support interface to access the local and channel deserializers

func NewDeserializersManager Uses

func NewDeserializersManager(cryptoProvider bccsp.BCCSP) DeserializersManager

NewDeserializersManager returns a new instance of DeserializersManager

type MSPPrincipalGetter Uses

type MSPPrincipalGetter interface {
    // Get returns an MSP principal for the given role
    Get(role string) (*msp.MSPPrincipal, error)

func NewLocalMSPPrincipalGetter Uses

func NewLocalMSPPrincipalGetter(cryptoProvider bccsp.BCCSP) MSPPrincipalGetter



Package mgmt imports 11 packages (graph) and is imported by 515 packages. Updated 2020-07-11. Refresh now. Tools for package owners.