-
Notifications
You must be signed in to change notification settings - Fork 17
/
builder.go
54 lines (41 loc) · 1.63 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// SPDX-FileCopyrightText: 2022 SAP SE or an SAP affiliate company and Open Component Model contributors.
//
// SPDX-License-Identifier: Apache-2.0
package ocm
import (
"context"
"github.com/open-component-model/ocm/v2/pkg/contexts/credentials"
"github.com/open-component-model/ocm/v2/pkg/contexts/datacontext"
"github.com/open-component-model/ocm/v2/pkg/contexts/oci"
"github.com/open-component-model/ocm/v2/pkg/contexts/ocm/internal"
)
func WithContext(ctx context.Context) internal.Builder {
return internal.Builder{}.WithContext(ctx)
}
func WithCredentials(ctx credentials.Context) internal.Builder {
return internal.Builder{}.WithCredentials(ctx)
}
func WithOCIRepositories(ctx oci.Context) internal.Builder {
return internal.Builder{}.WithOCIRepositories(ctx)
}
func WithRepositoyTypeScheme(scheme RepositoryTypeScheme) internal.Builder {
return internal.Builder{}.WithRepositoyTypeScheme(scheme)
}
func WithRepositoryDelegation(reg RepositoryDelegationRegistry) internal.Builder {
return internal.Builder{}.WithRepositoryDelegation(reg)
}
func WithAccessypeScheme(scheme AccessTypeScheme) internal.Builder {
return internal.Builder{}.WithAccessTypeScheme(scheme)
}
func WithRepositorySpecHandlers(reg RepositorySpecHandlers) internal.Builder {
return internal.Builder{}.WithRepositorySpecHandlers(reg)
}
func WithBlobHandlers(reg BlobHandlerRegistry) internal.Builder {
return internal.Builder{}.WithBlobHandlers(reg)
}
func WithBlobDigesters(reg BlobDigesterRegistry) internal.Builder {
return internal.Builder{}.WithBlobDigesters(reg)
}
func New(mode ...datacontext.BuilderMode) Context {
return internal.Builder{}.New(mode...)
}