Documentation ¶
Index ¶
- Constants
- func DeriveKey(out []byte, salt *[32]byte, input []byte)
- type AddExister
- type Agent
- func (ag *Agent) Concat(ctx context.Context, s cadata.Store, blockSize int, salt *[32]byte, ...) (*Root, error)
- func (ag *Agent) Create(ctx context.Context, s cadata.Poster, salt *[32]byte, r io.Reader) (*Root, error)
- func (ag *Agent) NewReader(ctx context.Context, s cadata.Getter, root Root) *Reader
- func (ag *Agent) NewWriter(s cadata.Poster, salt *[32]byte) *Writer
- func (ag *Agent) Populate(ctx context.Context, s cadata.Getter, root Root, dst AddExister) error
- func (ag *Agent) ReadAt(ctx context.Context, s cadata.Getter, x Root, offset int64, buf []byte) (n int, err error)
- func (ag *Agent) Sync(ctx context.Context, dst cadata.Store, src cadata.Getter, x Root, ...) error
- func (ag *Agent) Traverse(ctx context.Context, s cadata.Getter, sem *semaphore.Weighted, root Root, ...) error
- type DEK
- type Index
- type Option
- type Reader
- type Ref
- type Root
- type Traverser
- type Writer
Constants ¶
View Source
const DEKSize = 32
View Source
const RefSize = cadata.IDSize + DEKSize
RefSize is the size of a Ref marshalled to binary
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) Create ¶
func (ag *Agent) Create(ctx context.Context, s cadata.Poster, salt *[32]byte, r io.Reader) (*Root, error)
Create creates a Blob and returns it's Root.
type Option ¶
type Option func(*Agent)
func WithBlockSize ¶
WithBlockSize sets the block size used when writing files. If n < 0 then WithBlockSize panics If n == 0 then the stores MaxBlobSize will be used as a default.
func WithCacheSize ¶
type Ref ¶
Ref is a reference to data in a content-addressed store
func RefFromBytes ¶
func (Ref) MarshalBinary ¶
type Root ¶
Root is the root of a blob represented as a tree of fixed sized content-addressed blocks
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) SetWriteContext ¶
Click to show internal directories.
Click to hide internal directories.