Documentation
¶
Index ¶
- func Modify(ctx context.Context, vol Volume, ...) error
- func View(ctx context.Context, vol Volume, fn func(src cadata.Getter, root []byte) error) error
- type AEADTx
- func (tx *AEADTx) Abort(ctx context.Context) error
- func (tx *AEADTx) Commit(ctx context.Context) error
- func (tx *AEADTx) Exists(ctx context.Context, cids []blobcache.CID, dst []bool) error
- func (tx *AEADTx) Get(ctx context.Context, cid blobcache.CID, buf []byte) (int, error)
- func (tx *AEADTx) Hash(data []byte) blobcache.CID
- func (tx *AEADTx) Load(ctx context.Context, dst *[]byte) error
- func (tx *AEADTx) MaxSize() int
- func (tx *AEADTx) Post(ctx context.Context, data []byte) (cid blobcache.CID, err error)
- func (tx *AEADTx) Save(ctx context.Context, ptext []byte) error
- type AEADVolume
- type Blobcache
- type GetVerifierFunc
- type Memory
- type MemoryTx
- func (tx *MemoryTx) Abort(ctx context.Context) error
- func (tx *MemoryTx) Commit(ctx context.Context) error
- func (tx *MemoryTx) Exists(ctx context.Context, cids []blobcache.CID, dst []bool) error
- func (tx *MemoryTx) Get(ctx context.Context, cid blobcache.CID, buf []byte) (int, error)
- func (tx *MemoryTx) Hash(data []byte) blobcache.CID
- func (tx *MemoryTx) Load(ctx context.Context, dst *[]byte) error
- func (tx *MemoryTx) MaxSize() int
- func (tx *MemoryTx) Post(ctx context.Context, data []byte) (cid blobcache.CID, err error)
- func (tx *MemoryTx) Save(ctx context.Context, root []byte) error
- type SignedTx
- func (tx *SignedTx) Abort(ctx context.Context) error
- func (tx *SignedTx) Commit(ctx context.Context) error
- func (tx *SignedTx) Exists(ctx context.Context, cids []blobcache.CID, dst []bool) error
- func (tx *SignedTx) Get(ctx context.Context, cid blobcache.CID, buf []byte) (int, error)
- func (tx *SignedTx) Hash(data []byte) blobcache.CID
- func (tx *SignedTx) Load(ctx context.Context, dst *[]byte) error
- func (tx *SignedTx) MaxSize() int
- func (tx *SignedTx) Post(ctx context.Context, data []byte) (blobcache.CID, error)
- func (tx *SignedTx) Save(ctx context.Context, src []byte) error
- type SignedVolume
- type Tx
- type TxParams
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AEADTx ¶
type AEADTx struct {
// contains filtered or unexported fields
}
type AEADVolume ¶
type AEADVolume struct {
// contains filtered or unexported fields
}
func NewChaCha20Poly1305 ¶
func NewChaCha20Poly1305(inner Volume, secret *[32]byte) *AEADVolume
NewChaCha20Poly1305 creates a new AEAD volume that uses the ChaCha20Poly1305 algorithm. It uses the 24 byte nonce variant.
type GetVerifierFunc ¶
type MemoryTx ¶
type MemoryTx struct {
// contains filtered or unexported fields
}
type SignedTx ¶
type SignedTx struct {
// contains filtered or unexported fields
}
type SignedVolume ¶
type SignedVolume struct {
// contains filtered or unexported fields
}
func NewSignedVolume ¶
func NewSignedVolume(inner Volume, pki inet256.PKI, privateKey inet256.PrivateKey, getVerifier GetVerifierFunc) *SignedVolume
NewSignedVolume creates a SignedVolume. publicKey must not be nil, if privateKey is nil, then the volume will be read only.
type Tx ¶
type Tx interface {
Commit(ctx context.Context) error
Abort(ctx context.Context) error
Load(ctx context.Context, dst *[]byte) error
Save(ctx context.Context, src []byte) error
Post(ctx context.Context, data []byte) (blobcache.CID, error)
Exists(ctx context.Context, cids []blobcache.CID, dst []bool) error
Get(ctx context.Context, cid blobcache.CID, buf []byte) (int, error)
MaxSize() int
Hash(data []byte) blobcache.CID
}
Click to show internal directories.
Click to hide internal directories.