channel

package
v0.0.0-...-85e540a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateChannel

func CreateChannel(o *orderer.Orderer, channel string, opts ...Option) error

CreateChannel creates a new channel on the specified ordering service.

func InstantiateChaincode

func InstantiateChaincode(peers []*peer.Peer, o *orderer.Orderer, channel string, name string, version string, args [][]byte) error

InstantiateChaincode instantiates a chaincode on the channel.

func UpdateChannel

func UpdateChannel(o *orderer.Orderer, channel string, opts ...Option) error

UpdateChannel updates an existing channel on the specified ordering service.

func UpgradeChaincode

func UpgradeChaincode(peers []*peer.Peer, o *orderer.Orderer, channel string, name string, version string, args [][]byte) error

UpgradeChaincode upgrades a chaincode on the channel.

Types

type Option

type Option func(*channelOperation) error

Option is a type representing an option for creating or updating a channel.

func AddAdmin

func AddAdmin(mspID string) Option

AddAdmin adds the specified MSP ID to the admins policy of the channel.

func AddAdmins

func AddAdmins(mspIDs ...string) Option

AddAdmins adds the specified MSP IDs to the admins policy of the channel.

func AddAnchorPeer

func AddAnchorPeer(mspID string, hostname string, port int32) Option

AddAnchorPeer adds the specified anchor peer to the channel.

func AddMSP

func AddMSP(msp *msp.MSP) Option

AddMSP adds the specified MSP to the channel.

func AddMSPID

func AddMSPID(mspID string) Option

AddMSPID adds the specified MSP ID to the channel.

func AddMSPIDs

func AddMSPIDs(mspIDs ...string) Option

AddMSPIDs adds the specified MSP IDs to the channel.

func AddMSPs

func AddMSPs(msps ...*msp.MSP) Option

AddMSPs adds the specified MSPs to the channel.

func AddReader

func AddReader(mspID string) Option

AddReader adds the specified MSP ID to the readers policy of the channel.

func AddReaders

func AddReaders(mspIDs ...string) Option

AddReaders adds the specified MSP IDs to the readers policy of the channel.

func AddWriter

func AddWriter(mspID string) Option

AddWriter adds the specified MSP ID to the writers policy of the channel.

func AddWriters

func AddWriters(mspIDs ...string) Option

AddWriters adds the specified MSP IDs to the writers policy of the channel.

func RemoveAdmin

func RemoveAdmin(mspID string) Option

RemoveAdmin removes the specified MSP ID from the admins policy of the channel.

func RemoveAdmins

func RemoveAdmins(mspIDs ...string) Option

RemoveAdmins removes the specified MSP IDs from the admins policy of the channel.

func RemoveMSPID

func RemoveMSPID(mspID string) Option

RemoveMSPID removes the specified MSP from the channel.

func RemoveMSPIDs

func RemoveMSPIDs(mspIDs ...string) Option

RemoveMSPIDs removes the specified MSP IDs from the channel.

func RemoveReader

func RemoveReader(mspID string) Option

RemoveReader removes the specified MSP ID from the readers policy of the channel.

func RemoveReaders

func RemoveReaders(mspIDs ...string) Option

RemoveReaders removes the specified MSP IDs from the readers policy of the channel.

func RemoveWriter

func RemoveWriter(mspID string) Option

RemoveWriter removes the specified MSP ID from the writers policy of the channel.

func RemoveWriters

func RemoveWriters(mspIDs ...string) Option

RemoveWriters removes the specified MSP IDs from the writers policy of the channel.

func UsingIdentity

func UsingIdentity(identity *identity.Identity) Option

UsingIdentity uses the specified identity to create or update the channel.

func UsingMSPID

func UsingMSPID(mspID string) Option

UsingMSPID uses the specified MSP ID to create or update the channel.

Jump to

Keyboard shortcuts

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