feat: add auth support for downloading OCI artifacts (#3915)

This commit is contained in:
Teppei Fukuda
2023-03-30 05:53:24 +03:00
committed by GitHub
parent 1ee05189f0
commit f14bed4532
22 changed files with 286 additions and 221 deletions

View File

@@ -35,7 +35,7 @@ func Run(ctx context.Context, opts flag.Options) (err error) {
// download the database file
if err = operation.DownloadDB(opts.AppVersion, opts.CacheDir, opts.DBRepository,
true, opts.Insecure, opts.SkipDBUpdate); err != nil {
true, opts.SkipDBUpdate, opts.Remote()); err != nil {
return err
}
@@ -57,6 +57,7 @@ func Run(ctx context.Context, opts flag.Options) (err error) {
}
m.Register()
server := rpcServer.NewServer(opts.AppVersion, opts.Listen, opts.CacheDir, opts.Token, opts.TokenHeader, opts.DBRepository)
return server.ListenAndServe(cache, opts.Insecure, opts.SkipDBUpdate)
server := rpcServer.NewServer(opts.AppVersion, opts.Listen, opts.CacheDir, opts.Token, opts.TokenHeader,
opts.DBRepository, opts.Remote())
return server.ListenAndServe(cache, opts.SkipDBUpdate)
}