github.com/endocode/docker@v1.4.2-0.20160113120958-46eb4700391e/image/rootfs_unix.go (about) 1 // +build !windows 2 3 package image 4 5 import "github.com/docker/docker/layer" 6 7 // RootFS describes images root filesystem 8 // This is currently a placeholder that only supports layers. In the future 9 // this can be made into a interface that supports different implementations. 10 type RootFS struct { 11 Type string `json:"type"` 12 DiffIDs []layer.DiffID `json:"diff_ids,omitempty"` 13 } 14 15 // ChainID returns the ChainID for the top layer in RootFS. 16 func (r *RootFS) ChainID() layer.ChainID { 17 return layer.CreateChainID(r.DiffIDs) 18 } 19 20 // NewRootFS returns empty RootFS struct 21 func NewRootFS() *RootFS { 22 return &RootFS{Type: "layers"} 23 }