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

File fetcher #20

Closed
wants to merge 7 commits into from
Closed

File fetcher #20

wants to merge 7 commits into from

Conversation

OneFlyingBanana
Copy link
Collaborator

Reworked main/UI to ask for single input that is automatically categorised as URL or filepath.
File is accessed relatively from working directory

Included 2 possible implementations :
- using sync.Map optimised for high concurrency read/writes
- using base map with RWMutex lock/unlock better performing for low-concurrency read/writes
Removed concurrency handling
Added hash map comparison of local + fetched images
Added cli to ask user to choose between remote fetcher and file fetcher
Added barebones files of remote fetcher and file fetcher with test image lists
Modified image list comparison to work via hash map comparison
Setup of skeleton files for file fetcher and http fetcher
Updated user feedback to be more concise
Moved List call in-memory-store to not proc when hashes are equal
Reworked main's user interface to automatically recognise and validate URL or filepath
Reworked http-fetcher to accept  full URLs
Added images.json test file
http-fetcher :
Now using correct Harbor v2 API
Local image list is based on tag list retrieved via API
file-fetcher :
Created JSON struct with name, digest and repository URL
This data, with optional tag name, can be used to make docker pull commands using only url + digest
@OneFlyingBanana
Copy link
Collaborator Author

http-fetcher changes :
Now using demo.goharbor.io's v2 API to :

  1. Retrieve list of tags in repository
  2. Retrieve individual digests for each tag
  3. Store them as key-value pairs

file-fetcher changes :
Created JSON file with name (tag is optional), digest and repository URL as values
Creates docker pull commands to test usability of data
Works by :

  1. Retrieving list of digests from file
  2. Retrieving individual image names and tags (if available) for each digest
  3. Storing them as key-value pairs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant