build: add build tags to create customizable binaries

This commit is contained in:
Shivam Mishra
2020-10-14 14:47:20 -07:00
parent 17dce7e63b
commit 46beb30fc1
27 changed files with 213 additions and 92 deletions
+23
View File
@@ -0,0 +1,23 @@
// +build minimal
package extensions
import (
"time"
"github.com/anuvu/zot/pkg/log"
"github.com/anuvu/zot/pkg/storage"
"github.com/gorilla/mux"
)
// DownloadTrivyDB ...
func DownloadTrivyDB(dbDir string, log log.Logger, updateInterval time.Duration) error {
return nil
}
func EnableExtension(extension *ExtensionConfig, log log.Logger, rootDir string) {
log.Info().Msg("given zot binary doesn't support any extensions, please build zot full binary for this feature")
}
func SetupRoutes(router *mux.Router, rootDir string, imgStore *storage.ImageStore, log log.Logger) {
}