-
Notifications
You must be signed in to change notification settings - Fork 239
/
types.go
62 lines (48 loc) · 1.01 KB
/
types.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
55
56
57
58
59
60
61
62
package composite
import (
"encoding/json"
"io"
"net/http"
"github.com/operator-framework/operator-registry/pkg/image"
)
type TemplateDefinition struct {
Schema string
Config json.RawMessage
}
type BasicConfig struct {
Input string
Output string
}
type SemverConfig struct {
Input string
Output string
}
type RawConfig struct {
Input string
Output string
}
type CustomConfig struct {
Command string
Args []string
Output string
}
type BuilderMap map[string]Builder
type CatalogBuilderMap map[string]BuilderMap
type builderFunc func(BuilderConfig) Builder
type Template struct {
catalogFile io.Reader
contributionFile io.Reader
contributionPath string
validate bool
outputType string
registry image.Registry
registeredBuilders map[string]builderFunc
}
type TemplateOption func(t *Template)
type Specs struct {
CatalogSpec *CatalogConfig
ContributionSpec *CompositeConfig
}
type HttpGetter interface {
Get(url string) (*http.Response, error)
}