Documentation ¶
Index ¶
- Constants
- func AppAdminsChainKey(id string) string
- func AppchainAdminKey(addr string) string
- func AppchainKey(id string) string
- func AppchainNameKey(name string) string
- func AppchainOccupyNameKey(name string) string
- type Appchain
- type AppchainManager
- func (am *AppchainManager) All(_ []byte) (interface{}, error)
- func (am *AppchainManager) Audit(proposer string, isApproved int32, desc string) (bool, []byte)
- func (am *AppchainManager) ChangeStatus(id, trigger, lastStatus string, _ []byte) (bool, []byte)
- func (am *AppchainManager) CountAll(_ []byte) (bool, []byte)
- func (am *AppchainManager) CountAvailable(_ []byte) (bool, []byte)
- func (am *AppchainManager) DeleteAppchain(id string) (bool, []byte)
- func (am *AppchainManager) FetchAuditRecords(id string) (bool, []byte)
- func (am *AppchainManager) GetChainIdByName(name string) (string, error)
- func (am *AppchainManager) GovernancePre(chainId string, event g.EventType, _ []byte) (interface{}, *boltvm.BxhError)
- func (am *AppchainManager) QueryById(id string, _ []byte) (interface{}, error)
- func (am *AppchainManager) Register(chainInfo *Appchain)
- func (am *AppchainManager) Update(updateInfo *Appchain) (bool, []byte)
- type AppchainMgr
- type FabricBroker
Constants ¶
View Source
const ( Prefix = "appchain" ChainNumPrefix = "chain-num" ChainOccupyIdPrefix = "chain-occupy-id" ChainOccupyNamePrefix = "chain-occupy-name" NameChainPrefix = "name-chain" AdminChainPrefix = "admin-chain" ChainAdminsPrefix = "chain-admins" RelaychainType = "relaychain" AppchainType = "appchain" FabricType = "fabric" ChainTypeFabric1_4_3 = "Fabric V1.4.3" ChainTypeFabric1_4_4 = "Fabric V1.4.4" ChainTypeHyperchain1_8_3 = "Hyperchain V1.8.3" ChainTypeHyperchain1_8_6 = "Hyperchain V1.8.6" ChainTypeFlato1_0_0 = "Flato V1.0.0" ChainTypeFlato1_0_3 = "Flato V1.0.3" ChainTypeFlato1_0_6 = "Flato V1.0.6" ChainTypeBCOS2_6_0 = "BCOS V2.6.0" ChainTypeCITA20_2_2 = "CITA V20.2.2" ChainTypeETH = "ETH" )
Variables ¶
This section is empty.
Functions ¶
func AppAdminsChainKey ¶ added in v1.20.0
func AppchainAdminKey ¶ added in v1.20.0
func AppchainKey ¶ added in v1.20.0
func AppchainNameKey ¶ added in v1.20.0
func AppchainOccupyNameKey ¶ added in v1.20.0
Types ¶
type Appchain ¶
type Appchain struct { ID string `json:"id"` ChainName string `json:"chain_name"` ChainType string `json:"chain_type"` TrustRoot []byte `json:"trust_root"` Broker []byte `json:"broker"` Desc string `json:"desc"` Version uint64 `json:"version"` DID string `json:"did"` PubKey []byte `json:"pub_key"` Status g.GovernanceStatus `json:"status"` FSM *fsm.FSM `json:"fsm"` }
func (*Appchain) IsAvailable ¶ added in v1.20.0
type AppchainManager ¶
func (*AppchainManager) All ¶ added in v1.3.0
func (am *AppchainManager) All(_ []byte) (interface{}, error)
All returns all appchains
func (*AppchainManager) ChangeStatus ¶
func (am *AppchainManager) ChangeStatus(id, trigger, lastStatus string, _ []byte) (bool, []byte)
func (*AppchainManager) CountAll ¶ added in v1.3.0
func (am *AppchainManager) CountAll(_ []byte) (bool, []byte)
CountAll counts all appchains including approved, rejected or registered
func (*AppchainManager) CountAvailable ¶ added in v1.3.0
func (am *AppchainManager) CountAvailable(_ []byte) (bool, []byte)
CountAvailable counts all available appchains
func (*AppchainManager) DeleteAppchain ¶
func (am *AppchainManager) DeleteAppchain(id string) (bool, []byte)
func (*AppchainManager) FetchAuditRecords ¶
func (am *AppchainManager) FetchAuditRecords(id string) (bool, []byte)
func (*AppchainManager) GetChainIdByName ¶ added in v1.20.0
func (am *AppchainManager) GetChainIdByName(name string) (string, error)
func (*AppchainManager) GovernancePre ¶ added in v1.20.0
func (am *AppchainManager) GovernancePre(chainId string, event g.EventType, _ []byte) (interface{}, *boltvm.BxhError)
GovernancePre checks if the appchain can do the event. (only check, not modify infomation) return *appchain, extra info, error
func (*AppchainManager) QueryById ¶ added in v1.3.0
func (am *AppchainManager) QueryById(id string, _ []byte) (interface{}, error)
func (*AppchainManager) Register ¶
func (am *AppchainManager) Register(chainInfo *Appchain)
Register registers appchain info, return chain id
type AppchainMgr ¶
type AppchainMgr interface { governance.Governance // Register registers object info, return object id and error Register(chainInfo *Appchain) // Update updates available or frozen object Update(updateInfo *Appchain) (bool, []byte) // Audit bitxhub manager audit appchain register info // caller is the bitxhub manager address // proposer is the appchain manager address Audit(proposer string, isApproved int32, desc string) (bool, []byte) //FetchAuditRecords fetches audit records by appchain id FetchAuditRecords(id string) (bool, []byte) // DeleteAppchain deletes appchain DeleteAppchain(id string) (bool, []byte) GetChainIdByName(name string) (string, error) }
func New ¶
func New(persister g.Persister) AppchainMgr
type FabricBroker ¶ added in v1.20.0
Directories ¶
Path | Synopsis |
---|---|
Package mock_appchainMgr is a generated GoMock package.
|
Package mock_appchainMgr is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.