{"id":16746581,"url":"https://github.com/helightdev/catwalk","last_synced_at":"2025-03-16T02:16:35.008Z","repository":{"id":242051556,"uuid":"808553922","full_name":"helightdev/catwalk","owner":"helightdev","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-12T13:02:20.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T15:09:49.619Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/helightdev.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}},"created_at":"2024-05-31T10:02:25.000Z","updated_at":"2024-06-12T13:02:24.000Z","dependencies_parsed_at":"2024-06-12T18:58:44.127Z","dependency_job_id":null,"html_url":"https://github.com/helightdev/catwalk","commit_stats":null,"previous_names":["helightdev/catwalk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helightdev%2Fcatwalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helightdev%2Fcatwalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helightdev%2Fcatwalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/helightdev%2Fcatwalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/helightdev","download_url":"https://codeload.github.com/helightdev/catwalk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814895,"owners_count":20352038,"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":[],"created_at":"2024-10-13T02:07:11.776Z","updated_at":"2025-03-16T02:16:34.968Z","avatar_url":"https://github.com/helightdev.png","language":"Dart","readme":"# Example\n\n## Shared Library Content\n```dart\n// Create a protocol instance that should be used by this endpoint.\n// This contains serializers and the transport format that should be used.\nfinal protocol = JsonRpcProtocol();\n\n// Create an endpoint interface that will be implemented by both the client and server.\n@EndpointMacro()\nabstract interface class TestEndpoint implements Endpoint {\n  Future\u003cString\u003e getName(String userId);\n\n  Future\u003cString?\u003e nullableString();\n}\n```\n\n## Server\n```dart\n// Create a simple rpc server that uses the TestController to handle requests.\nvoid main(List\u003cString\u003e arguments) async {\n  var server = JsonRpcServer(protocol, TestController(), TestEndpoint.routes);\n  await server.serve();\n}\n\n// The server sided implementation of the TestEndpoint.\nclass TestController implements TestEndpoint {\n\n  @override\n  Future\u003cString\u003e getName(String userId) {\n    return Future.value(\"Answer: $userId\");\n  }\n\n  @override\n  Future\u003cString?\u003e nullableString() {\n    return Future.value(null);\n  }\n}\n```\n\n## Client\n```dart\n// Access the server using the TestEndpointClient.\nvoid main(List\u003cString\u003e arguments) async {\n  protocol.client = JsonRpcClient(JsonRpcClientConfig(baseUrl: \"http://localhost:8080\"));\n  var client = TestEndpointClient(protocol);\n  print(await client.getName(\"Moin!\"));\n}\n\n@ClientMacro()\nclass TestEndpointClient implements TestEndpoint {}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelightdev%2Fcatwalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhelightdev%2Fcatwalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhelightdev%2Fcatwalk/lists"}