Documentation ¶
Index ¶
- Variables
- type Dir
- type ImageEntry
- type ImageHistory
- type ImageHistoryEntry
- type Layer
- type LayerSizes
- type SQLiteBackend
- func (s *SQLiteBackend) Create(imageHistory *ImageHistory) (*ImageHistory, error)
- func (s *SQLiteBackend) Delete(imageHistory *ImageHistory) error
- func (s *SQLiteBackend) DeleteByName(imageName string) error
- func (s *SQLiteBackend) Destroy() error
- func (b *SQLiteBackend) Migrate() error
- func (s *SQLiteBackend) Read(imageName string) ([]ImageHistory, error)
- func (s *SQLiteBackend) ReadAll() ([]ImageEntry, error)
- func (s *SQLiteBackend) ReadById(imageId int64) (*ImageHistory, error)
- func (s *SQLiteBackend) Update(imageHistory *ImageHistory) (*ImageHistory, error)
- type StorageBackend
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNonExistent = errors.New("No such entry found in the database")
)
Functions ¶
This section is empty.
Types ¶
type Dir ¶
type Dir struct { /// The name of this directory. Must not include any `/`. DirName string `json:"dirname"` /// Total size of this directory including all of its subdirectories in bytes TotalSize int64 `json:"total_size"` /// Map of all files in this immediate directory (i.e. not in subdirectories). /// /// Each file is a single entry in the map and the corresponding value is its size in bytes Files map[string]int64 `json:"files"` /// Map of all immediate subdirectories of this directory. Directiories map[string]Dir `json:"directories"` }
/ A structure to store the file sizes of a directory including all subdirectories.
func (*Dir) InsertIntoDir ¶
/ Insert the file with the given path `filePath` into the directory structure starting at `d`. / / Any non-existing directories leading up to `filePath` are created and the file is inserted into the correct spot. / The total size of all directories is adjusted accordingly.
type ImageEntry ¶
type ImageHistory ¶
type ImageHistory struct { ImageEntry /// map of the container hashes and the corresponding entry History map[string]ImageHistoryEntry }
/ The full image history.
type ImageHistoryEntry ¶
type ImageHistoryEntry struct { Tags []string Contents LayerSizes InspectInfo types.ImageInspectInfo // contains filtered or unexported fields }
/ A single entry in the history of an image
type LayerSizes ¶
/ The size tree of all layers of a container image / The key is the hash of each layer, the value is the calculated directory sizes
type SQLiteBackend ¶
type SQLiteBackend struct {
// contains filtered or unexported fields
}
func CreateSQLiteBackend ¶
func CreateSQLiteBackend(dbFileName string) (*SQLiteBackend, error)
func (*SQLiteBackend) Create ¶
func (s *SQLiteBackend) Create(imageHistory *ImageHistory) (*ImageHistory, error)
func (*SQLiteBackend) Delete ¶
func (s *SQLiteBackend) Delete(imageHistory *ImageHistory) error
func (*SQLiteBackend) DeleteByName ¶
func (s *SQLiteBackend) DeleteByName(imageName string) error
func (*SQLiteBackend) Destroy ¶
func (s *SQLiteBackend) Destroy() error
func (*SQLiteBackend) Migrate ¶
func (b *SQLiteBackend) Migrate() error
func (*SQLiteBackend) Read ¶
func (s *SQLiteBackend) Read(imageName string) ([]ImageHistory, error)
func (*SQLiteBackend) ReadAll ¶
func (s *SQLiteBackend) ReadAll() ([]ImageEntry, error)
func (*SQLiteBackend) ReadById ¶
func (s *SQLiteBackend) ReadById(imageId int64) (*ImageHistory, error)
func (*SQLiteBackend) Update ¶
func (s *SQLiteBackend) Update(imageHistory *ImageHistory) (*ImageHistory, error)
type StorageBackend ¶
type StorageBackend interface { Migrate() error Read(imageName string) ([]ImageHistory, error) Create(imageHistory ImageHistory) (*ImageHistory, error) Update(imageHistory *ImageHistory) (*ImageHistory, error) Delete(imageHistory *ImageHistory) error }
Click to show internal directories.
Click to hide internal directories.