views

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgreeToBuyView

type AgreeToBuyView struct {
	*AssetPrice
}

func (*AgreeToBuyView) Call

func (a *AgreeToBuyView) Call(context view.Context) (interface{}, error)

type AgreeToBuyViewFactory

type AgreeToBuyViewFactory struct{}

func (*AgreeToBuyViewFactory) NewView

func (p *AgreeToBuyViewFactory) NewView(in []byte) (view.View, error)

type AgreeToSellView

type AgreeToSellView struct {
	*AssetPrice
}

func (*AgreeToSellView) Call

func (a *AgreeToSellView) Call(context view.Context) (interface{}, error)

type AgreeToSellViewFactory

type AgreeToSellViewFactory struct{}

func (*AgreeToSellViewFactory) NewView

func (p *AgreeToSellViewFactory) NewView(in []byte) (view.View, error)

type Asset

type Asset struct {
	ObjectType        string `json:"objectType"` // ObjectType is used to distinguish different object types in the same chaincode namespace
	ID                string `json:"assetID"`
	OwnerOrg          string `json:"ownerOrg"`
	PublicDescription string `json:"publicDescription"`
}

Asset struct and properties must be exported (start with capitals) to work with contract api metadata

type AssetPrice

type AssetPrice struct {
	AssetID string `json:"asset_id"`
	TradeID string `json:"trade_id"`
	Price   uint64 `json:"price"`
}

func (*AssetPrice) Bytes

func (ap *AssetPrice) Bytes() ([]byte, error)

type AssetProperties

type AssetProperties struct {
	ObjectType string `json:"objectType"` // ObjectType is used to distinguish different object types in the same chaincode namespace
	ID         string `json:"assetID"`
	Color      string `json:"color"`
	Size       int    `json:"size"`
	Salt       []byte `json:"salt"`
}

func (*AssetProperties) Bytes

func (ap *AssetProperties) Bytes() ([]byte, error)

type ChangePublicDescription

type ChangePublicDescription struct {
	ID                string
	PublicDescription string
}

type ChangePublicDescriptionView

type ChangePublicDescriptionView struct {
	*ChangePublicDescription
}

func (*ChangePublicDescriptionView) Call

func (r *ChangePublicDescriptionView) Call(context view.Context) (interface{}, error)

type ChangePublicDescriptionViewFactory

type ChangePublicDescriptionViewFactory struct{}

func (*ChangePublicDescriptionViewFactory) NewView

type CreateAsset

type CreateAsset struct {
	AssetProperties   *AssetProperties
	PublicDescription string
}

type CreateAssetView

type CreateAssetView struct {
	*CreateAsset
}

func (*CreateAssetView) Call

func (c *CreateAssetView) Call(context view.Context) (interface{}, error)

type CreateAssetViewFactory

type CreateAssetViewFactory struct{}

func (*CreateAssetViewFactory) NewView

func (c *CreateAssetViewFactory) NewView(in []byte) (view.View, error)

type ReadAsset

type ReadAsset struct {
	ID string
}

type ReadAssetPrivateProperties

type ReadAssetPrivateProperties struct {
	ID string
}

type ReadAssetPrivatePropertiesView

type ReadAssetPrivatePropertiesView struct {
	*ReadAssetPrivateProperties
}

func (*ReadAssetPrivatePropertiesView) Call

func (r *ReadAssetPrivatePropertiesView) Call(context view.Context) (interface{}, error)

type ReadAssetPrivatePropertiesViewFactory

type ReadAssetPrivatePropertiesViewFactory struct{}

func (*ReadAssetPrivatePropertiesViewFactory) NewView

type ReadAssetView

type ReadAssetView struct {
	*ReadAsset
}

func (*ReadAssetView) Call

func (r *ReadAssetView) Call(context view.Context) (interface{}, error)

type ReadAssetViewFactory

type ReadAssetViewFactory struct{}

func (*ReadAssetViewFactory) NewView

func (p *ReadAssetViewFactory) NewView(in []byte) (view.View, error)

type Transfer

type Transfer struct {
	Recipient       view.Identity
	AssetProperties *AssetProperties
	AssetPrice      *AssetPrice
}

type TransferView

type TransferView struct {
	*Transfer
}

func (*TransferView) Call

func (a *TransferView) Call(ctx view.Context) (interface{}, error)

type TransferViewFactory

type TransferViewFactory struct{}

func (*TransferViewFactory) NewView

func (p *TransferViewFactory) NewView(in []byte) (view.View, error)

Jump to

Keyboard shortcuts

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