mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-20 15:48:26 +01:00
Add adapter pattern for helm hub adapter
Add adapter pattern for helm hub adapter Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
parent
06e4e124d8
commit
81e7b3b8ea
@ -16,6 +16,7 @@ package helmhub
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/goharbor/harbor/src/common/utils/log"
|
"github.com/goharbor/harbor/src/common/utils/log"
|
||||||
adp "github.com/goharbor/harbor/src/replication/adapter"
|
adp "github.com/goharbor/harbor/src/replication/adapter"
|
||||||
"github.com/goharbor/harbor/src/replication/model"
|
"github.com/goharbor/harbor/src/replication/model"
|
||||||
@ -39,7 +40,17 @@ func (f *factory) Create(r *model.Registry) (adp.Adapter, error) {
|
|||||||
|
|
||||||
// AdapterPattern ...
|
// AdapterPattern ...
|
||||||
func (f *factory) AdapterPattern() *model.AdapterPattern {
|
func (f *factory) AdapterPattern() *model.AdapterPattern {
|
||||||
return nil
|
return &model.AdapterPattern{
|
||||||
|
EndpointPattern: &model.EndpointPattern{
|
||||||
|
EndpointType: model.EndpointPatternTypeFix,
|
||||||
|
Endpoints: []*model.Endpoint{
|
||||||
|
{
|
||||||
|
Key: "hub.helm.sh",
|
||||||
|
Value: "https://hub.helm.sh",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type adapter struct {
|
type adapter struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user