Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Establish internal/private.ImageDestination #1462

Merged
merged 5 commits into from
Feb 11, 2022
Merged

Commits on Feb 11, 2022

  1. Rename internal/types/types.go to internal/private/private.go

    The goal is to establish a practical/convenient naming for
    internal-only interfaces, now that we are going to start using them
    much more frequently.
    
    Design concerns:
    - Don't duplicate any public package name (to avoid the
      publicTypes/internalTypes names in every single user).
      Rules out "types", "image" (as in "image.Destination").
    - Don't just use "internal", to keep that around for
      very localized private utilities, like oci/internal
    
    "private", as a more or less synonym to "internal", seems
    to work acceptably well: we will have types.ImageDestination
    and private.ImageDestination.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Feb 11, 2022
    Configuration menu
    Copy the full SHA
    98f24f0 View commit details
    Browse the repository at this point in the history
  2. Add interface conformance assertions for the private interfaces

    ... to ensure we don't break anything by refactoring.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Feb 11, 2022
    Configuration menu
    Copy the full SHA
    ac00ae7 View commit details
    Browse the repository at this point in the history
  3. Rename private.ImageDestinationWithOptions to private.ImageDestination

    We now have types.ImageDestination (public) and private.ImageDestination.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Feb 11, 2022
    Configuration menu
    Copy the full SHA
    89468ac View commit details
    Browse the repository at this point in the history
  4. Rename parameter names in internal/private.ImageDestination

    ... purely to be consistent with public types.ImageDestination.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Feb 11, 2022
    Configuration menu
    Copy the full SHA
    554209f View commit details
    Browse the repository at this point in the history
  5. Improve documentation of private.ImageDestination

    Document the API of the methods, not how it differs from
    other methods.
    
    Signed-off-by: Miloslav Trmač <mitr@redhat.com>
    mtrmac committed Feb 11, 2022
    Configuration menu
    Copy the full SHA
    57ff3ff View commit details
    Browse the repository at this point in the history