{"id":21296940,"url":"https://github.com/reddec/fs-obj","last_synced_at":"2025-03-15T17:27:43.985Z","repository":{"id":81702501,"uuid":"70421961","full_name":"reddec/fs-obj","owner":"reddec","description":"Generator of object mapping to filesystem","archived":false,"fork":false,"pushed_at":"2016-10-09T19:06:39.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-09T00:06:39.031Z","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/reddec.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":"2016-10-09T18:20:06.000Z","updated_at":"2016-10-09T18:20:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4adec7a-0922-4456-85b5-7ba36a9a4b60","html_url":"https://github.com/reddec/fs-obj","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/reddec%2Ffs-obj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Ffs-obj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Ffs-obj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddec%2Ffs-obj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reddec","download_url":"https://codeload.github.com/reddec/fs-obj/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243765045,"owners_count":20344525,"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-11-21T14:31:11.971Z","updated_at":"2025-03-15T17:27:43.963Z","avatar_url":"https://github.com/reddec.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File system to object generator\n\nThis is simple utility that generates `struct`s and methods for objects on file system.\nThink about it like lightweight ORM on fs. It's ready for `go:generate`\n\nNow little formal description\n\n### Install\n\nSame as any other GoLang applications:\n\n`go install github.com/reddec/fs-obj`\n\n\n### Usage\n\n```\nfs-obj [flags...] \u003cURLs,...\u003e\n\nFlags:\n\n  -o string\n        Output folder name (default \"./dummy\")\n  -p string\n        Package name (default \"dummy\")\n  -r string\n        Root folder name (default \"data\")\n```\n\nURL in this terms is a description of FS object and have those grammar:\n\n`(/[:]SECTION)+ [-\u003e CLASS]`\n\nWhere `SECTION` is a single part of path to target file. If `SECTION` starts with `:`, it means to be dynamic (like a `:param` in URL routing)\n\nWhere `CLASS` is a optional name of structure which will be coded/encoded by JSON codec.\n\n### Let's show some examples\n\nCommand:\n\n`fs-obj -o auth -p auth '/groups/:group/user' '/rules/common/:rule-\u003eRule' '/rules/personal/:user/rule-\u003eRule'`\n\nWill generates this file tree:\n\n```\nauth\n├── fsdb_data_groups_group_user_record.go\n├── fsdb_data_rules_common_rule_rule.go\n└── fsdb_data_rules_personal_user_rule_rule.go\n```\n\nAnd generates factory method in package api: `NewData()`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Ffs-obj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freddec%2Ffs-obj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddec%2Ffs-obj/lists"}