models

package
v0.0.0-...-a22436f Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ApplicationConfig

type ApplicationConfig struct {
	Policies      []*ChannelPolicy `json:"policies"`
	Acls          []*ChannelACL    `json:"acls"`
	Capabilities  []string         `json:"capabilities"`
	Organizations []*ChannelOrg    `json:"organizations"`
}

type ApplicationPolicy

type ApplicationPolicy struct {
	ChannelConfigPolicy string           `json:"channelConfigPolicy"`
	SignaturePolicy     *SignaturePolicy `json:"signaturePolicy"`
}

type Block

type Block struct {
	BlockNumber     int            `json:"blockNumber"`
	DataHash        string         `json:"dataHash"`
	NumTransactions int            `json:"numTransactions"`
	CreatedAt       time.Time      `json:"createdAt"`
	Transactions    []*Transaction `json:"transactions"`
}

type BlockWithPrivateData

type BlockWithPrivateData struct {
	BlockNumber     int                           `json:"blockNumber"`
	DataHash        string                        `json:"dataHash"`
	NumTransactions int                           `json:"numTransactions"`
	CreatedAt       time.Time                     `json:"createdAt"`
	Transactions    []*TransactionWithPrivateData `json:"transactions"`
}

type BlocksResponse

type BlocksResponse struct {
	Height int      `json:"height"`
	Blocks []*Block `json:"blocks"`
}

type Ca

type Ca struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Yaml      string `json:"yaml"`
}

type ChaincodeApproval

type ChaincodeApproval struct {
	MspID    string `json:"mspID"`
	Approved bool   `json:"approved"`
}

type Channel

type Channel struct {
	Name          string             `json:"name"`
	RawConfig     string             `json:"rawConfig"`
	ProtoConfig   string             `json:"protoConfig"`
	ChannelConfig *ChannelConfig     `json:"channelConfig"`
	Application   *ApplicationConfig `json:"application"`
	Orderer       *OrdererConfig     `json:"orderer"`
	Height        int                `json:"height"`
}

type ChannelACL

type ChannelACL struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type ChannelAnchorPeer

type ChannelAnchorPeer struct {
	MspID string `json:"mspID"`
	Host  string `json:"host"`
	Port  int    `json:"port"`
}

type ChannelChaincode

type ChannelChaincode struct {
	Name                   string                   `json:"name"`
	Version                string                   `json:"version"`
	Sequence               int                      `json:"sequence"`
	SignaturePolicy        *SignaturePolicy         `json:"signaturePolicy"`
	EndorsementPlugin      string                   `json:"endorsementPlugin"`
	ValidationPlugin       string                   `json:"validationPlugin"`
	ConfigPolicy           string                   `json:"configPolicy"`
	PrivateDataCollections []*PrivateDataCollection `json:"privateDataCollections"`
	Approvals              []*ChaincodeApproval     `json:"approvals"`
}

type ChannelConfig

type ChannelConfig struct {
	Policies     []*ChannelPolicy `json:"policies"`
	Capabilities []string         `json:"capabilities"`
}

type ChannelMsp

type ChannelMsp struct {
	Name                 string   `json:"name"`
	RootCerts            []string `json:"rootCerts"`
	IntermediateCerts    []string `json:"intermediateCerts"`
	Admins               []string `json:"admins"`
	RevocationList       []string `json:"revocationList"`
	TLSRootCerts         []string `json:"tlsRootCerts"`
	TLSIntermediateCerts []string `json:"tlsIntermediateCerts"`
}

type ChannelOrg

type ChannelOrg struct {
	ModPolicy        string            `json:"modPolicy"`
	MspID            string            `json:"mspID"`
	Policies         []*ChannelPolicy  `json:"policies"`
	Msp              *ChannelMsp       `json:"msp"`
	OrdererEndpoints []string          `json:"ordererEndpoints"`
	AnchorPeer       []*NetworkAddress `json:"anchorPeer"`
	NodeOUs          *NodeOUs          `json:"nodeOUs"`
	CryptoConfig     *CryptoConfig     `json:"cryptoConfig"`
	Ous              []*OUIdentifier   `json:"ous"`
}

type ChannelPeer

type ChannelPeer struct {
	MspID  string `json:"mspID"`
	URL    string `json:"url"`
	Height int    `json:"height"`
}

type ChannelPolicy

type ChannelPolicy struct {
	Key       string `json:"key"`
	Type      string `json:"type"`
	Rule      string `json:"rule"`
	ModPolicy string `json:"modPolicy"`
}

