{"id":19764312,"url":"https://github.com/grahms/worx","last_synced_at":"2025-04-30T14:32:49.476Z","repository":{"id":209172630,"uuid":"723414563","full_name":"GraHms/worx","owner":"GraHms","description":"Worx is a framework for building APIs in Go with support for TMF (Telecom Management Forum) standards.","archived":false,"fork":false,"pushed_at":"2024-04-28T11:33:35.000Z","size":48,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-28T12:35:16.097Z","etag":null,"topics":["framework","godantic","tmf"],"latest_commit_sha":null,"homepage":"","language":"Go","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/GraHms.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-11-25T15:41:11.000Z","updated_at":"2024-04-28T11:32:04.000Z","dependencies_parsed_at":"2023-11-25T16:20:09.505Z","dependency_job_id":"30faa172-1cd7-4b85-90b3-d825800d69ab","html_url":"https://github.com/GraHms/worx","commit_stats":null,"previous_names":["grahms/worx"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GraHms%2Fworx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GraHms%2Fworx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GraHms%2Fworx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GraHms%2Fworx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GraHms","download_url":"https://codeload.github.com/GraHms/worx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224214019,"owners_count":17274524,"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":["framework","godantic","tmf"],"created_at":"2024-11-12T04:13:23.580Z","updated_at":"2024-11-12T04:13:24.099Z","avatar_url":"https://github.com/GraHms.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# Getting Started\n\nWorx is a framework for building APIs in Go with support for TMF (Telecom Management Forum) standards. Follow these steps to get started:\n\n### 1. Install Worx:\n\n```bash\ngo get -u github.com/grahms/worx\n```\n\n### 2. Initialize Your Application:\n\nCreate a new Worx application:\n\n```go\npackage main\n\nimport (\n\t\"github.com/grahms/worx\"\n\t\"github.com/grahms/worx/router\"\n)\n\nfunc main() {\n\tapp := worx.NewApplication(\"/api\", \"Product Catalog API\")\n}\n```\n\n### 3. Define Your API Endpoint:\n\nCreate a new API endpoint using the `NewRouter` function:\n\n```go\nproduct := worx.NewRouter[Product, ProductResponse](app, \"/products\")\n```\n\n\n\n### 4. Handle Requests:\n\nDefine your request handling logic using the `HandleCreate`, `HandleRead`, `HandleUpdate`, and `HandleList` methods:\n\n```go\nproduct.HandleCreate(\"\", func(product Product, params *router.RequestParams) (*router.ProcessorError, *ProductResponse) {\n\treturn nil, \u0026ProductResponse{\n\t\tProduct:  product,\n\t\tBaseType: nil,\n\t\tUrl:      nil,\n\t}\n})\n```\n\n### 5. Run Your Application:\n\nStart your Worx application and listen on a specified port:\n\n```go\nerr := app.Run(\":8080\")\nif err != nil {\n\tpanic(err)\n}\n```\n\nNow, your Worx application is ready to handle TMF API requests.\n\n--- \n\nMake sure to include the route before defining the handlers to ensure that the routes are properly registered in your application. Happy coding","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrahms%2Fworx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrahms%2Fworx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrahms%2Fworx/lists"}