/
spec.go
35 lines (30 loc) · 980 Bytes
/
spec.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
package releaseversion
import (
"context"
)
const (
// AppOperator defines the name of the app operator in a release.
AppOperator = "app-operator"
// CertOperator defines the name of the certificate operator in a release.
CertOperator = "cert-operator"
)
type Interface interface {
// AppVersion provides the version of each app in a release.
Apps(ctx context.Context, obj interface{}) (map[string]ReleaseApp, error)
// ComponentVersion provides the version of each component in a release.
ComponentVersion(ctx context.Context, obj interface{}) (map[string]ReleaseComponent, error)
}
type ReleaseApp struct {
// Catalog of the app.
Catalog string `json:"catalog"`
// Version of the app.
Version string `json:"version"`
}
type ReleaseComponent struct {
// Catalog of the component.
Catalog string `json:"catalog"`
// Version of the component in the catalog.
Reference string `json:"reference"`
// Version of the component.
Version string `json:"version"`
}