You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB

  1. /*
  2. Copyright © 2021 Drew Short <warricks@sothr.com>
  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 parser implements the required components for working with image definitions
  14. package parser
  15. // ParseResult is the standard representation for am image declaration
  16. type ParseResult struct {
  17. stages []Stage
  18. }
  19. // Stage is the representation of a stage in the image declaration
  20. type Stage struct {
  21. name string
  22. image string
  23. packages []Package
  24. repositories []Repository
  25. }
  26. // Package is the representation of an installed pinned package defined in an image stage declaration
  27. type Package struct {
  28. name string
  29. version string
  30. }
  31. // Repository is the representation of an added repository defined in a stage declaration
  32. type Repository struct {
  33. path string
  34. }