Documentation
¶
Overview ¶
Package gitstore stores gomodfs modules in a git repository.
git's storage backend has the nice property that it does de-duping even if your filesystem doesn't. We don't store commits in git-- only trees and blobs. And then refs to trees.
Index ¶
- type Storage
- func (s *Storage) CachedModules(ctx context.Context) ([]store.ModuleVersion, error)
- func (d *Storage) CheckExists() error
- func (s *Storage) GetFile(ctx context.Context, h store.ModHandle, path string) ([]byte, error)
- func (s *Storage) GetInfoFile(ctx context.Context, mv store.ModuleVersion) (_ []byte, err error)
- func (s *Storage) GetModFile(ctx context.Context, mv store.ModuleVersion) (_ []byte, err error)
- func (s *Storage) GetZipHash(ctx context.Context, h store.ModHandle) ([]byte, error)
- func (s *Storage) GetZipRoot(ctx context.Context, mv store.ModuleVersion) (store.ModHandle, error)
- func (s *Storage) PutInfoFile(ctx context.Context, mv store.ModuleVersion, data []byte) (err error)
- func (s *Storage) PutModFile(ctx context.Context, mv store.ModuleVersion, data []byte) (err error)
- func (s *Storage) PutModule(ctx context.Context, mv store.ModuleVersion, data store.PutModuleData) (store.ModHandle, error)
- func (s *Storage) Readdir(ctx context.Context, h store.ModHandle, path string) ([]store.Dirent, error)
- func (s *Storage) Stat(ctx context.Context, h store.ModHandle, modPath string) (fs.FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct { Stats *stats.Stats // or nil if stats are not enabled GitRepo string // contains filtered or unexported fields }
func (*Storage) CachedModules ¶
func (*Storage) CheckExists ¶
CheckExists checks that the git repo named in d.GitRepo actually exists.
func (*Storage) GetInfoFile ¶
func (*Storage) GetModFile ¶
func (*Storage) GetZipHash ¶
func (*Storage) GetZipRoot ¶
func (*Storage) PutInfoFile ¶
func (*Storage) PutModFile ¶
func (*Storage) PutModule ¶
func (s *Storage) PutModule(ctx context.Context, mv store.ModuleVersion, data store.PutModuleData) (store.ModHandle, error)
Click to show internal directories.
Click to hide internal directories.