{"id":20293625,"url":"https://github.com/mingderwang/ginger","last_synced_at":"2025-04-11T11:41:15.285Z","repository":{"id":36417480,"uuid":"40722452","full_name":"mingderwang/ginger","owner":"mingderwang","description":"go generate tool to create a RESTful API micro server from a Json data schema","archived":false,"fork":false,"pushed_at":"2016-09-15T16:43:21.000Z","size":32,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T08:01:50.652Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mingderwang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-14T15:34:51.000Z","updated_at":"2020-09-09T02:23:27.000Z","dependencies_parsed_at":"2022-09-10T00:50:51.383Z","dependency_job_id":null,"html_url":"https://github.com/mingderwang/ginger","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingderwang%2Fginger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingderwang%2Fginger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingderwang%2Fginger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mingderwang%2Fginger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mingderwang","download_url":"https://codeload.github.com/mingderwang/ginger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248385506,"owners_count":21094900,"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-14T15:25:23.451Z","updated_at":"2025-04-11T11:41:15.258Z","avatar_url":"https://github.com/mingderwang.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ginger - for go generate a micro service from data schema\nAdd following line in top of your data schema file \n// go:generate gigner $GOFILE\nand also add following line above each data type you want to build api\n// @ginger\nthen, type \"go generate\"\n\n# Example data schema file\nYou can generate following data type from JSON-to-Go online tool with a sample of your data object in Json format.  (http://mholt.github.io/json-to-go/)\n\nGinger will generate main.go for you, only need a dataType.go in the current folder. \n\nPlease add following 2 lines in your data schema\n    Ginger_Created    int32  `json:\"ginger_created,omitempty\"`\n    Ginger_Id         int32  `json:\"ginger_id,omitempty\"`\n\nFor example, User Schema\n```go\n//go:generate ginger $GOFILE\npackage main\n//@ginger\ntype User struct {\n    Ginger_Created    int32  `json:\"ginger_created\"`\n    Ginger_Id         int32  `json:\"ginger_id\" gorm:\"primary_key\"`\n\tID string `json:\"id\"`\n\tName string `json:\"name\"`\n\tDeleted bool `json:\"deleted\"`\n\tStatus interface{} `json:\"status\"`\n\tColor string `json:\"color\"`\n\tRealName string `json:\"real_name\"`\n\tTz string `json:\"tz\"`\n\tTzLabel string `json:\"tz_label\"`\n\tTzOffset int `json:\"tz_offset\"`\n\tProfile struct {\n\t\tRealName string `json:\"real_name\"`\n\t\tRealNameNormalized string `json:\"real_name_normalized\"`\n\t\tEmail string `json:\"email\"`\n\t\tImage24 string `json:\"image_24\"`\n\t\tImage32 string `json:\"image_32\"`\n\t\tImage48 string `json:\"image_48\"`\n\t\tImage72 string `json:\"image_72\"`\n\t\tImage192 string `json:\"image_192\"`\n\t} `json:\"profile\"`\n\tIsAdmin bool `json:\"is_admin\"`\n\tIsOwner bool `json:\"is_owner\"`\n\tIsPrimaryOwner bool `json:\"is_primary_owner\"`\n\tIsRestricted bool `json:\"is_restricted\"`\n\tIsUltraRestricted bool `json:\"is_ultra_restricted\"`\n\tIsBot bool `json:\"is_bot\"`\n\tHasFiles bool `json:\"has_files\"`\n\tHas2Fa bool `json:\"has_2fa\"`\n}\n```\n\n#Demo\nrefer to github.com/mingderwang/goslack\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingderwang%2Fginger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmingderwang%2Fginger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmingderwang%2Fginger/lists"}