Documentation
¶
Index ¶
- Constants
- func Hash(x []byte) cadata.ID
- func MarshalVolumeSpec(x VolumeSpec) ([]byte, error)
- type AEADCellSpec
- type BlobcacheStoreSpec
- type CellSpec
- type ErrBadConfig
- type FS
- func (fs *FS) Cat(ctx context.Context, p string, w io.Writer) error
- func (fs *FS) Ls(ctx context.Context, p string, fn func(iofs.DirEntry) error) error
- func (fs *FS) Mkdir(ctx context.Context, p string) error
- func (fs *FS) Open(ctx context.Context, p string) (*File, error)
- func (fs *FS) PutFile(ctx context.Context, p string, r io.Reader) error
- func (fs *FS) Remove(ctx context.Context, p string) error
- type File
- type GotBranchCellSpec
- type HTTPCellSpec
- type HTTPStoreSpec
- type IPFSStoreSpec
- type Option
- type StoreSpec
- type TCPDialer
- type Volume
- type VolumeSpec
Constants ¶
View Source
const (
MaxBlobSize = gotfs.DefaultMaxBlobSize
)
Variables ¶
This section is empty.
Functions ¶
func MarshalVolumeSpec ¶
func MarshalVolumeSpec(x VolumeSpec) ([]byte, error)
Types ¶
type AEADCellSpec ¶
type BlobcacheStoreSpec ¶
type BlobcacheStoreSpec struct{}
type CellSpec ¶
type CellSpec struct { Memory *struct{} `json:"memory,omitempty"` File *string `json:"file,omitempty"` HTTP *HTTPCellSpec `json:"http,omitempty"` Literal json.RawMessage `json:"literal,omitempty"` AEAD *AEADCellSpec `json:"aead,omitempty"` GotBranch *GotBranchCellSpec `json:"got_branch,omitempty"` }
CellSpec is a specification for a Cell
type ErrBadConfig ¶
ErrBadConfig is returned when WebFS encounters an invalid config which it cannot mount.
func (ErrBadConfig) Cause ¶
func (e ErrBadConfig) Cause() error
func (ErrBadConfig) Error ¶
func (e ErrBadConfig) Error() string
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS is an instance of a WebFS filesystem
type GotBranchCellSpec ¶
type HTTPCellSpec ¶
type HTTPStoreSpec ¶
type IPFSStoreSpec ¶
type IPFSStoreSpec struct{}
type Option ¶
type Option func(c *fsConfig)
Option is used to configure a WebFS instance.
func WithBlobcache ¶
WithBlobcache sets the endpoint to connect to the blobcache daemon
func WithLogger ¶
func WithLogger(l logrus.FieldLogger) Option
WithLogger sets the logger for the WebFS instance
func WithPosixFS ¶
WithPosixFS sets x as the filesystem to use for file backed cells.
type StoreSpec ¶
type StoreSpec struct { Memory *struct{} `json:"memory,omitempty"` FS *string `json:"fs,omitempty"` HTTP HTTPStoreSpec `json:"http,omitempty"` Blobcache *BlobcacheStoreSpec `json:"blobcache,omitempty"` IPFS *IPFSStoreSpec `json:"ipfs,omitempty"` }
type VolumeSpec ¶
type VolumeSpec struct { Cell CellSpec `json:"cell"` Store StoreSpec `json:"store"` Salt []byte `json:"salt"` }
VolumeSpec is a specification for a Volume.
func ParseVolumeSpec ¶
func ParseVolumeSpec(x []byte) (*VolumeSpec, error)
ParseVolumeSpec parses a JSON formatted VolumeSpec from x.
func (VolumeSpec) Fingerprint ¶
func (vs VolumeSpec) Fingerprint() [32]byte
Click to show internal directories.
Click to hide internal directories.