types.go 409 B

123456789101112131415161718192021222324252627
  1. package resource
  2. const DefaultTag = "latest"
  3. type Source struct {
  4. Repository string `json:"repository"`
  5. RawTag string `json:"tag"`
  6. Debug bool `json:"debug"`
  7. }
  8. func (s Source) Tag() string {
  9. if s.RawTag == "" {
  10. return DefaultTag
  11. }
  12. return s.RawTag
  13. }
  14. type Version struct {
  15. Digest string `json:"digest"`
  16. }
  17. type MetadataField struct {
  18. Name string `json:"name"`
  19. Value string `json:"value"`
  20. }