{"id":26714946,"url":"https://github.com/opencodeco/myvalidator","last_synced_at":"2025-03-27T13:51:35.829Z","repository":{"id":264392188,"uuid":"888086858","full_name":"opencodeco/myvalidator","owner":"opencodeco","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-31T15:21:44.000Z","size":42,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T16:24:59.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/opencodeco.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-11-13T19:43:42.000Z","updated_at":"2024-12-31T15:21:48.000Z","dependencies_parsed_at":"2024-12-31T16:34:51.977Z","dependency_job_id":null,"html_url":"https://github.com/opencodeco/myvalidator","commit_stats":null,"previous_names":["opencodeco/myvalidator","alexgarzao/myvalidator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencodeco%2Fmyvalidator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencodeco%2Fmyvalidator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencodeco%2Fmyvalidator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencodeco%2Fmyvalidator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencodeco","download_url":"https://codeload.github.com/opencodeco/myvalidator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245858850,"owners_count":20684057,"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":"2025-03-27T13:51:35.154Z","updated_at":"2025-03-27T13:51:35.820Z","avatar_url":"https://github.com/opencodeco.png","language":"Go","readme":"# MyValidator (terrible name, fix it!)\n\n[Validator](https://github.com/go-playground/validator) is an amazing project. But in applications with high frequency use, the way that validator works (i.e. reflection) can cause performance penalty.\n\nMyValidator born to solve that gap. Instead of use reflection, MyValidator uses the code generating approach.\n\nThis project aims to be compatible with validator tag syntax.\n\nAt this time it is an unstable project and should not be used in production environments.\n\n# How to build MyValidator\n\nThe following requirements are needed to build the project:\n- Git\n- Go \u003e= 1.22\n- Make\n\nThe steps to build are:\n```\n# Clone the project repository\ngit clone git@github.com:opencodeco/myvalidator.git\n\n# Run the tests (optional)\nmake test\n\n# Build the binary\nmake build\n```\n\nAfter that the executable will be in bin/myvalidator.\n\n# Steps to run the tests\n\n## Steps to run test01\n\nTest01 aims to be a case where all the files are in the same package (in this case, the main package).\n\n```\n# Runs myvalidator to generate structs validator and common definitions.\n./bin/myvalidator ./tests/test01\n```\n\nAfter that two files will be generated:\n- validators.go: contains common definitions\n- user_validator.go: contains UserValidate function that is responsible to check if User object has a valid content\n\n## Steps to run test02\n\nTest02 aims to be an example where the structs to be validated are in another package (structsinpkg in this test).\n\n```\n# Runs myvalidator to generate structs validator and common definitions.\n./bin/myvalidator ./tests/test02\n```\n\nAfter that two files will be generated:\n- validators.go: contains common definitions\n- user_validator.go: contains UserValidate function that is responsible to check if User object has a valid content\n\n\n# License\n\nMyValidator uses [MIT License](LICENSE). \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencodeco%2Fmyvalidator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencodeco%2Fmyvalidator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencodeco%2Fmyvalidator/lists"}