From e22c16ca84163636d674fb0935156f466169e1a3 Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 13 Jul 2021 11:49:58 +0100 Subject: internal/pipeline: Reorganise interfaces so that functions only declare what they need We were using Pipeliner as a catch-all, but it's nicer if the functions can just state that e.g. they need download functionality, so decompose things so that that's how we do things now. --- internal/pipeline/put.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/pipeline/put.go') diff --git a/internal/pipeline/put.go b/internal/pipeline/put.go index 87e4c99..647b7a9 100644 --- a/internal/pipeline/put.go +++ b/internal/pipeline/put.go @@ -59,7 +59,7 @@ func CheckImages(dir string) error { return nil } -func DetectQueueType(dir string, conn Pipeliner) string { +func DetectQueueType(dir string, conn Queuer) string { // Auto detect type of queue to send to based on file extension pngdirs, _ := filepath.Glob(dir + "/*.png") jpgdirs, _ := filepath.Glob(dir + "/*.jpg") @@ -72,7 +72,7 @@ func DetectQueueType(dir string, conn Pipeliner) string { } } -func UploadImages(dir string, bookname string, conn Pipeliner) error { +func UploadImages(dir string, bookname string, conn Uploader) error { walker := make(fileWalk) go func() { _ = filepath.Walk(dir, walker.Walk) -- cgit v1.2.1-24-ge1ad