source

package
v0.0.0-...-1eb86f4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package source provides source code management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	// Has returns true if the source storage has a file with a certain name.
	Has(ctx context.Context, filename string) (bool, error)

	// Get returns the given file from storage. The caller is responsible for
	// closing the file when done.
	Get(ctx context.Context, filename string) (io.ReadCloser, error)

	// NewUpload creates a new url that will accept uploads.
	NewUpload(cfg UploadConfig) (*UploadURL, error)
}

Storage provides source code storage.

type TarGZ

type TarGZ struct{}

TarGZ compresses source files to a .tar.gz archive.

func (TarGZ) Compress

func (TarGZ) Compress(w io.Writer, dir string) error

Compress compresses the given files into a tarball that is written into w.

The file paths will be relative to the given directory.

type UploadConfig

type UploadConfig struct {
	Filename      string
	ContentMD5    string
	ContentLength int
}

UploadConfig is the configuration to pass to NewUpload when creating a new upload url.

type UploadURL

type UploadURL struct {
	URL     string
	Headers map[string]string
}

An UploadURL is returned from NewUpload.

Directories

Path Synopsis
Package disk provides source storage that stores files on disk.
Package disk provides source storage that stores files on disk.
Package s3 provides support for AWS S3 as source code storage.
Package s3 provides support for AWS S3 as source code storage.

Jump to

Keyboard shortcuts

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