{"id":15485492,"url":"https://github.com/codenoid/gotral-server","last_synced_at":"2025-03-28T15:41:10.792Z","repository":{"id":100300842,"uuid":"217110195","full_name":"codenoid/GoTral-Server","owner":"codenoid","description":"Server for GoTral, Encrypted Golang Centralized Configuration management","archived":false,"fork":false,"pushed_at":"2020-09-30T08:32:50.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T15:48:39.128Z","etag":null,"topics":["centralized-configuration","configuration-management","golang-application"],"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/codenoid.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-23T17:02:20.000Z","updated_at":"2022-05-31T02:05:32.000Z","dependencies_parsed_at":"2023-05-13T14:15:32.388Z","dependency_job_id":null,"html_url":"https://github.com/codenoid/GoTral-Server","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"48fa9d59b98f7552070972fcdf6648bfe22cea29"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2FGoTral-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2FGoTral-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2FGoTral-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenoid%2FGoTral-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codenoid","download_url":"https://codeload.github.com/codenoid/GoTral-Server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246056483,"owners_count":20716749,"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":["centralized-configuration","configuration-management","golang-application"],"created_at":"2024-10-02T06:01:44.951Z","updated_at":"2025-03-28T15:41:10.767Z","avatar_url":"https://github.com/codenoid.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoTral Server\n\nServer for [gotral library](https://github.com/codenoid/GoTral)\n\n## Adding Your Config Data\n\n1. Read server.go and config folder\n\n## Usage\n\n1. clone and run the server !\n```\n$ git clone  https://github.com/codenoid/GoTral-Server.git\n$ cd GoTral-Server\n// edit some config / do what you want\n$ go run server.go\nstarting to listen on :8080\n```\n2. accessing the data\n\n- http://localhost:8080/config?id=filename.ext\n- just like http://localhost:8080/config?id=ecommerce.json\n- ecommerce.json must be inside [choosed folder](https://github.com/codenoid/GoTral-Server/blob/ca0c016c2642ab91d27ea8369a74cb9818d94f79/server.go#L14) that contain config file\n\n```\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/codenoid/gotral\"\n)\n\nfunc main() {\n\n\t// super secret key\n\tsecret := \"somehardpw\" // or just put string in there\n\n\tconfig, err := gotral.DirectLoad(\"http://localhost:8080/config?id=ecommerce.json\", secret)\n\tif err != nil { fmt.Println(err) }\n\tif val, err := config.Get(\"mysql_username\"); !err {\n \t\tfmt.Println(val)\n \t}\n\n\t// with basic auth support\n\twithOpt := gotral.GoTral{\n\t\tUrl: \"http://localhost:8080/config?id=ecommerce.json\",\n\t\tPassphrase: \"somehardpw\",\n\t\tBasicAuth: true,\n\t\tUsername: \"guest\",\n\t\tPassword: \"guest\",\n\t}\n\n\tconfig, err = withOpt.LoadConfig()\n\tif err != nil { fmt.Println(err) }\n\tif val, err := config.Get(\"mysql_username\"); !err {\n \t\tfmt.Println(val)\n \t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenoid%2Fgotral-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodenoid%2Fgotral-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenoid%2Fgotral-server/lists"}