Documentation ¶
Index ¶
- func SaveRef(ctx context.Context, path string, fi os.FileInfo, ref types.Ref) error
- func SaveRefFile(ctx context.Context, f *os.File, fi os.FileInfo, ref types.Ref) error
- func Stat(ctx context.Context, path string) (types.SizedRef, error)
- func StatFile(ctx context.Context, f *os.File) (types.SizedRef, error)
- type Config
- type Storage
- func (s *Storage) BeginBlob(ctx context.Context) (storage.BlobWriter, error)
- func (s *Storage) Close() error
- func (s *Storage) DeletePin(ctx context.Context, name string) error
- func (s *Storage) FetchBlob(ctx context.Context, ref types.Ref) (io.ReadCloser, uint64, error)
- func (s *Storage) FetchSchema(ctx context.Context, ref types.Ref) (io.ReadCloser, uint64, error)
- func (s *Storage) GetPin(ctx context.Context, name string) (types.Ref, error)
- func (s *Storage) ImportFile(ctx context.Context, path string) (types.SizedRef, error)
- func (s *Storage) IterateBlobs(ctx context.Context) storage.Iterator
- func (s *Storage) IteratePins(ctx context.Context) storage.PinIterator
- func (s *Storage) IterateSchema(ctx context.Context, typs ...string) storage.SchemaIterator
- func (s *Storage) ReindexSchema(ctx context.Context, force bool) error
- func (s *Storage) SetPin(ctx context.Context, name string, ref types.Ref) error
- func (s *Storage) StatBlob(ctx context.Context, ref types.Ref) (uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveRef ¶
SaveRef stores the ref into file's metadata. Additionally, it will write the size and mtime to know if ref is still valid.
func SaveRefFile ¶
SaveRefFile stores the ref into file's metadata. Additionally, it will write the size and mtime to know if ref is still valid.
Types ¶
type Config ¶
type Config struct {
Dir string `json:"dir"`
}
func (*Config) OpenStorage ¶
func (*Config) References ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func (*Storage) FetchSchema ¶
func (*Storage) ImportFile ¶
func (*Storage) IteratePins ¶
func (s *Storage) IteratePins(ctx context.Context) storage.PinIterator
func (*Storage) IterateSchema ¶
func (*Storage) ReindexSchema ¶
Click to show internal directories.
Click to hide internal directories.