gcs

package
v1.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package gcs handles publishing to Google Cloud Storage.

Index

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 (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 (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
func (g *PublishedStorage) SymLink(src string, dst string) error

SymLink creates a copy of src file and stores link information in metadata.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL