github.com/pachyderm/pachyderm@v1.13.4/src/server/pkg/storage/fileset/api.go (about) 1 package fileset 2 3 import ( 4 "context" 5 "io" 6 7 "github.com/pachyderm/pachyderm/src/server/pkg/storage/fileset/index" 8 ) 9 10 // File represents a file. 11 type File interface { 12 // Index returns the index for the file. 13 Index() *index.Index 14 // Content writes the content of the file. 15 Content(w io.Writer) error 16 } 17 18 var _ File = &MergeFileReader{} 19 var _ File = &FileReader{} 20 21 // FileSet represents a set of files. 22 type FileSet interface { 23 // Iterate iterates over the files in the file set. 24 Iterate(ctx context.Context, cb func(File) error, deletive ...bool) error 25 // TODO: Implement IterateDeletes or pull deletion information out of the fileset API. 26 } 27 28 var _ FileSet = &MergeReader{} 29 var _ FileSet = &Reader{}