{"id":16629078,"url":"https://github.com/reisraff/goinput","last_synced_at":"2025-10-15T15:59:40.775Z","repository":{"id":150392416,"uuid":"170871588","full_name":"reisraff/goinput","owner":"reisraff","description":"A good input layer for GO","archived":false,"fork":false,"pushed_at":"2021-01-27T19:09:25.000Z","size":34,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-09T22:01:34.984Z","etag":null,"topics":["filter","filtering","go","golang","library","rest","validation","validator"],"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/reisraff.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":"2019-02-15T13:45:39.000Z","updated_at":"2024-06-19T08:05:44.451Z","dependencies_parsed_at":"2023-06-11T07:45:20.068Z","dependency_job_id":null,"html_url":"https://github.com/reisraff/goinput","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reisraff/goinput","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reisraff%2Fgoinput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reisraff%2Fgoinput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reisraff%2Fgoinput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reisraff%2Fgoinput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reisraff","download_url":"https://codeload.github.com/reisraff/goinput/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reisraff%2Fgoinput/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279090453,"owners_count":26101222,"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-10-15T02:00:07.814Z","response_time":56,"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":["filter","filtering","go","golang","library","rest","validation","validator"],"created_at":"2024-10-12T04:39:26.970Z","updated_at":"2025-10-15T15:59:40.724Z","avatar_url":"https://github.com/reisraff.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoInput\n\n```go\nimport \"github.com/reisraff/goinput/input\"\nimport \"github.com/revel/revel\"\n\ntype Notification struct {\n    Text string\n    Url string\n}\n\nfunc (self *Notification) SetText(text string) {\n    self.Text = text\n}\n\nfunc (self *Notification) SetUrl(url string) {\n    self.Url = url\n}\n\nfunc NotificationCreateDefine(self input.InputResult) {\n    object := self.Add(\"notification\", Notification{}, nil)\n\n    object.Add(\"text\", \"string\", nil)\n    object.Add(\n        \"url\",\n        \"string\",\n        map[string]interface{}{\n            \"required\": false,\n        }\n    )\n}\n\nfunc (c NotificationController) Create() revel.Result {\n    handler := input.InputHandler{}\n    handler.Configure(input.DefaultTypeHandlerFactory())\n\n    data := make(map[string]interface{})\n    c.Params.BindJSON(\u0026data)\n\n    result := handler.Bind(data, NotificationCreateDefine)\n\n    if ! result.IsValid() {\n        data = make(map[string]interface{})\n        data[\"errors\"] = result.GetErrorsAsString()\n\n        return c.RenderJSON(data)\n    }\n\n    notification := result.GetData(\"notification\").(*Notification)\n\n    data = make(map[string]interface{})\n    data[\"data\"] = notification\n\n    return c.RenderJSON(data)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freisraff%2Fgoinput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freisraff%2Fgoinput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freisraff%2Fgoinput/lists"}