Documentation
¶
Index ¶
- type SmartContract
- func (s *SmartContract) CreateVA(ctx contractapi.TransactionContextInterface, id string, issuer string, ...) error
- func (s *SmartContract) DeleteVA(ctx contractapi.TransactionContextInterface, id string) error
- func (s *SmartContract) ExistsVA(ctx contractapi.TransactionContextInterface, id string) (bool, error)
- func (s *SmartContract) GetAllVA(ctx contractapi.TransactionContextInterface) ([]*VoucherAsset, error)
- func (s *SmartContract) InitLedger(ctx contractapi.TransactionContextInterface) error
- type VoucherAsset
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SmartContract ¶
type SmartContract struct {
contractapi.Contract
}
SmartContract todo
func (*SmartContract) CreateVA ¶
func (s *SmartContract) CreateVA(ctx contractapi.TransactionContextInterface, id string, issuer string, owner string, amount int64, contractHash string, invoiceHash string) error
CreateVA create voucher asset
func (*SmartContract) DeleteVA ¶
func (s *SmartContract) DeleteVA(ctx contractapi.TransactionContextInterface, id string) error
DeleteVA todo delete voucher asset
func (*SmartContract) ExistsVA ¶
func (s *SmartContract) ExistsVA(ctx contractapi.TransactionContextInterface, id string) (bool, error)
ExistsVA todo
func (*SmartContract) GetAllVA ¶
func (s *SmartContract) GetAllVA(ctx contractapi.TransactionContextInterface) ([]*VoucherAsset, error)
GetAllVA returns all voucher assets found in world state
func (*SmartContract) InitLedger ¶
func (s *SmartContract) InitLedger(ctx contractapi.TransactionContextInterface) error
InitLedger todo
type VoucherAsset ¶
type VoucherAsset struct {
ID string `json:"ID"`
ParentID string `json:"parentID"`
Issuer string `json:"issuer"`
Owner string `json:"owner"`
Amount int64 `json:"amount"`
CreateDate time.Time `json:"createDate"`
EndDate time.Time `json:"endDate"`
ContractHash string `json:"contractHash"`
InvoiceHash string `json:"invoiceHash"`
Status string `json:"status"`
Signature string `json:"signature"`
}
VoucherAsset voucher assets
Click to show internal directories.
Click to hide internal directories.