bee

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: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.9.1

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

Client is a bee http client that satisfies blockstore.Client

func NewBeeClient

func NewBeeClient(apiUrl, postageBlockId string, shouldPin bool, logger logging.Logger) *Client

NewBeeClient creates a new client which connects to the Swarm bee node to access the Swarm network.

func (*Client) CheckConnection added in v0.9.1

func (s *Client) CheckConnection() bool

CheckConnection is used to check if the bee client is up and running.

func (*Client) CreateTag added in v0.9.2

func (s *Client) CreateTag(address []byte) (uint32, error)

CreateTag creates a tag for given address

func (*Client) DeleteReference added in v0.9.1

func (*Client) DeleteReference(address []byte) error

DeleteReference unpins a reference so that it will be garbage collected by the Swarm network.

func (*Client) DownloadBlob added in v0.9.1

func (s *Client) DownloadBlob(address []byte) ([]byte, int, error)

DownloadBlob downloads a blob of binary data from the Swarm network.

func (*Client) DownloadBzz added in v0.9.3

func (s *Client) DownloadBzz(address []byte) ([]byte, int, error)

DownloadBzz downloads bzz data from the Swarm network.

func (*Client) DownloadChunk added in v0.9.1

func (s *Client) DownloadChunk(ctx context.Context, address []byte) (data []byte, err error)

DownloadChunk downloads a chunk with given address from the Swarm network

func (*Client) GetTag added in v0.9.2

func (s *Client) GetTag(tag uint32) (int64, int64, int64, error)

GetTag gets sync status of a given tag

func (*Client) UploadBlob added in v0.9.1

func (s *Client) UploadBlob(data []byte, tag uint32, encrypt bool) (address []byte, err error)

UploadBlob uploads a binary blob of data to Swarm network. It also optionally pins and encrypts the data.

func (*Client) UploadBzz added in v0.9.3

func (s *Client) UploadBzz(data []byte, fileName string) (address []byte, err error)

UploadBzz uploads a file through bzz api

func (*Client) UploadChunk added in v0.9.1

func (s *Client) UploadChunk(ch swarm.Chunk) (address []byte, err error)

UploadChunk uploads a chunk to Swarm network.

func (*Client) UploadSOC added in v0.9.1

func (s *Client) UploadSOC(owner, id, signature string, data []byte) (address []byte, err error)

UploadSOC is used construct and send a Single Owner Chunk to the Swarm bee client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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