artifacts

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service manages job artifacts

func New

func New(db *database.Database, fs filesystem.FS) *Service

New creates an artifacts service

func (*Service) CreateArtifact

func (service *Service) CreateArtifact(jobID uint, filename string, content io.Reader) (*models.Artifact, error)

CreateArtifact creates a new artifact

func (*Service) GetAllArtifactsByJobID

func (service *Service) GetAllArtifactsByJobID(jobID uint) ([]*models.Artifact, error)

GetAllArtifactsByJobID returns all artifacts by job id

func (*Service) GetAllArtifactsByJobIDFilename

func (service *Service) GetAllArtifactsByJobIDFilename(jobID uint, filename string) ([]*models.Artifact, error)

GetAllArtifactsByJobIDFilename returns artifacts matching the job id and file name

func (*Service) GetArtifact

func (service *Service) GetArtifact(id uint) (*models.Artifact, error)

GetArtifact returns an artifact by id

func (*Service) GetArtifactContent

func (service *Service) GetArtifactContent(artifactID uint) (io.ReadCloser, error)

GetArtifactContent returns the content of an artifact

Jump to

Keyboard shortcuts

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