2017-07-20 19:39:44 +00:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
2017-07-30 11:12:46 +00:00
|
|
|
"fmt"
|
|
|
|
|
2017-11-01 18:25:28 +00:00
|
|
|
"github.com/keel-hq/keel/util/image"
|
2017-07-20 19:39:44 +00:00
|
|
|
)
|
|
|
|
|
2017-08-08 20:47:29 +00:00
|
|
|
// Credentials - registry credentials
|
2017-07-28 21:55:02 +00:00
|
|
|
type Credentials struct {
|
|
|
|
Username, Password string
|
|
|
|
}
|
|
|
|
|
2017-08-08 20:47:29 +00:00
|
|
|
// TrackedImage - tracked image data+metadata
|
2017-07-20 19:39:44 +00:00
|
|
|
type TrackedImage struct {
|
|
|
|
Image *image.Reference
|
|
|
|
Trigger TriggerType
|
|
|
|
PollSchedule string
|
|
|
|
Provider string
|
2017-07-28 21:55:02 +00:00
|
|
|
Namespace string
|
|
|
|
Secrets []string
|
2017-07-31 22:50:05 +00:00
|
|
|
Meta map[string]string // metadata supplied by providers
|
2017-07-20 19:39:44 +00:00
|
|
|
}
|
2017-07-30 11:12:46 +00:00
|
|
|
|
|
|
|
func (i TrackedImage) String() string {
|
|
|
|
return fmt.Sprintf("namespace:%s,image:%s,provider:%s,trigger:%s,sched:%s,secrets:%s", i.Namespace, i.Image.Repository(), i.Provider, i.Trigger, i.PollSchedule, i.Secrets)
|
|
|
|
}
|