rpc

package
v0.9.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func (*Client) AddPodToMarketplace

func (c *Client) AddPodToMarketplace(podAddress, owner common.Address, pod, title, desc, thumbnail string, price uint64, daysValid uint16, category, nameHash [32]byte, key *ecdsa.PrivateKey) error

func (*Client) AllowAccess

func (c *Client) AllowAccess(owner common.Address, shareInfo *ShareInfo, requestHash, secret [32]byte, key *ecdsa.PrivateKey) error

func (*Client) GetAllSubscribablePods

func (c *Client) GetAllSubscribablePods() ([]datahub.DataHubSub, error)

func (*Client) GetOwnSubscribablePods

func (c *Client) GetOwnSubscribablePods(owner common.Address) ([]datahub.DataHubSub, error)

func (*Client) GetSub

func (c *Client) GetSub(subHash [32]byte) (*datahub.DataHubSub, error)

func (*Client) GetSubRequests

func (c *Client) GetSubRequests(owner common.Address) ([]datahub.DataHubSubRequest, error)

func (*Client) GetSubscribablePodInfo

func (c *Client) GetSubscribablePodInfo(subHash [32]byte) (*SubscriptionItemInfo, error)

func (*Client) GetSubscription

func (c *Client) GetSubscription(infoLocation []byte, secret [32]byte) (*ShareInfo, error)

func (*Client) GetSubscriptions

func (c *Client) GetSubscriptions(nameHash [32]byte) ([]datahub.DataHubSubItem, error)

func (*Client) HidePodFromMarketplace

func (c *Client) HidePodFromMarketplace(owner common.Address, subHash [32]byte, hide bool, key *ecdsa.PrivateKey) error

func (*Client) RequestAccess

func (c *Client) RequestAccess(subscriber common.Address, subHash, nameHash [32]byte, key *ecdsa.PrivateKey) error

type ShareInfo

type ShareInfo struct {
	PodName     string `json:"podName"`
	Address     string `json:"podAddress"`
	Password    string `json:"password"`
	UserAddress string `json:"userAddress"`
}

ShareInfo is the structure of the share info

type SubscriptionInfoGetter

type SubscriptionInfoGetter interface {
	DownloadBlob(address []byte) (data []byte, respCode int, err error)
	DownloadBzz(address []byte) (data []byte, respCode int, err error)
}

type SubscriptionInfoPutter

type SubscriptionInfoPutter interface {
	UploadBlob(data []byte, tag uint32, encrypt bool) (address []byte, err error)
	UploadBzz(data []byte, fileName string) (address []byte, err error)
}

type SubscriptionItemInfo

type SubscriptionItemInfo struct {
	Category          string `json:"category"`
	Description       string `json:"description"`
	FdpSellerNameHash string `json:"sellerNameHash"`
	ImageURL          string `json:"imageUrl"`
	PodAddress        string `json:"podAddress"`
	PodName           string `json:"podName"`
	Price             string `json:"price"`
	Title             string `json:"title"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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