{"id":27399879,"url":"https://github.com/tattn/diattribute","last_synced_at":"2025-04-14T03:24:23.351Z","repository":{"id":63921116,"uuid":"192072231","full_name":"tattn/DIAttribute","owner":"tattn","description":"Introduce dependency injection attribute (@Inject)","archived":false,"fork":false,"pushed_at":"2019-07-03T16:50:02.000Z","size":6,"stargazers_count":44,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-05T05:01:38.910Z","etag":null,"topics":["dependency-injection","ios","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/tattn.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}},"created_at":"2019-06-15T11:44:35.000Z","updated_at":"2024-03-04T04:10:36.000Z","dependencies_parsed_at":"2023-01-14T14:15:15.734Z","dependency_job_id":null,"html_url":"https://github.com/tattn/DIAttribute","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattn%2FDIAttribute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattn%2FDIAttribute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattn%2FDIAttribute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tattn%2FDIAttribute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tattn","download_url":"https://codeload.github.com/tattn/DIAttribute/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248814401,"owners_count":21165761,"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","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":["dependency-injection","ios","swift"],"created_at":"2025-04-14T03:24:22.721Z","updated_at":"2025-04-14T03:24:23.338Z","avatar_url":"https://github.com/tattn.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"DIAttribute\n===\n\n[WIP] DIAttribute introduces dependency injection attribute.\n\n# Installation\n\nYou can install this framework with Swift Package Manager in Xcode 11.\n\n# Feature\n\n## Inject protocol values\n\n```swift\nfinal class ViewController: UIViewController {\n    @Inject(Self.self) var apiClient: APIClientProtocol\n    \n    ...\n}\n\n// Production\nDIResolver.register(ViewController.self, keyPath: \\.apiClient, value: ProductionAPIClient())\n\n// Test\nDIResolver.register(ViewController.self, keyPath: \\.apiClient, value: MockAPIClient())\n```\n\n## Inject multiple values\n\n```swift\nstruct Environment {\n    @Inject(Self.self) var endpoint: URL\n    @Inject(Self.self) var timeZone: TimeZone\n}\n\nDIResolver.register(Environment.self) {\n    Register(URL.self, URL(string: \"https://example.com\")!)\n    Register(TimeZone.self, TimeZone(identifier: \"Asia/Tokyo\")!)\n}\n```\n\n# License\nDIAttribute is released under the MIT license. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftattn%2Fdiattribute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftattn%2Fdiattribute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftattn%2Fdiattribute/lists"}