Documentation ¶
Overview ¶
Package fsrepo is a file-system implementation of repo
Index ¶
- func Filepath(rf File) string
- func NewRepo(path string, fsys *muxfs.Mux, book *logbook.Book, cache *dscache.Dscache, ...) (repo.Repo, error)
- type File
- type Refstore
- func (rs Refstore) DeleteRef(del reporef.DatasetRef) error
- func (rs Refstore) GetRef(get reporef.DatasetRef) (reporef.DatasetRef, error)
- func (rs Refstore) PutRef(r reporef.DatasetRef) (err error)
- func (rs Refstore) RefCount() (int, error)
- func (rs Refstore) References(offset, limit int) ([]reporef.DatasetRef, error)
- type Repo
- func (r *Repo) Bus() event.Bus
- func (r *Repo) Destroy() error
- func (r *Repo) Done() <-chan struct{}
- func (r *Repo) DoneErr() error
- func (r *Repo) Dscache() *dscache.Dscache
- func (r *Repo) Filesystem() *muxfs.Mux
- func (r *Repo) Logbook() *logbook.Book
- func (r *Repo) Path() string
- func (r *Repo) Profiles() profile.Store
- func (r *Repo) ResolveRef(ctx context.Context, ref *dsref.Ref) (string, error)
- func (r *Repo) SetFilesystem(fs *muxfs.Mux)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File int
File represents a type file in a qri repository
const ( // FileUnknown makes the default file value invalid FileUnknown File = iota // FileLockfile is the on-disk mutex lock FileLockfile // FileInfo stores information about this repository // like version number, size of repo, etc. FileInfo // FileConfig holds configuration specific to this repo FileConfig // FileDatasets holds the list of datasets FileDatasets // FileEventLogs is a log of all queries in order they're run FileEventLogs // FileJSONRefs is a file for the user's local namespace // No longer in use FileJSONRefs // FileDscache is a flatbuffer file of this repo's dataset cache FileDscache // FileRefs is a flatbuffer file of this repo's dataset references FileRefs // FilePeers holds peer repositories // Ideally this won't stick around for long FilePeers // FileAnalytics holds analytics data FileAnalytics // FileSearchIndex is the path to a search index FileSearchIndex // FileSelectedRefs is the path to the current ref selection FileSelectedRefs // FileChangeRequests is a file of change requests FileChangeRequests )
type Refstore ¶ added in v0.1.1
type Refstore struct {
// contains filtered or unexported fields
}
Refstore is a file-based implementation of the Refstore interface. It stores names in a json file
func (Refstore) DeleteRef ¶ added in v0.1.1
func (rs Refstore) DeleteRef(del reporef.DatasetRef) error
DeleteRef removes a name from the store
func (Refstore) GetRef ¶ added in v0.1.1
func (rs Refstore) GetRef(get reporef.DatasetRef) (reporef.DatasetRef, error)
GetRef completes a partially-known reference
func (Refstore) PutRef ¶ added in v0.1.1
func (rs Refstore) PutRef(r reporef.DatasetRef) (err error)
PutRef adds a reference to the store
func (Refstore) References ¶ added in v0.1.1
func (rs Refstore) References(offset, limit int) ([]reporef.DatasetRef, error)
References gives a set of dataset references from the store
type Repo ¶
Repo is a filesystem-based implementation of the Repo interface
func (*Repo) Done ¶ added in v0.9.9
func (r *Repo) Done() <-chan struct{}
Done returns a channel that the repo will send on when the repo is finished closing
func (*Repo) DoneErr ¶ added in v0.9.9
DoneErr gives an error that occurred during the shutdown process
func (*Repo) Filesystem ¶ added in v0.7.0
Filesystem returns this repo's Filesystem
func (*Repo) Logbook ¶ added in v0.9.1
Logbook stores operation logs for coordinating state across peers
func (*Repo) ResolveRef ¶ added in v0.9.9
ResolveRef implements the dsref.RefResolver interface
func (*Repo) SetFilesystem ¶ added in v0.8.0
SetFilesystem implements QFSSetter, currently used during lib contstruction