mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-19 23:28:20 +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 (
|
||||
"errors"
|
||||
|
||||
"github.com/goharbor/harbor/src/common/utils/log"
|
||||
adp "github.com/goharbor/harbor/src/replication/adapter"
|
||||
"github.com/goharbor/harbor/src/replication/model"
|
||||
@ -39,7 +40,17 @@ func (f *factory) Create(r *model.Registry) (adp.Adapter, error) {
|
||||
|
||||
// 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user