{"id":28194245,"url":"https://github.com/monkey-projects/oci-common","last_synced_at":"2026-02-17T23:35:55.395Z","repository":{"id":197178919,"uuid":"698121941","full_name":"monkey-projects/oci-common","owner":"monkey-projects","description":"Common functionality for the other oci libs","archived":false,"fork":false,"pushed_at":"2025-10-03T08:32:24.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-18T06:01:47.426Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monkey-projects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-29T07:52:55.000Z","updated_at":"2025-10-03T08:32:28.000Z","dependencies_parsed_at":"2023-09-29T11:20:00.897Z","dependency_job_id":"8f7cfe8d-d560-47f8-849e-1da4cd712e39","html_url":"https://github.com/monkey-projects/oci-common","commit_stats":null,"previous_names":["monkey-projects/oci-common"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/monkey-projects/oci-common","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkey-projects%2Foci-common","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkey-projects%2Foci-common/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkey-projects%2Foci-common/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkey-projects%2Foci-common/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monkey-projects","download_url":"https://codeload.github.com/monkey-projects/oci-common/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkey-projects%2Foci-common/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29562379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-16T13:11:42.192Z","updated_at":"2026-02-17T23:35:50.382Z","avatar_url":"https://github.com/monkey-projects.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OCI Common functionality lib\n\nThis is a Clojure library that is used by the other Monkey Projects OCI\nlibs for common functionality.  Usually utility functions but also some\n[Martian](https://github.com/oliyh/martian) stuff too.\n\n[![Clojars Project](https://img.shields.io/clojars/v/com.monkeyprojects/oci-common.svg)](https://clojars.org/com.monkeyprojects/oci-common)\n\n## Usage\n\nNormally you won't need this directly, it's referenced by libs that use it\nas a dependency.  But if you really want to:\n\n```clojure\n# deps.edn\n{:com.monkeyprojects/oci-common {:mvn/version \"latest\"}}\n```\nOr:\n```clojure\n# Leiningen project.clj\n[com.monkeyprojects/oci-common \"latest\"]\n```\n\n## Pagination\n\nMany listing calls on OCI allow for pagination.  By default the page size is 10.\nProcessing a paged response can be tedious, so I've added some functions to help\nwith that.  Suppose you have a function that sends a request that returns a large\nlist of items.  Then you can use the functions in `monkey.oci.common.pagination`\nto help with that:\n\n```clojure\n(require '[monkey.oci.common.pagination :as p])\n\n;; Let's assume you need to fetch a large list using `large-list-call`\n;; then you can process the paged response in a lazy fashion like so\n(def r (p/paginate (p/paged-request large-list-call ctx {})))\n\n;; It will return a lazy seq to the items in the body.\n```\n\nOften, the items in the body are not in the root, but in a map that has an `items`\nkey.  An additional argument can be passed to the `paginate` function to help with\nthat:\n```clojure\n;; This call will return all values in the 'items' key in the response body\n(p/paginate (p/paged-request large-list-call ctx {}) :items)\n```\n\nAs long as the response contains a `opc-next-page` header, and the body items are\nnot empty, it will keep on returning values.\n\n**Please not** that it's important that the route is marked as 'paginate-able' by\nwrapping it using the `paged-route` function.  This will add the `page` and `limit`\nquery parameters to the Martian route, otherwise they will not be passed on to the\nbackend and you may end up with an endless seq, because it will never pass on the\n`page` parameter.\n\n# License\n\nMIT License, see [LICENSE](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkey-projects%2Foci-common","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonkey-projects%2Foci-common","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkey-projects%2Foci-common/lists"}