Documentation
¶
Overview ¶
Package gcs handles publishing to Google Cloud Storage.
Index ¶
- type PublishedStorage
- func (g *PublishedStorage) FileExists(path string) (bool, error)
- func (g *PublishedStorage) Filelist(prefix string) ([]string, error)
- func (g *PublishedStorage) HardLink(src string, dst string) error
- func (g *PublishedStorage) LinkFromPool(publishedPrefix, publishedRelPath, fileName string, ...) error
- func (g *PublishedStorage) MkDir(_ string) error
- func (g *PublishedStorage) PutFile(path string, sourceFilename string) error
- func (g *PublishedStorage) ReadLink(path string) (string, error)
- func (g *PublishedStorage) Remove(path string) error
- func (g *PublishedStorage) RemoveDirs(path string, _ aptly.Progress) error
- func (g *PublishedStorage) RenameFile(oldName, newName string) error
- func (g *PublishedStorage) String() string
- func (g *PublishedStorage) SymLink(src string, dst string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PublishedStorage ¶
type PublishedStorage struct {
// contains filtered or unexported fields
}
PublishedStorage abstracts published files hosted on GCS.
func NewPublishedStorage ¶
func NewPublishedStorage(bucket, prefix, credentialsFile, serviceAccountJSON, project, endpoint, defaultACL, storageClass, encryptionKey string, disableMultiDel, debug bool) (*PublishedStorage, error)
NewPublishedStorage creates a GCS-backed published storage.
func (*PublishedStorage) FileExists ¶
func (g *PublishedStorage) FileExists(path string) (bool, error)
FileExists returns true if path exists.
func (*PublishedStorage) Filelist ¶
func (g *PublishedStorage) Filelist(prefix string) ([]string, error)
Filelist returns list of files under prefix.
func (*PublishedStorage) HardLink ¶
func (g *PublishedStorage) HardLink(src string, dst string) error
HardLink uses symlink functionality as hard links do not exist on object stores.
func (*PublishedStorage) LinkFromPool ¶
func (g *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.
func (*PublishedStorage) MkDir ¶
func (g *PublishedStorage) MkDir(_ string) error
MkDir creates directory recursively under public path.
func (*PublishedStorage) PutFile ¶
func (g *PublishedStorage) PutFile(path string, sourceFilename string) error
PutFile puts file into published storage at specified path.
func (*PublishedStorage) ReadLink ¶
func (g *PublishedStorage) ReadLink(path string) (string, error)
ReadLink returns symbolic link target from metadata.
func (*PublishedStorage) Remove ¶
func (g *PublishedStorage) Remove(path string) error
Remove removes single file under public path.
func (*PublishedStorage) RemoveDirs ¶
func (g *PublishedStorage) RemoveDirs(path string, _ aptly.Progress) error
RemoveDirs removes directory structure under public path.
func (*PublishedStorage) RenameFile ¶
func (g *PublishedStorage) RenameFile(oldName, newName string) error
RenameFile renames (moves) file.
func (*PublishedStorage) String ¶
func (g *PublishedStorage) String() string