-
Notifications
You must be signed in to change notification settings - Fork 41
/
options.go
40 lines (29 loc) · 962 Bytes
/
options.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
package local
import (
"time"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/buildpacks/imgutil"
)
// FIXME: the following functions are defined in this package for backwards compatibility,
// and should eventually be deprecated.
func FromBaseImage(name string) func(*imgutil.ImageOptions) {
return imgutil.FromBaseImage(name)
}
func WithConfig(c *v1.Config) func(*imgutil.ImageOptions) {
return imgutil.WithConfig(c)
}
func WithCreatedAt(t time.Time) func(*imgutil.ImageOptions) {
return imgutil.WithCreatedAt(t)
}
func WithDefaultPlatform(p imgutil.Platform) func(*imgutil.ImageOptions) {
return imgutil.WithDefaultPlatform(p)
}
func WithHistory() func(*imgutil.ImageOptions) {
return imgutil.WithHistory()
}
func WithMediaTypes(m imgutil.MediaTypes) func(*imgutil.ImageOptions) {
return imgutil.WithMediaTypes(m)
}
func WithPreviousImage(name string) func(*imgutil.ImageOptions) {
return imgutil.WithPreviousImage(name)
}