type CreateCAInput

type CreateCAInput struct {
	Yaml string `json:"yaml"`
}

type CreateOrdererInput

type CreateOrdererInput struct {
	Yaml string `json:"yaml"`
}

type CreatePeerInput

type CreatePeerInput struct {
	Yaml string `json:"yaml"`
}

type CryptoConfig

type CryptoConfig struct {
	SignatureHashFamily            string `json:"signatureHashFamily"`
	IdentityIdentifierHashFunction string `json:"identityIdentifierHashFunction"`
}

type LightChannel

type LightChannel struct {
	Name string `json:"name"`
}

type MSPPrincipal

type MSPPrincipal struct {
	Combined *MSPPrincipalCombined `json:"combined"`
	Role     *MSPPrincipalRole     `json:"role"`
}

type MSPPrincipalCombined

type MSPPrincipalCombined struct {
	Classification string          `json:"classification"`
	MspPrincipals  []*MSPPrincipal `json:"mspPrincipals"`
}

type MSPPrincipalRole

type MSPPrincipalRole struct {
	MspID string `json:"mspID"`
	Role  string `json:"role"`
}

type NameAndNamespace

type NameAndNamespace struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

type Namespace

type Namespace struct {
	Name string `json:"name"`
}

type NetworkAddress

type NetworkAddress struct {
	Host string `json:"host"`
	Port int    `json:"port"`
}

type NodeOUs

type NodeOUs struct {
	Enable              bool          `json:"enable"`
	ClientOUIdentifier  *OUIdentifier `json:"clientOUIdentifier"`
	PeerOUIdentifier    *OUIdentifier `json:"peerOUIdentifier"`
	AdminOUIdentifier   *OUIdentifier `json:"adminOUIdentifier"`
	OrdererOUIdentifier *OUIdentifier `json:"ordererOUIdentifier"`
}

type OUIdentifier

type OUIdentifier struct {
	Certificate  string `json:"certificate"`
	OuIdentifier string `json:"ouIdentifier"`
}

type Orderer

type Orderer struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Yaml      string `json:"yaml"`
}

type OrdererConfig

type OrdererConfig struct {
	Type          string                  `json:"type"`
	BatchTimeout  int                     `json:"batchTimeout"`
	BatchSize     *OrdererConfigBatchSize `json:"batchSize"`
	MaxChannels   int                     `json:"maxChannels"`
	Capabilities  []string                `json:"capabilities"`
	State         string                  `json:"state"`
	Policies      []*ChannelPolicy        `json:"policies"`
	EtcdDraft     *OrdererConfigRaft      `json:"etcdDraft"`
	Organizations []*ChannelOrg           `json:"organizations"`
}

type OrdererConfigBatchSize

type OrdererConfigBatchSize struct {
	MaxMessageCount   int `json:"maxMessageCount"`
	AbsoluteMaxBytes  int `json:"absoluteMaxBytes"`
	PreferredMaxBytes int `json:"preferredMaxBytes"`
}

type OrdererConfigRaft

type OrdererConfigRaft struct {
	Consenters []*OrdererConfigRaftConsenter `json:"consenters"`
	Options    *OrdererConfigRaftOptions     `json:"options"`
}

type OrdererConfigRaftConsenter

type OrdererConfigRaftConsenter struct {
	Address       *NetworkAddress `json:"address"`
	ClientTLSCert string          `json:"clientTlsCert"`
	ServerTLSCert string          `json:"serverTlsCert"`
}

type OrdererConfigRaftOptions

type OrdererConfigRaftOptions struct {
	TickInterval         string `json:"tickInterval"`
	ElectionTick         int    `json:"electionTick"`
	HeartbeatTick        int    `json:"heartbeatTick"`
	MaxInflightBlocks    int    `json:"maxInflightBlocks"`
	SnapshotIntervalSize int    `json:"snapshotIntervalSize"`
}

type PDCRead

type PDCRead struct {
	CollectionName string `json:"collectionName"`
	Key            string `json:"key"`
	Block          int    `json:"block"`
	TxNum          int    `json:"txNum"`
}

type PDCWrite

type PDCWrite struct {
	CollectionName string `json:"collectionName"`
	Deleted        bool   `json:"deleted"`
	Key            string `json:"key"`
	Value          string `json:"value"`
}

type Peer

type Peer struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Yaml      string `json:"yaml"`
}

type PrivateDataCollection

