{"id":19614611,"url":"https://github.com/activestate/doozerconfig","last_synced_at":"2025-04-28T01:32:13.664Z","repository":{"id":4816006,"uuid":"5969708","full_name":"ActiveState/doozerconfig","owner":"ActiveState","description":"Go package for managing json-encoded configuration in Doozer","archived":false,"fork":false,"pushed_at":"2013-03-11T03:50:08.000Z","size":134,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":53,"default_branch":"master","last_synced_at":"2025-04-05T04:51:14.254Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Leaflet/Leaflet","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ActiveState.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-09-26T17:47:02.000Z","updated_at":"2018-01-22T18:43:39.000Z","dependencies_parsed_at":"2022-08-20T23:31:19.003Z","dependency_job_id":null,"html_url":"https://github.com/ActiveState/doozerconfig","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/ActiveState%2Fdoozerconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActiveState%2Fdoozerconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActiveState%2Fdoozerconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActiveState%2Fdoozerconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ActiveState","download_url":"https://codeload.github.com/ActiveState/doozerconfig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251234071,"owners_count":21556780,"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-11T10:53:05.961Z","updated_at":"2025-04-28T01:32:11.164Z","avatar_url":"https://github.com/ActiveState.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# doozerconfig\n\n## What Is It?\n\ndoozerconfig is a Go package for managing json-encoded configuration in doozer. Configuration in doozer is directly mapped to a Go struct. Configuration changes made in doozer are automatically reflected in the struct. For details, see the example below.\n\n[API documentation](http://godoc.org/github.com/ActiveState/doozerconfig)\n\n## Installation\n\n```bash\n$ go get github.com/ActiveState/doozerconfig\n```\n\n## Example\n\n```Go\nvar Config struct {\n    MaxItems  int                `doozer:\"config/max_items\"`\n    DbUri     string             `doozer:\"config/db_uri\"`\n    EnvVars   map[string]string  `doozer:\"config/envvars\"`\n    Verbose   bool   // not in doozer\n}\n\nfunc init() {\n    doozer, _ := doozer.Dial(\"localhost:8046\")\n    rev, _ := doozer.Rev()\n    \n    // Map Config fields to \"/myapp/\" + the struct tag above.\n    // eg: MaxItems will be mapped to /myapp/config/max_items\n    //     EnvVars will be mapped to /myapp/config/envvars/*\n    cfg := doozerconfig.New(doozer, rev, \u0026Config, \"/myapp/\")\n\n    // Load config values from doozer and assign to Config fields\n    _ = cfg.Load()  \n\n    // Watch for live changes to doozer config, and automatically\n    // update the struct fields. The callback function can be used to\n    // handle errors, and to get notified of changes.\n    go cfg.Monitor(\"/myapp/config/*\", func(change *Change, err error) {\n        fmt.Printf(\"config changed in doozer; %+v\\n\", change)            \n    })\n}\n```\n\n# Notes\n\n- If a file is deleted from doozer, the config struct is not updated\n  (unless it a map entry). Perhaps we should update the value to a\n  default value (as specified in a `default` struct tag).\n\n- Writing configuration back to doozer is not supported yet.\n\n# Changes\n\n- **Oct 22, 2012**:\n\n  - Support for loading map types\n\n  - API: `Load` now takes doozer revision as a mandatory argument.\n\n  - API: `Monitor` doesn't take a revision argument anymore. Instead\n    it uses the one passed to `Load`.\n\n  - API: `Monitor`'s callback function accepts a new `Change` struct.\n\n- **Sep 25, 2012**:\n\n  - Initial public release.\n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivestate%2Fdoozerconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factivestate%2Fdoozerconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivestate%2Fdoozerconfig/lists"}