Documentation ¶
Index ¶
Constants ¶
View Source
const ( GasPriceHeader = "Gas-Price" SwarmPinHeader = "Swarm-Pin" SwarmTagHeader = "Swarm-Tag" SwarmEncryptHeader = "Swarm-Encrypt" SwarmIndexDocumentHeader = "Swarm-Index-Document" SwarmErrorDocumentHeader = "Swarm-Error-Document" SwarmFeedIndexHeader = "Swarm-Feed-Index" SwarmFeedIndexNextHeader = "Swarm-Feed-Index-Next" SwarmCollectionHeader = "Swarm-Collection" SwarmPostageBatchIdHeader = "Swarm-Postage-Batch-Id" SwarmDeferredUploadHeader = "Swarm-Deferred-Upload" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct { C *httpclient.Client Bytes *BytesService Chunk *ChunkService Dirs *DirsService }
func NewAPI ¶
func NewAPI(beeURL *url.URL, o *httpclient.ClientOptions) (*Api, error)
type BytesService ¶
type BytesService struct {
// contains filtered or unexported fields
}
func (*BytesService) Download ¶
func (bs *BytesService) Download(ctx context.Context, addr swarm.Address) (resp io.ReadCloser, err error)
Download downloads data from the node
func (*BytesService) Upload ¶
func (bs *BytesService) Upload(ctx context.Context, data io.Reader, o UploadOptions) (BytesUploadResponse, error)
Upload uploads bytes to the node
type BytesUploadResponse ¶
BytesUploadResponse represents Upload's response
type ChunkService ¶
type ChunkService struct {
// contains filtered or unexported fields
}
func (*ChunkService) Download ¶
func (cs *ChunkService) Download(ctx context.Context, addr swarm.Address, targets ...string) (resp io.ReadCloser, err error)
func (*ChunkService) Upload ¶
func (cs *ChunkService) Upload(ctx context.Context, data []byte, o UploadOptions) (ChunksUploadResponse, error)
type ChunksUploadResponse ¶
type DirsService ¶
type DirsService struct {
// contains filtered or unexported fields
}
func (*DirsService) Download ¶
func (ds *DirsService) Download(ctx context.Context, addr swarm.Address, path string) (resp io.ReadCloser, err error)
Download downloads data from the node
func (*DirsService) Upload ¶
func (ds *DirsService) Upload(ctx context.Context, data io.Reader, size int64, o UploadCollectionOptions) (DirsUploadResponse, error)
Upload uploads TAR collection to the node
type DirsUploadResponse ¶
DirsUploadResponse represents Upload's response
type UploadCollectionOptions ¶
type UploadOptions ¶
Click to show internal directories.
Click to hide internal directories.