Documentation
¶
Index ¶
- type AdditionalChunkSorting
- type Archive
- type ArchiveFactoryArgs
- type ArchiveFunc
- type ArchiveImpl
- type ArchiveIndex
- type File
- type FileRelativePathSorting
- type Fingerprinter
- type FingerprinterImpl
- type Resource
- type ResourceImpl
- func (r *ResourceImpl) ArchiveDigest() string
- func (r *ResourceImpl) ArchivePath() string
- func (r *ResourceImpl) Build(devIndex, finalIndex ArchiveIndex) error
- func (r *ResourceImpl) Finalize(finalIndex ArchiveIndex) error
- func (r *ResourceImpl) Fingerprint() string
- func (r *ResourceImpl) Name() string
- func (r *ResourceImpl) RehashWithCalculator(calculator crypto.DigestCalculator, ...) (Resource, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalChunkSorting ¶
type AdditionalChunkSorting []string
type Archive ¶
type Archive interface {
Fingerprint() (string, error)
Build(expectedFp string) (string, string, error)
}
type ArchiveFactoryArgs ¶
type ArchiveFactoryArgs struct {
Files []File
PrepFiles []File
Chunks []string
FollowSymlinks bool
}
type ArchiveFunc ¶
type ArchiveFunc func(args ArchiveFactoryArgs) Archive
type ArchiveImpl ¶
type ArchiveImpl struct {
// contains filtered or unexported fields
}
func NewArchiveImpl ¶
func NewArchiveImpl(
args ArchiveFactoryArgs,
releaseDirPath string,
fingerprinter Fingerprinter,
compressor boshcmd.Compressor,
digestCalculator bicrypto.DigestCalculator,
cmdRunner boshsys.CmdRunner,
fs boshsys.FileSystem,
) ArchiveImpl
func (ArchiveImpl) Fingerprint ¶
func (a ArchiveImpl) Fingerprint() (string, error)
type ArchiveIndex ¶
type ArchiveIndex interface {
Find(name, fingerprint string) (string, string, error)
Add(name, fingerprint, path, sha1 string) (string, string, error)
}
type File ¶
type File struct {
Path string
DirPath string
RelativePath string
// Fingerprinting options
UseBasename bool
ExcludeMode bool
}
func NewFileUsesBasename ¶
func NewFileUsesBasename(path, dirPath string) File
func (File) WithNewDir ¶
func (f File) WithNewDir(dirPath string) File
type FileRelativePathSorting ¶
type FileRelativePathSorting []File
type Fingerprinter ¶
type Fingerprinter interface {
Calculate([]File, []string) (string, error)
}
type FingerprinterImpl ¶
type FingerprinterImpl struct {
// contains filtered or unexported fields
}
func NewFingerprinterImpl ¶
func NewFingerprinterImpl(digestCalculator bicrypto.DigestCalculator, fs boshsys.FileSystem, followSymlinks bool) FingerprinterImpl
type Resource ¶
type Resource interface {
Name() string
Fingerprint() string
ArchivePath() string
ArchiveDigest() string
Build(dev, final ArchiveIndex) error
Finalize(final ArchiveIndex) error
RehashWithCalculator(calculator crypto.DigestCalculator, archiveFilePathReader crypto2.ArchiveDigestFilePathReader) (Resource, error)
}
type ResourceImpl ¶
type ResourceImpl struct {
// contains filtered or unexported fields
}
func NewExistingResource ¶
func NewExistingResource(name, fp, sha1 string) *ResourceImpl
func NewResource ¶
func NewResource(name, fp string, archive Archive) *ResourceImpl
func NewResourceWithBuiltArchive ¶
func NewResourceWithBuiltArchive(name, fp, path, sha1 string) *ResourceImpl
func (*ResourceImpl) ArchiveDigest ¶
func (r *ResourceImpl) ArchiveDigest() string
func (*ResourceImpl) ArchivePath ¶
func (r *ResourceImpl) ArchivePath() string
func (*ResourceImpl) Fingerprint ¶
func (r *ResourceImpl) Fingerprint() string
func (*ResourceImpl) RehashWithCalculator ¶
func (r *ResourceImpl) RehashWithCalculator(calculator crypto.DigestCalculator, archiveFilePathReader crypto2.ArchiveDigestFilePathReader) (Resource, error)
Click to show internal directories.
Click to hide internal directories.