Documentation
¶
Index ¶
- func CheckDirectoryEqual(d1, d2 string) error
- func CheckLayer(ls layer.Store, layerID layer.ChainID, layerFuncs ...LayerInit) error
- func CheckLayerDiff(expected []byte, layer layer.Layer) error
- func CheckMetadata(metadata, expectedMetadata []layer.Metadata) error
- func CheckSameLayer(l1, l2 layer.Layer) error
- func CreateLayer(ls layer.Store, parent layer.ChainID, layerFunc LayerInit) (l layer.Layer, err error)
- func CreateLayerChain(ls layer.Store, layerFuncs ...LayerInit) (l layer.Layer, err error)
- func CreateMetadata(layers ...layer.Layer) ([]layer.Metadata, error)
- func TarFromFiles(files ...ApplyFile) ([]byte, error)
- type ApplyFile
- type LayerInit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDirectoryEqual ¶
CheckDirectoryEqual compares two directory paths to make sure that the content of the directories is the same.
func CheckLayer ¶
CheckLayer checks that the provider layer directory content exactly matches a directory created using the provided layer initializers.
func CheckLayerDiff ¶
CheckLayerDiff checks that the diff stream for the provided layer exactly matches the provided byte array.
func CheckMetadata ¶
CheckMetadata checks that 2 metadata arrays are equal
func CheckSameLayer ¶
CheckSameLayer checks whether the 2 provides layers are same. The layers must have the exact same digests, size, and parents.
func CreateLayer ¶
func CreateLayer(ls layer.Store, parent layer.ChainID, layerFunc LayerInit) (l layer.Layer, err error)
CreateLayer creates a new layer in the layer store using the given layer initialize function on top of the given parent.
func CreateLayerChain ¶
CreateLayerChain creates a new chain of layers in the given layer store using the provided layer initializers and returns the topmost layer.
func CreateMetadata ¶
CreateMetadata creates a metadata array from the provided layers in a manner that would be returned from the layer store on removal.
func TarFromFiles ¶
TarFromFiles returns an uncompressed tar byte array created from using the provided file appliers.
Types ¶
type ApplyFile ¶
ApplyFile applies single file changes
func CreateDirectory ¶
CreateDirectory returns a file applier to create the directory with the provided name and permission
func NewTestFile ¶
NewTestFile returns a file applier which creates a file as the provided name with the given content and permission.
func RemoveFile ¶
RemoveFile returns a file applier which removes the provided file name