Versions in this module Expand all Collapse all v0 v0.2.2 Aug 16, 2021 v0.2.1 Aug 16, 2021 Changes in this version + const ACLsKey + const AdminsPolicyKey + const AnchorPeersKey + const ApplicationGroupKey + const BlockDataHashingStructureKey + const BlockValidationPolicyKey + const CapabilitiesKey + const ChannelCreationPolicyKey + const ChannelGroupKey + const ConsortiumKey + const ConsortiumsGroupKey + const EndorsementPolicyKey + const EndpointsKey + const HashingAlgorithmKey + const ImplicitMetaPolicyType + const LifecycleEndorsementPolicyKey + const MSPKey + const OrdererAddressesKey + const OrdererGroupKey + const ReadersPolicyKey + const SignaturePolicyType + const WritersPolicyKey + const YEAR + func NewApplicationChannelGenesisBlock(channelConfig Channel, channelID string) (*cb.Block, error) + func NewEnvelope(marshaledUpdate []byte, signatures ...*cb.ConfigSignature) (*cb.Envelope, error) + func NewMarshaledCreateChannelTx(channelConfig Channel, channelID string) ([]byte, error) + func NewSystemChannelGenesisBlock(channelConfig Channel, channelID string) (*cb.Block, error) + type Address struct + Host string + Port int + type Application struct + ACLs map[string]string + Capabilities []string + ModPolicy string + Organizations []Organization + Policies map[string]Policy + type ApplicationGroup struct + func (a *ApplicationGroup) ACLs() (map[string]string, error) + func (a *ApplicationGroup) AddCapability(capability string) error + func (a *ApplicationGroup) Capabilities() ([]string, error) + func (a *ApplicationGroup) Configuration() (Application, error) + func (a *ApplicationGroup) Organization(name string) *ApplicationOrg + func (a *ApplicationGroup) Policies() (map[string]Policy, error) + func (a *ApplicationGroup) RemoveACLs(acls []string) error + func (a *ApplicationGroup) RemoveCapability(capability string) error + func (a *ApplicationGroup) RemoveOrganization(orgName string) + func (a *ApplicationGroup) RemovePolicy(policyName string) error + func (a *ApplicationGroup) SetACLs(acls map[string]string) error + func (a *ApplicationGroup) SetModPolicy(modPolicy string) error + func (a *ApplicationGroup) SetOrganization(org Organization) error + func (a *ApplicationGroup) SetPolicies(policies map[string]Policy) error + func (a *ApplicationGroup) SetPolicy(policyName string, policy Policy) error + type ApplicationOrg struct + func (a *ApplicationOrg) AddAnchorPeer(newAnchorPeer Address) error + func (a *ApplicationOrg) AnchorPeers() ([]Address, error) + func (a *ApplicationOrg) Configuration() (Organization, error) + func (a *ApplicationOrg) MSP() *OrganizationMSP + func (a *ApplicationOrg) Policies() (map[string]Policy, error) + func (a *ApplicationOrg) RemoveAnchorPeer(anchorPeerToRemove Address) error + func (a *ApplicationOrg) RemovePolicy(policyName string) error + func (a *ApplicationOrg) SetMSP(updatedMSP MSP) error + func (a *ApplicationOrg) SetModPolicy(modPolicy string) error + func (a *ApplicationOrg) SetPolicies(policies map[string]Policy) error + func (a *ApplicationOrg) SetPolicy(policyName string, policy Policy) error + type BatchSizeValue struct + func (b *BatchSizeValue) SetAbsoluteMaxBytes(maxBytes uint32) error + func (b *BatchSizeValue) SetMaxMessageCount(maxMessageCount uint32) error + func (b *BatchSizeValue) SetPreferredMaxBytes(maxBytes uint32) error + type Channel struct + Application Application + Capabilities []string + Consortium string + Consortiums []Consortium + ModPolicy string + Orderer Orderer + Policies map[string]Policy + type ChannelGroup struct + func (c *ChannelGroup) AddCapability(capability string) error + func (c *ChannelGroup) Capabilities() ([]string, error) + func (c *ChannelGroup) Configuration() (Channel, error) + func (c *ChannelGroup) Policies() (map[string]Policy, error) + func (c *ChannelGroup) RemoveCapability(capability string) error + func (c *ChannelGroup) RemoveLegacyOrdererAddresses() + func (c *ChannelGroup) RemovePolicy(policyName string) error + func (c *ChannelGroup) SetModPolicy(modPolicy string) error + func (c *ChannelGroup) SetPolicies(policies map[string]Policy) error + func (c *ChannelGroup) SetPolicy(policyName string, policy Policy) error + type ConfigTx struct + func New(config *cb.Config) ConfigTx + func (c *ConfigTx) Application() *ApplicationGroup + func (c *ConfigTx) Channel() *ChannelGroup + func (c *ConfigTx) ComputeMarshaledUpdate(channelID string) ([]byte, error) + func (c *ConfigTx) Consortium(name string) *ConsortiumGroup + func (c *ConfigTx) Consortiums() *ConsortiumsGroup + func (c *ConfigTx) Orderer() *OrdererGroup + func (c *ConfigTx) OriginalConfig() *cb.Config + func (c *ConfigTx) UpdatedConfig() *cb.Config + type Consortium struct + Name string + Organizations []Organization + type ConsortiumGroup struct + func (c *ConsortiumGroup) Configuration() (Consortium, error) + func (c *ConsortiumGroup) Organization(name string) *ConsortiumOrg + func (c *ConsortiumGroup) RemoveOrganization(name string) + func (c *ConsortiumGroup) SetChannelCreationPolicy(policy Policy) error + func (c *ConsortiumGroup) SetOrganization(org Organization) error + type ConsortiumOrg struct + func (c *ConsortiumOrg) Configuration() (Organization, error) + func (c *ConsortiumOrg) MSP() *OrganizationMSP + func (c *ConsortiumOrg) Policies() (map[string]Policy, error) + func (c *ConsortiumOrg) RemovePolicy(name string) + func (c *ConsortiumOrg) SetMSP(updatedMSP MSP) error + func (c *ConsortiumOrg) SetModPolicy(modPolicy string) error + func (c *ConsortiumOrg) SetPolicies(policies map[string]Policy) error + func (c *ConsortiumOrg) SetPolicy(name string, policy Policy) error + type ConsortiumsGroup struct + func (c *ConsortiumsGroup) Configuration() ([]Consortium, error) + func (c *ConsortiumsGroup) RemoveConsortium(name string) + func (c *ConsortiumsGroup) SetConsortium(consortium Consortium) error + type EtcdRaftOptionsValue struct + func (e *EtcdRaftOptionsValue) SetElectionInterval(interval uint32) error + func (e *EtcdRaftOptionsValue) SetHeartbeatTick(tick uint32) error + func (e *EtcdRaftOptionsValue) SetMaxInflightBlocks(maxBlks uint32) error + func (e *EtcdRaftOptionsValue) SetSnapshotIntervalSize(intervalSize uint32) error + func (e *EtcdRaftOptionsValue) SetTickInterval(interval string) error + type MSP struct + Admins []*x509.Certificate + CryptoConfig membership.CryptoConfig + IntermediateCerts []*x509.Certificate + Name string + NodeOUs membership.NodeOUs + OrganizationalUnitIdentifiers []membership.OUIdentifier + RevocationList []*pkix.CertificateList + RootCerts []*x509.Certificate + TLSIntermediateCerts []*x509.Certificate + TLSRootCerts []*x509.Certificate + func (m *MSP) CreateMSPCRL(signingIdentity *SigningIdentity, certs ...*x509.Certificate) (*pkix.CertificateList, error) + type Orderer struct + BatchSize orderer.BatchSize + BatchTimeout time.Duration + Capabilities []string + EtcdRaft orderer.EtcdRaft + Kafka orderer.Kafka + MaxChannels uint64 + ModPolicy string + OrdererType string + Organizations []Organization + Policies map[string]Policy + State orderer.ConsensusState + type OrdererGroup struct + func (o *OrdererGroup) AddCapability(capability string) error + func (o *OrdererGroup) AddConsenter(consenter orderer.Consenter) error + func (o *OrdererGroup) BatchSize() *BatchSizeValue + func (o *OrdererGroup) Capabilities() ([]string, error) + func (o *OrdererGroup) Configuration() (Orderer, error) + func (o *OrdererGroup) EtcdRaftOptions() *EtcdRaftOptionsValue + func (o *OrdererGroup) Organization(name string) *OrdererOrg + func (o *OrdererGroup) Policies() (map[string]Policy, error) + func (o *OrdererGroup) RemoveCapability(capability string) error + func (o *OrdererGroup) RemoveConsenter(consenter orderer.Consenter) error + func (o *OrdererGroup) RemoveLegacyKafkaBrokers() + func (o *OrdererGroup) RemoveOrganization(name string) + func (o *OrdererGroup) RemovePolicy(policyName string) error + func (o *OrdererGroup) SetBatchTimeout(timeout time.Duration) error + func (o *OrdererGroup) SetConfiguration(ord Orderer) error + func (o *OrdererGroup) SetConsensusState(consensusState orderer.ConsensusState) error + func (o *OrdererGroup) SetEtcdRaftConsensusType(consensusMetadata orderer.EtcdRaft, consensusState orderer.ConsensusState) error + func (o *OrdererGroup) SetMaxChannels(max int) error + func (o *OrdererGroup) SetModPolicy(modPolicy string) error + func (o *OrdererGroup) SetOrganization(org Organization) error + func (o *OrdererGroup) SetPolicies(policies map[string]Policy) error + func (o *OrdererGroup) SetPolicy(policyName string, policy Policy) error + type OrdererOrg struct + func (o *OrdererOrg) Configuration() (Organization, error) + func (o *OrdererOrg) MSP() *OrganizationMSP + func (o *OrdererOrg) Policies() (map[string]Policy, error) + func (o *OrdererOrg) RemoveEndpoint(endpoint Address) error + func (o *OrdererOrg) RemovePolicy(policyName string) error + func (o *OrdererOrg) SetEndpoint(endpoint Address) error + func (o *OrdererOrg) SetMSP(updatedMSP MSP) error + func (o *OrdererOrg) SetModPolicy(modPolicy string) error + func (o *OrdererOrg) SetPolicies(policies map[string]Policy) error + func (o *OrdererOrg) SetPolicy(policyName string, policy Policy) error + type Organization struct + AnchorPeers []Address + MSP MSP + ModPolicy string + Name string + OrdererEndpoints []string + Policies map[string]Policy + type OrganizationMSP struct + func (m *OrganizationMSP) AddAdminCert(cert *x509.Certificate) error + func (m *OrganizationMSP) AddCRL(crl *pkix.CertificateList) error + func (m *OrganizationMSP) AddCRLFromSigningIdentity(signingIdentity *SigningIdentity, certs ...*x509.Certificate) error + func (m *OrganizationMSP) AddIntermediateCert(cert *x509.Certificate) error + func (m *OrganizationMSP) AddOUIdentifier(ou membership.OUIdentifier) error + func (m *OrganizationMSP) AddRootCert(cert *x509.Certificate) error + func (m *OrganizationMSP) AddTLSIntermediateCert(cert *x509.Certificate) error + func (m *OrganizationMSP) AddTLSRootCert(cert *x509.Certificate) error + func (m *OrganizationMSP) Configuration() (MSP, error) + func (m *OrganizationMSP) RemoveAdminCert(cert *x509.Certificate) error + func (m *OrganizationMSP) RemoveIntermediateCert(cert *x509.Certificate) error + func (m *OrganizationMSP) RemoveOUIdentifier(ou membership.OUIdentifier) error + func (m *OrganizationMSP) RemoveRootCert(cert *x509.Certificate) error + func (m *OrganizationMSP) RemoveTLSIntermediateCert(cert *x509.Certificate) error + func (m *OrganizationMSP) RemoveTLSRootCert(cert *x509.Certificate) error + func (m *OrganizationMSP) SetAdminOUIdentifier(adminOU membership.OUIdentifier) error + func (m *OrganizationMSP) SetClientOUIdentifier(clientOU membership.OUIdentifier) error + func (m *OrganizationMSP) SetCryptoConfig(cryptoConfig membership.CryptoConfig) error + func (m *OrganizationMSP) SetEnableNodeOUs(isEnabled bool) error + func (m *OrganizationMSP) SetOrdererOUIdentifier(ordererOU membership.OUIdentifier) error + func (m *OrganizationMSP) SetPeerOUIdentifier(peerOU membership.OUIdentifier) error + type Policy struct + ModPolicy string + Rule string + Type string + type SigningIdentity struct + Certificate *x509.Certificate + MSPID string + PrivateKey crypto.PrivateKey + func (s *SigningIdentity) CreateConfigSignature(marshaledUpdate []byte) (*cb.ConfigSignature, error) + func (s *SigningIdentity) Public() crypto.PublicKey + func (s *SigningIdentity) Sign(reader io.Reader, msg []byte, opts crypto.SignerOpts) (signature []byte, err error) + func (s *SigningIdentity) SignEnvelope(e *cb.Envelope) error