image.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. Copyright 2019 The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // Package image provides struct definitions and libraries
  14. // for image overwriting of names, tags and digest.
  15. package image
  16. // Image contains an image name, a new name, a new tag or digest,
  17. // which will replace the original name and tag.
  18. type Image struct {
  19. // Name is a tag-less image name.
  20. Name string `json:"name,omitempty" yaml:"name,omitempty"`
  21. // NewName is the value used to replace the original name.
  22. NewName string `json:"newName,omitempty" yaml:"newName,omitempty"`
  23. // NewTag is the value used to replace the original tag.
  24. NewTag string `json:"newTag,omitempty" yaml:"newTag,omitempty"`
  25. // Digest is the value used to replace the original image tag.
  26. // If digest is present NewTag value is ignored.
  27. Digest string `json:"digest,omitempty" yaml:"digest,omitempty"`
  28. }