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 BzzChunkService ¶ added in v0.2.6
type BzzChunkService service
BzzChunkService represents Bee's Bzz service
func (*BzzChunkService) Download ¶ added in v0.2.6
func (b *BzzChunkService) Download(ctx context.Context, a swarm.Address) (resp io.ReadCloser, err error)
Download downloads data from the node
type BzzChunkUploadResponse ¶ added in v0.2.6
type BzzChunkUploadResponse struct { Message string `json:"message,omitempty"` Code int `json:"code,omitempty"` }
BzzChunkUploadResponse represents Upload's response
type BzzService ¶
type BzzService service
BzzService represents Bee's Bzz service
func (*BzzService) Download ¶ added in v0.2.2
func (b *BzzService) Download(ctx context.Context, a swarm.Address) (resp io.ReadCloser, err error)
Download downloads data from the node
func (*BzzService) Upload ¶
func (b *BzzService) Upload(ctx context.Context, data io.Reader) (resp UploadResponse, err error)
Upload uploads data to the node
type Client ¶
type Client struct { // Services that API provides. Bzz *BzzService BzzChunk *BzzChunkService PingPong *PingPongService // contains filtered or unexported fields }
Client manages communication with the Bee API.
type ClientOptions ¶
ClientOptions holds optional parameters for the Client.
type PingPongService ¶
type PingPongService service
PingPongService represents Bee's PingPong service
type UploadResponse ¶
UploadResponse represents Upload's response