shell

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPClient

func NewHTTPClient() *http.Client

func NewSwitchArchiveWriter

func NewSwitchArchiveWriter(writer io.Writer) contracts.ArchiveWriter

func NewZipArchiveReader added in v0.12.0

func NewZipArchiveReader(reader io.Reader) io.ReadCloser

func NewZipArchiveWriter

func NewZipArchiveWriter(writer io.Writer, level int) contracts.ArchiveWriter

Types

type DiskFileSystem

type DiskFileSystem struct {
	// contains filtered or unexported fields
}

func NewDiskFileSystem

func NewDiskFileSystem(root string) *DiskFileSystem

func (*DiskFileSystem) Chmod

func (this *DiskFileSystem) Chmod(name string, mode os.FileMode) error

func (*DiskFileSystem) Create

func (this *DiskFileSystem) Create(path string) io.WriteCloser
func (this *DiskFileSystem) CreateSymlink(source, target string)

func (*DiskFileSystem) Delete

func (this *DiskFileSystem) Delete(path string)

func (*DiskFileSystem) Listing

func (this *DiskFileSystem) Listing() (listing []contracts.FileInfo)

func (*DiskFileSystem) Open

func (this *DiskFileSystem) Open(path string) io.ReadCloser

func (*DiskFileSystem) ReadFile

func (this *DiskFileSystem) ReadFile(path string) ([]byte, error)

func (*DiskFileSystem) RootPath

func (this *DiskFileSystem) RootPath() string

func (*DiskFileSystem) Stat

func (this *DiskFileSystem) Stat(path string) (contracts.FileInfo, error)

func (*DiskFileSystem) WriteFile

func (this *DiskFileSystem) WriteFile(path string, content []byte)

type Environment

type Environment struct{}

func NewEnvironment

func NewEnvironment() *Environment

func (*Environment) LookupEnv

func (this *Environment) LookupEnv(key string) (value string, set bool)

type FileInfo

type FileInfo struct {
	// contains filtered or unexported fields
}

func (FileInfo) ModTime

func (this FileInfo) ModTime() time.Time

func (FileInfo) Mode

func (this FileInfo) Mode() os.FileMode

func (FileInfo) Path

func (this FileInfo) Path() string

func (FileInfo) Size

func (this FileInfo) Size() int64
func (this FileInfo) Symlink() string

type GoogleCloudStorageClient

type GoogleCloudStorageClient struct {
	// contains filtered or unexported fields
}

func NewGoogleCloudStorageClient

func NewGoogleCloudStorageClient(client *http.Client, credentials gcs.Credentials, expectedStatus []int) *GoogleCloudStorageClient

func (*GoogleCloudStorageClient) Download

func (this *GoogleCloudStorageClient) Download(request url.URL) (io.ReadCloser, error)

func (*GoogleCloudStorageClient) Seek added in v0.12.0

func (this *GoogleCloudStorageClient) Seek(request url.URL, start, end int64) (io.ReadCloser, error)

func (*GoogleCloudStorageClient) Size added in v0.12.0

func (this *GoogleCloudStorageClient) Size(request url.URL) (int64, error)

Size uses an HTTP HEAD to find out how many bytes are available in total.

func (*GoogleCloudStorageClient) Upload

func (this *GoogleCloudStorageClient) Upload(request contracts.UploadRequest) error

type TarArchiveWriter

type TarArchiveWriter struct {
	*tar.Writer
}

func NewTarArchiveWriter

func NewTarArchiveWriter(writer io.Writer) *TarArchiveWriter

func (*TarArchiveWriter) WriteHeader

func (this *TarArchiveWriter) WriteHeader(header contracts.ArchiveHeader)

type ZipArchiveReader added in v0.12.0

type ZipArchiveReader struct {
	// contains filtered or unexported fields
}

func (*ZipArchiveReader) Close added in v0.12.0

func (this *ZipArchiveReader) Close() error

func (*ZipArchiveReader) Next added in v0.12.0

func (this *ZipArchiveReader) Next() (*tar.Header, error)

func (*ZipArchiveReader) Read added in v0.12.0

func (this *ZipArchiveReader) Read(p []byte) (n int, err error)

func (*ZipArchiveReader) ReadAt added in v0.12.0

func (this *ZipArchiveReader) ReadAt(p []byte, off int64) (n int, err error)

func (*ZipArchiveReader) SetDownloader added in v0.12.0

func (this *ZipArchiveReader) SetDownloader(request url.URL, downloader contracts.Downloader)

type ZipArchiveWriter

type ZipArchiveWriter struct {
	// contains filtered or unexported fields
}

func (*ZipArchiveWriter) Close

func (this *ZipArchiveWriter) Close() (err error)

func (*ZipArchiveWriter) Write

func (this *ZipArchiveWriter) Write(buffer []byte) (int, error)

func (*ZipArchiveWriter) WriteHeader

func (this *ZipArchiveWriter) WriteHeader(header contracts.ArchiveHeader)

Jump to

Keyboard shortcuts

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