contracts

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	// contains filtered or unexported fields
}

func NewACL

func NewACL(client *network.FabricClient, contract string) (*ACL, error)

func (*ACL) GetRoleAdmin

func (acl *ACL) GetRoleAdmin(role []byte) ([]byte, error)

func (*ACL) GrantRole

func (acl *ACL) GrantRole(role []byte, account string) error

func (*ACL) HasRole

func (acl *ACL) HasRole(role []byte, account string) (string, error)

func (*ACL) RenounceRole

func (acl *ACL) RenounceRole(msg *utils.Message, role []byte, account string) error

func (*ACL) RevokeRole

func (acl *ACL) RevokeRole(role []byte, account string) error

func (*ACL) SetRoleAdmin

func (acl *ACL) SetRoleAdmin(role []byte, adminRole []byte) error

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) PutValue

func (depository *Depository) PutValue(msg *utils.Message, 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

func (market *Market) CreateRepo(msg *utils.Message, url string) (string, error)

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

func (market *Market) CurrentNonce(account string) (uint64, error)

CurrentNonce returns the current nonce for a given account on the market contract.

func (*Market) GetRepos

func (market *Market) GetRepos() ([]byte, error)

GetRepos returns the repositories associated with the market.

func (*Market) Initialize

func (market *Market) Initialize() error

Initialize initializes the market.

func (*Market) UpdateRepo

func (market *Market) UpdateRepo(msg *utils.Message, repoID string, newUrl string) error

UpdateRepo updates the URL for a given repository ID in the blockchain

Jump to

Keyboard shortcuts

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