artifact

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	RepoSlug    string
	BuildNumber string
	BuildID     string
	JobNumber   string
	JobID       string

	Source string
	Dest   string
	Prefix string
	Perm   s3.ACL

	UploadResult *Result
}

Artifact is the thing that gets uploaded or whatever

func New

func New(prefix, source, dest string, opts *Options) *Artifact

New creates a new *Artifact

func (*Artifact) ContentType

func (a *Artifact) ContentType() string

ContentType makes it easier to find the perfect match

func (*Artifact) FullDest added in v0.7.2

func (a *Artifact) FullDest() string

FullDest calculates the full remote destination path

func (*Artifact) Reader

func (a *Artifact) Reader() (io.Reader, error)

Reader makes an io.Reader out of the filepath

func (*Artifact) Size

func (a *Artifact) Size() (uint64, error)

Size reports the size of the artifact

type Options

type Options struct {
	RepoSlug    string
	BuildNumber string
	BuildID     string
	JobNumber   string
	JobID       string
	Perm        s3.ACL
}

Options encapsulates stuff specific to artifacts. Ugh.

type Result

type Result struct {
	OK  bool
	Err error
}

Result contains some lame simple crap about things done with artifacts

Jump to

Keyboard shortcuts

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