{"id":25613549,"url":"https://github.com/sajjon/makros","last_synced_at":"2025-08-31T19:34:58.871Z","repository":{"id":174132961,"uuid":"651799829","full_name":"Sajjon/Makros","owner":"Sajjon","description":"Collection of Swift Macros","archived":false,"fork":false,"pushed_at":"2023-06-12T10:03:55.000Z","size":28,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-17T18:06:53.629Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Sajjon.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-10T06:10:44.000Z","updated_at":"2023-06-26T14:13:31.000Z","dependencies_parsed_at":"2023-07-06T14:16:23.046Z","dependency_job_id":null,"html_url":"https://github.com/Sajjon/Makros","commit_stats":null,"previous_names":["sajjon/makros"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sajjon/Makros","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sajjon%2FMakros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sajjon%2FMakros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sajjon%2FMakros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sajjon%2FMakros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sajjon","download_url":"https://codeload.github.com/Sajjon/Makros/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sajjon%2FMakros/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273032315,"owners_count":25034064,"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-08-31T02:00:09.071Z","response_time":79,"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-02-22T01:36:05.403Z","updated_at":"2025-08-31T19:34:58.856Z","avatar_url":"https://github.com/Sajjon.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@DataStorage`\n\nMakes it easy to work with `Data`.\n\n## No args\n```swift\n@DataStorage\nstruct DataHolder {}\n```\n\nExpands to:\n```swift\nstruct DataHolder {\n\tlet data: Data\n\t\n\tinit(data: Data) {\n\t\tself.data = data\n\t}\n}\n```\n\n## `byteCount`\n\n```swift\n@DataStorage(named: \"key\", byteCount: 32)\npublic struct PublicKey {}\n```\n\nExpands to:\n\n```swift\npublic struct PublicKey {\n\tpublic static let byteCount = 32\n\tpublic let key: Data\n\t\n\tpublic init(key: Data) throws {\n\t\tguard key.count == Self.byteCount else {\n\t\t\tthrow InvalidByteCount(actual: key.count)\n\t\t}\n\t\tself.key = key\n\t}\n}\n\nextension PubliKey {\n\tstruct InvalidByteCount: Swift.Error, CustomStringConvertible {\n\t\tlet actual: Int\n\t\tvar description: String {\n\t\t\t\"Invalid byteCount, expected: \\(PublicKey.byteCount), but got: \\(actual)\"\n\t\t}\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajjon%2Fmakros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsajjon%2Fmakros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajjon%2Fmakros/lists"}