{"id":27134770,"url":"https://github.com/mideo/service-locator-example","last_synced_at":"2025-10-08T02:54:12.055Z","repository":{"id":210197243,"uuid":"725971664","full_name":"MideO/service-locator-example","owner":"MideO","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-08T21:00:15.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T00:59:04.516Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MideO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-12-01T09:02:00.000Z","updated_at":"2024-05-08T21:00:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e585cf3-832b-4f18-8646-5ca3d1b10739","html_url":"https://github.com/MideO/service-locator-example","commit_stats":null,"previous_names":["mideo/service-locator-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MideO/service-locator-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MideO%2Fservice-locator-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MideO%2Fservice-locator-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MideO%2Fservice-locator-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MideO%2Fservice-locator-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MideO","download_url":"https://codeload.github.com/MideO/service-locator-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MideO%2Fservice-locator-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278881824,"owners_count":26062176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-04-08T00:59:12.464Z","updated_at":"2025-10-08T02:54:12.026Z","avatar_url":"https://github.com/MideO.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"A simple service locator pattern with all defined services detected via reflection\n\n# Usage:\nSee [Main.scala](src%2Fmain%2Fscala%2FMain.scala)\n\n```scala \n// Define an abstract service\n\nabstract class Service {\n  def run(string: String): String\n}\n\n// Implement the service \npackage com.github.mideo.example\n\nclass TestService extends Service {\n  override def run(string: String): String = s\"test $string\"\n}\n\n// Create a locator see implementation in src/main/scala/com/github/mideo/example/ServiceLocator.scala \nval locator = new ServiceLocator[Service](\"com.github.mideo.example\")\n\n// execute\nlocator.get(\"test\").run(\"test\") should be(\"test test\")\n\n// execute with dsl\nimplicit val locator = new ServiceLocator[Service](\"com.github.mideo.example\")\nimport com.github.mideo.example.ServiceLocator.ServiceLocatorSyntax._\n\n\"test\".service.run(\"test\") should be(\"test test\")\n\n\n//NB:  All new implementations of Service will be registered on initialisation of the ServiceLocator \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmideo%2Fservice-locator-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmideo%2Fservice-locator-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmideo%2Fservice-locator-example/lists"}