-
Notifications
You must be signed in to change notification settings - Fork 18
/
builder.go
33 lines (25 loc) · 1001 Bytes
/
builder.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors.
//
// SPDX-License-Identifier: Apache-2.0
package credentials
import (
"context"
"github.com/open-component-model/ocm/v2/pkg/contexts/config"
"github.com/open-component-model/ocm/v2/pkg/contexts/credentials/internal"
"github.com/open-component-model/ocm/v2/pkg/contexts/datacontext"
)
func WithContext(ctx context.Context) internal.Builder {
return internal.Builder{}.WithContext(ctx)
}
func WithConfigs(ctx config.Context) internal.Builder {
return internal.Builder{}.WithConfig(ctx)
}
func WithRepositoyTypeScheme(scheme RepositoryTypeScheme) internal.Builder {
return internal.Builder{}.WithRepositoyTypeScheme(scheme)
}
func WithStandardConumerMatchers(matchers internal.IdentityMatcherRegistry) internal.Builder {
return internal.Builder{}.WithStandardConumerMatchers(matchers)
}
func New(mode ...datacontext.BuilderMode) Context {
return internal.Builder{}.New(mode...)
}