Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrForbidden = errors.New("forbidden") ErrNotFound = errors.New("not found") ErrMethodNotAllowed = errors.New("method not allowed") ErrTooManyRequests = errors.New("too many requests") ErrInternalServerError = errors.New("internal server error") )
Errors that are returned by the API.
Functions ¶
Types ¶
type BadRequestError ¶
type BadRequestError struct {
// contains filtered or unexported fields
}
BadRequestError holds list of errors from http response that represent invalid data submitted by the user.
func NewBadRequestError ¶
func NewBadRequestError(errors ...string) (err *BadRequestError)
NewBadRequestError constructs a new BadRequestError with provided errors.
func (*BadRequestError) Error ¶
func (e *BadRequestError) Error() (s string)
func (*BadRequestError) Errors ¶
func (e *BadRequestError) Errors() (errs []string)
Errors returns a list of error messages.
type BytesService ¶ added in v0.2.10
type BytesService service
BytesService represents Bee's Bytes service
func (*BytesService) Download ¶ added in v0.2.10
func (b *BytesService) Download(ctx context.Context, a swarm.Address) (resp io.ReadCloser, err error)
Download downloads data from the node
func (*BytesService) Upload ¶ added in v0.2.10
func (b *BytesService) Upload(ctx context.Context, data io.Reader) (resp BytesUploadResponse, err error)
Upload uploads bytes to the node
type BytesUploadResponse ¶ added in v0.2.10
BytesUploadResponse represents Upload's response
type ChunksService ¶ added in v0.2.10
type ChunksService service
ChunksService represents Bee's Chunks service
func (*ChunksService) Download ¶ added in v0.2.10
func (c *ChunksService) Download(ctx context.Context, a swarm.Address) (resp io.ReadCloser, err error)
Download downloads data from the node
type ChunksUploadResponse ¶ added in v0.2.10
type ChunksUploadResponse struct { Message string `json:"message,omitempty"` Code int `json:"code,omitempty"` }
ChunksUploadResponse represents Upload's response
type Client ¶
type Client struct { // Services that API provides. Bytes *BytesService Chunks *ChunksService Files *FilesService // contains filtered or unexported fields }
Client manages communication with the Bee API.
type ClientOptions ¶
ClientOptions holds optional parameters for the Client.
type FilesService ¶ added in v0.2.11
type FilesService service
FilesService represents Bee's Files service
func (*FilesService) Download ¶ added in v0.2.11
func (f *FilesService) Download(ctx context.Context, a swarm.Address) (resp io.ReadCloser, err error)
Download downloads data from the node
type FilesUploadResponse ¶ added in v0.2.11
FilesUploadResponse represents Upload's response