Documentation
¶
Index ¶
- type PackagePool
- func (pool *PackagePool) FilepathList(progress aptly.Progress) ([]string, error)
- func (pool *PackagePool) Import(srcPath, basename string, checksums *utils.ChecksumInfo, _ bool, ...) (string, error)
- func (pool *PackagePool) LegacyPath(_ string, _ *utils.ChecksumInfo) (string, error)
- func (pool *PackagePool) Open(path string) (aptly.ReadSeekerCloser, error)
- func (pool *PackagePool) Remove(path string) (int64, error)
- func (pool *PackagePool) Size(path string) (int64, error)
- func (pool *PackagePool) String() string
- func (pool *PackagePool) Verify(poolPath, basename string, checksums *utils.ChecksumInfo, ...) (string, bool, error)
- type PublishedStorage
- func (storage *PublishedStorage) FileExists(path string) (bool, error)
- func (storage *PublishedStorage) Filelist(prefix string) ([]string, error)
- func (storage *PublishedStorage) HardLink(src string, dst string) error
- func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath, fileName string, ...) error
- func (storage *PublishedStorage) MkDir(_ string) error
- func (storage *PublishedStorage) PutFile(path string, sourceFilename string) error
- func (storage *PublishedStorage) ReadLink(path string) (string, error)
- func (storage *PublishedStorage) Remove(path string) error
- func (storage *PublishedStorage) RemoveDirs(path string, _ aptly.Progress) error
- func (storage *PublishedStorage) RenameFile(oldName, newName string) error
- func (storage *PublishedStorage) String() string
- func (storage *PublishedStorage) SymLink(src string, dst string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PackagePool ¶ added in v1.6.0
type PackagePool struct {
// contains filtered or unexported fields
}
func NewPackagePool ¶ added in v1.6.0
func NewPackagePool(accountName, accountKey, container, prefix, endpoint string) (*PackagePool, error)
NewPackagePool creates published storage from Azure storage credentials
func (*PackagePool) FilepathList ¶ added in v1.6.0
func (pool *PackagePool) FilepathList(progress aptly.Progress) ([]string, error)
func (*PackagePool) Import ¶ added in v1.6.0
func (pool *PackagePool) Import(srcPath, basename string, checksums *utils.ChecksumInfo, _ bool, checksumStorage aptly.ChecksumStorage) (string, error)
func (*PackagePool) LegacyPath ¶ added in v1.6.0
func (pool *PackagePool) LegacyPath(_ string, _ *utils.ChecksumInfo) (string, error)
func (*PackagePool) Open ¶ added in v1.6.0
func (pool *PackagePool) Open(path string) (aptly.ReadSeekerCloser, error)
func (*PackagePool) Remove ¶ added in v1.6.0
func (pool *PackagePool) Remove(path string) (int64, error)
func (*PackagePool) Size ¶ added in v1.6.0
func (pool *PackagePool) Size(path string) (int64, error)
func (*PackagePool) String ¶ added in v1.6.0
func (pool *PackagePool) String() string
String returns the storage as string
func (*PackagePool) Verify ¶ added in v1.6.0
func (pool *PackagePool) Verify(poolPath, basename string, checksums *utils.ChecksumInfo, checksumStorage aptly.ChecksumStorage) (string, bool, error)
type PublishedStorage ¶
type PublishedStorage struct {
// contains filtered or unexported fields
}
PublishedStorage abstract file system with published files (actually hosted on Azure)
func NewPublishedStorage ¶
func NewPublishedStorage(accountName, accountKey, container, prefix, endpoint string) (*PublishedStorage, error)
NewPublishedStorage creates published storage from Azure storage credentials
func (*PublishedStorage) FileExists ¶
func (storage *PublishedStorage) FileExists(path string) (bool, error)
FileExists returns true if path exists
func (*PublishedStorage) Filelist ¶
func (storage *PublishedStorage) Filelist(prefix string) ([]string, error)
Filelist returns list of files under prefix
func (*PublishedStorage) HardLink ¶
func (storage *PublishedStorage) HardLink(src string, dst string) error
HardLink using symlink functionality as hard links do not exist
func (*PublishedStorage) LinkFromPool ¶
func (storage *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath, fileName string, sourcePool aptly.PackagePool, sourcePath string, sourceChecksums utils.ChecksumInfo, force bool) error
LinkFromPool links package file from pool to dist's pool location
publishedPrefix is desired prefix for the location in the pool. publishedRelPath is desired location in pool (like pool/component/liba/libav/) sourcePool is instance of aptly.PackagePool sourcePath is filepath to package file in package pool
LinkFromPool returns relative path for the published file to be included in package index
func (*PublishedStorage) MkDir ¶
func (storage *PublishedStorage) MkDir(_ string) error
MkDir creates directory recursively under public path
func (*PublishedStorage) PutFile ¶
func (storage *PublishedStorage) PutFile(path string, sourceFilename string) error
PutFile puts file into published storage at specified path
func (*PublishedStorage) ReadLink ¶
func (storage *PublishedStorage) ReadLink(path string) (string, error)
ReadLink returns the symbolic link pointed to by path. This simply reads text file created with SymLink
func (*PublishedStorage) Remove ¶
func (storage *PublishedStorage) Remove(path string) error
Remove removes single file under public path
func (*PublishedStorage) RemoveDirs ¶
func (storage *PublishedStorage) RemoveDirs(path string, _ aptly.Progress) error
RemoveDirs removes directory structure under public path
func (*PublishedStorage) RenameFile ¶
func (storage *PublishedStorage) RenameFile(oldName, newName string) error
RenameFile renames (moves) file
func (*PublishedStorage) String ¶
func (storage *PublishedStorage) String() string
String returns the storage as string