github.com/jenkins-x/jx/v2@v2.1.155/pkg/collector/interface.go (about)

     1  package collector
     2  
     3  import (
     4  	"io"
     5  )
     6  
     7  // Collector an interface to collect data for storage in git or cloud storage etc
     8  type Collector interface {
     9  
    10  	// CollectFiles collects the given file paths and collects them into the storage
    11  	// relative to the given output path. Returns the list of URLs to access the files
    12  	CollectFiles(patterns []string, outputPath string, basedir string) ([]string, error)
    13  
    14  	// CollectData collects the data storing it at the given output path and returning the URL
    15  	// to access it
    16  	CollectData(data io.Reader, outputPath string) (string, error)
    17  }