bonfire

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Package bonfire implements the B2 service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS string

func (FS) Finish

func (f FS) Finish(fileId string) error

func (FS) Get

func (f FS) Get(fileId string) ([]byte, error)

func (FS) ObjectByName

func (f FS) ObjectByName(bucket, name string) (pyre.DownloadableObject, error)

func (FS) PartWriter

func (f FS) PartWriter(id string, part int) (io.WriteCloser, error)

func (FS) Parts

func (f FS) Parts(id string) ([]string, error)

func (FS) Start

func (f FS) Start(bucketId, fileName, fileId string, bs []byte) error

func (FS) Writer

func (f FS) Writer(bucket, name, id string) (io.WriteCloser, error)

type LocalBucket

type LocalBucket struct {
	Port int
	// contains filtered or unexported fields
}

func (*LocalBucket) AddBucket

func (lb *LocalBucket) AddBucket(id, name string, bs []byte) error

func (*LocalBucket) GetBucket

func (lb *LocalBucket) GetBucket(id string) ([]byte, error)

func (*LocalBucket) GetBucketID

func (lb *LocalBucket) GetBucketID(name string) (string, error)

func (*LocalBucket) ListBuckets

func (lb *LocalBucket) ListBuckets(acct string) ([][]byte, error)

func (*LocalBucket) RemoveBucket

func (lb *LocalBucket) RemoveBucket(id string) error

func (*LocalBucket) UpdateBucket

func (lb *LocalBucket) UpdateBucket(id string, rev int, bs []byte) error

type Localhost

type Localhost int

func (Localhost) APIRoot

func (l Localhost) APIRoot(string) string

func (Localhost) Authorize

func (Localhost) Authorize(string, string) (string, error)

func (Localhost) CheckCreds

func (Localhost) CheckCreds(string, string) error

func (Localhost) DownloadRoot

func (l Localhost) DownloadRoot(string) string

func (Localhost) Sizes

func (Localhost) Sizes(string) (int32, int32)

func (Localhost) String

func (l Localhost) String() string

func (Localhost) UploadHost

func (l Localhost) UploadHost(id string) (string, error)

func (Localhost) UploadPartHost

func (l Localhost) UploadPartHost(fileId string) (string, error)

Jump to

Keyboard shortcuts

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