forked from buildpacks/pack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterfaces.go
29 lines (20 loc) · 855 Bytes
/
interfaces.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
package pack
import (
"context"
"github.com/Masterminds/semver"
"github.com/buildpack/imgutil"
"github.com/buildpack/pack/buildpack"
"github.com/buildpack/pack/lifecycle"
)
//go:generate mockgen -package mocks -destination mocks/image_fetcher.go github.com/buildpack/pack ImageFetcher
type ImageFetcher interface {
Fetch(ctx context.Context, name string, daemon, pull bool) (imgutil.Image, error)
}
//go:generate mockgen -package mocks -destination mocks/buildpack_fetcher.go github.com/buildpack/pack BuildpackFetcher
type BuildpackFetcher interface {
FetchBuildpack(uri string) (buildpack.Buildpack, error)
}
//go:generate mockgen -package mocks -destination mocks/lifecycle_fetcher.go github.com/buildpack/pack LifecycleFetcher
type LifecycleFetcher interface {
Fetch(version *semver.Version, uri string) (lifecycle.Metadata, error)
}