Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index interface {
Versions(module string) ([]string, error)
Info(coordinates.Module) (repository.RevInfo, error)
Contains(coordinates.Module) (bool, int64, error)
UpdateID(coordinates.SerialModule) error
Mod(coordinates.Module) (string, error) // go.mod file
Remove(coordinates.Module) error
Put(ModuleAddition) error
IDs() (Ranges, error)
Summary() (int, int, error)
}
The Index is used to provide:
- .mod file content
- .info file content
- boolean whether a module@version exists in the store
- list of versions of a given module that exist in the store
- list of version intervals for all modules in the store
The real implementation is an index backed by boltdb, so we get better performance than keeping actual files on disk.
func NewIndex ¶
func NewIndex(options IndexOptions) (Index, error)
type IndexOptions ¶
type ModuleAddition ¶
type ModuleAddition struct {
Mod coordinates.Module
UniqueID int64
ModFile string
}
type Ranges ¶
type Ranges = coordinates.RangeIDs
Ranges is an alias of coordinates.RangeIDs for brevity.
type ZipStore ¶
type ZipStore interface {
PutZip(coordinates.Module, repository.Blob) error
GetZip(coordinates.Module) (repository.Blob, error)
DelZip(coordinates.Module) error
}
Click to show internal directories.
Click to hide internal directories.