type PrivateDataCollection struct {
	Name              string             `json:"name"`
	RequiredPeerCount int                `json:"requiredPeerCount"`
	MaxPeerCount      int                `json:"maxPeerCount"`
	BlockToLive       int                `json:"blockToLive"`
	MemberOnlyRead    bool               `json:"memberOnlyRead"`
	MemberOnlyWrite   bool               `json:"memberOnlyWrite"`
	EndorsementPolicy *ApplicationPolicy `json:"endorsementPolicy"`
	MemberOrgsPolicy  *SignaturePolicy   `json:"memberOrgsPolicy"`
}

type SignaturePolicy

type SignaturePolicy struct {
	Version    int                  `json:"version"`
	Rule       *SignaturePolicyRule `json:"rule"`
	Principals []*MSPPrincipal      `json:"principals"`
}

type SignaturePolicyNOutOf

type SignaturePolicyNOutOf struct {
	N     int                    `json:"n"`
	Rules []*SignaturePolicyRule `json:"rules"`
}

type SignaturePolicyRule

type SignaturePolicyRule struct {
	Type     string                   `json:"type"`
	NoutOf   *SignaturePolicyNOutOf   `json:"noutOf"`
	SignedBy *SignaturePolicySignedBy `json:"signedBy"`
}

type SignaturePolicySignedBy

type SignaturePolicySignedBy struct {
	SignedBy int `json:"signedBy"`
}

type StorageClass

type StorageClass struct {
	Name string `json:"name"`
}

type Transaction

type Transaction struct {
	TxID      string              `json:"txID"`
	Type      TransactionType     `json:"type"`
	CreatedAt time.Time           `json:"createdAt"`
	Version   string              `json:"version"`
	Path      *string             `json:"path"`
	Response  *string             `json:"response"`
	Request   *string             `json:"request"`
	Chaincode string              `json:"chaincode"`
	Writes    []*TransactionWrite `json:"writes"`
	Reads     []*TransactionRead  `json:"reads"`
}

type TransactionRead

type TransactionRead struct {
	ChaincodeID     string `json:"chaincodeID"`
	Key             string `json:"key"`
	BlockNumVersion *int   `json:"blockNumVersion"`
	TxNumVersion    *int   `json:"txNumVersion"`
}

type TransactionType

type TransactionType string
const (
	TransactionTypeMessage             TransactionType = "MESSAGE"
	TransactionTypeConfig              TransactionType = "CONFIG"
	TransactionTypeConfigUpdate        TransactionType = "CONFIG_UPDATE"
	TransactionTypeEndorserTransaction TransactionType = "ENDORSER_TRANSACTION"
	TransactionTypeOrdererTransaction  TransactionType = "ORDERER_TRANSACTION"
	TransactionTypeDeliverSeekInfo     TransactionType = "DELIVER_SEEK_INFO"
	TransactionTypeChaincodePackage    TransactionType = "CHAINCODE_PACKAGE"
)

func (TransactionType) IsValid

func (e TransactionType) IsValid() bool

func (TransactionType) MarshalGQL

func (e TransactionType) MarshalGQL(w io.Writer)

func (TransactionType) String

func (e TransactionType) String() string

func (*TransactionType) UnmarshalGQL

func (e *TransactionType) UnmarshalGQL(v interface{}) error

type TransactionWithPrivateData

type TransactionWithPrivateData struct {
	TxID      string              `json:"txID"`
	Type      TransactionType     `json:"type"`
	CreatedAt time.Time           `json:"createdAt"`
	Version   string              `json:"version"`
	Path      *string             `json:"path"`
	Response  *string             `json:"response"`
	Request   *string             `json:"request"`
	Chaincode string              `json:"chaincode"`
	Writes    []*TransactionWrite `json:"writes"`
	Reads     []*TransactionRead  `json:"reads"`
	PdcWrites []*PDCWrite         `json:"pdcWrites"`
	PdcReads  []*PDCRead          `json:"pdcReads"`
}

type TransactionWrite

type TransactionWrite struct {
	ChaincodeID string `json:"chaincodeID"`
	Deleted     bool   `json:"deleted"`
	Key         string `json:"key"`
	Value       string `json:"value"`
}

type UpdateCAInput

type UpdateCAInput struct {
	Yaml string `json:"yaml"`
}

type UpdateeOrdererInput

type UpdateeOrdererInput struct {
	Yaml string `json:"yaml"`
}

type UpdateePeerInput

type UpdateePeerInput struct {
	Yaml string `json:"yaml"`
}

Jump to

Keyboard shortcuts

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