Documentation
¶
Index ¶
- type ACL
- func (acl *ACL) GetRoleAdmin(role []byte) ([]byte, error)
- func (acl *ACL) GrantRole(role []byte, account string) error
- func (acl *ACL) HasRole(role []byte, account string) (string, error)
- func (acl *ACL) RenounceRole(msg *utils.Message, role []byte, account string) error
- func (acl *ACL) RevokeRole(role []byte, account string) error
- func (acl *ACL) SetRoleAdmin(role []byte, adminRole []byte) error
- type Depository
- func (depository *Depository) CurrentNonce(account string) (uint64, error)
- func (depository *Depository) GetValueByIndex(index string) (string, error)
- func (depository *Depository) GetValueByKID(kid string) (string, error)
- func (depository *Depository) Initialize() error
- func (depository *Depository) PutUntrustValue(val string) (string, error)
- func (depository *Depository) PutValue(msg *utils.Message, val string) (string, error)
- func (depository *Depository) Total() (uint64, error)
- type Hyperledger
- type Market
- func (market *Market) CreateRepo(msg *utils.Message, url string) (string, error)
- func (market *Market) CurrentNonce(account string) (uint64, error)
- func (market *Market) GetRepos() ([]byte, error)
- func (market *Market) Initialize() error
- func (market *Market) UpdateRepo(msg *utils.Message, repoID string, newUrl string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Depository ¶
type Depository struct {
// contains filtered or unexported fields
}
func NewDepository ¶
func NewDepository(client *network.FabricClient, contract string) (*Depository, error)
func (*Depository) CurrentNonce ¶
func (depository *Depository) CurrentNonce(account string) (uint64, error)
func (*Depository) GetValueByIndex ¶
func (depository *Depository) GetValueByIndex(index string) (string, error)
func (*Depository) GetValueByKID ¶
func (depository *Depository) GetValueByKID(kid string) (string, error)
func (*Depository) Initialize ¶
func (depository *Depository) Initialize() error
func (*Depository) PutUntrustValue ¶
func (depository *Depository) PutUntrustValue(val string) (string, error)
func (*Depository) Total ¶
func (depository *Depository) Total() (uint64, error)
type Hyperledger ¶
type Hyperledger struct {
// contains filtered or unexported fields
}
func NewHyperledger ¶
func NewHyperledger(client *network.FabricClient, contract string) (*Hyperledger, error)
func (*Hyperledger) GetMetadata ¶
func (hf *Hyperledger) GetMetadata() ([]byte, error)
type Market ¶
type Market struct {
// contains filtered or unexported fields
}
func NewMarket ¶
func NewMarket(client *network.FabricClient, contract string) (*Market, error)
NewMarket creates a new instance of Market using the provided FabricClient and contract name. Returns a pointer to Market and an error if the arguments are invalid or the contract is not found.
func (*Market) CreateRepo ¶
CreateRepo creates a new repository with the specified message and URL. It submits a new transaction to the blockchain via the smart contract. Returns the ID of the new repository or an error if the transaction fails.
func (*Market) CurrentNonce ¶
CurrentNonce returns the current nonce for a given account on the market contract.
func (*Market) Initialize ¶
Initialize initializes the market.
Click to show internal directories.
Click to hide internal directories.