{"id":21476864,"url":"https://github.com/phogolabs/restify","last_synced_at":"2025-03-17T08:19:03.117Z","repository":{"id":48863262,"uuid":"216848960","full_name":"phogolabs/restify","owner":"phogolabs","description":"Opinionated package for building HTTP RESTFul API","archived":false,"fork":false,"pushed_at":"2023-03-06T23:48:32.000Z","size":117,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-23T17:46:16.658Z","etag":null,"topics":["form","golang","http","json","rest","xml"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phogolabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-22T15:34:51.000Z","updated_at":"2021-12-30T17:37:53.000Z","dependencies_parsed_at":"2023-01-29T21:46:10.728Z","dependency_job_id":null,"html_url":"https://github.com/phogolabs/restify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phogolabs%2Frestify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phogolabs%2Frestify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phogolabs%2Frestify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phogolabs%2Frestify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phogolabs","download_url":"https://codeload.github.com/phogolabs/restify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243997126,"owners_count":20380981,"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":["form","golang","http","json","rest","xml"],"created_at":"2024-11-23T11:10:43.551Z","updated_at":"2025-03-17T08:19:03.086Z","avatar_url":"https://github.com/phogolabs.png","language":"Go","readme":"# restify\n\n[![Documentation][godoc-img]][godoc-url]\n![License][license-img]\n[![Build Status][action-img]][action-url]\n[![Coverage][codecov-img]][codecov-url]\n[![Go Report Card][report-img]][report-url]\n\nAn Opinionated package for building HTTP RESTFul API\n\n## Installation\n\nMake sure you have a working Go environment. Go version 1.13.x is supported.\n\n[See the install instructions for Go](http://golang.org/doc/install.html).\n\nTo install `restify`, simply run:\n\n```\n$ go get github.com/phogolabs/restify\n```\n\n## Getting Started\n\n```golang\ntype CreateUserInput struct {\n\tFirstName string `json:\"first_name\" header:\"-\"            validate:\"required\"`\n\tLastName  string `json:\"last_name\"  header:\"-\"            validate:\"required\"`\n\tCreatedBy string `json:\"-\"          header:\"X-Created-By\" validate:\"-\"`\n}\n\ntype CreateUserOutput struct {\n\tUserID string `json:\"user_id\"`\n}\n\nfunc (output *CreateUserOutput) Status() int {\n\treturn http.StatusCreated\n}\n\nfunc create(w http.ResponseWriter, r *http.Request) {\n\treactor := restify.NewReactor(w, r)\n\n\tvar (\n\t\tinput  = \u0026CreateUserInput{}\n\t\toutput = \u0026CreateUserOutput{}\n\t)\n\n\tif err := reactor.Bind(input); err != nil {\n\t\treactor.Render(err)\n\t\treturn\n\t}\n\n\t// TODO: implement your logic here\n\n\tif err := reactor.Render(output); err != nil {\n\t\treactor.Render(err)\n\t\treturn\n\t}\n}\n```\n\n## Contributing\n\nWe are open for any contributions. Just fork the\n[project](https://github.com/phogolabs/restify).\n\n[report-img]: https://goreportcard.com/badge/github.com/phogolabs/restify\n[report-url]: https://goreportcard.com/report/github.com/phogolabs/restify\n[codecov-url]: https://codecov.io/gh/phogolabs/restify\n[codecov-img]: https://codecov.io/gh/phogolabs/restify/branch/master/graph/badge.svg\n[action-img]: https://github.com/phogolabs/restify/workflows/main/badge.svg\n[action-url]: https://github.com/phogolabs/restify/actions\n[godoc-url]: https://godoc.org/github.com/phogolabs/restify\n[godoc-img]: https://godoc.org/github.com/phogolabs/restify?status.svg\n[license-img]: https://img.shields.io/badge/license-MIT-blue.svg\n[software-license-url]: LICENSE\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphogolabs%2Frestify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphogolabs%2Frestify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphogolabs%2Frestify/lists"}