{"id":24919801,"url":"https://github.com/steinfletcher/conf","last_synced_at":"2025-03-28T10:12:56.665Z","repository":{"id":81126173,"uuid":"213761234","full_name":"steinfletcher/conf","owner":"steinfletcher","description":"A library to parse configuration data using struct tags","archived":false,"fork":false,"pushed_at":"2020-01-18T14:41:08.000Z","size":43,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-02T10:37:30.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steinfletcher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-08T21:45:10.000Z","updated_at":"2020-04-22T04:14:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"4fe7d954-d260-42f4-acf1-8bdec698a379","html_url":"https://github.com/steinfletcher/conf","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinfletcher%2Fconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinfletcher%2Fconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinfletcher%2Fconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinfletcher%2Fconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steinfletcher","download_url":"https://codeload.github.com/steinfletcher/conf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246009071,"owners_count":20708881,"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-02-02T10:37:31.432Z","updated_at":"2025-03-28T10:12:56.659Z","avatar_url":"https://github.com/steinfletcher.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/steinfletcher/conf.svg?branch=master)](https://travis-ci.org/steinfletcher/conf)\n\n# conf\n\nExtends https://github.com/caarlos0/env to support arbitrary data providers. This means you can resolve data from anywhere, such as Vault, AWS Secrets manager, S3 or Google Sheets.\n\n# Usage\n\nImplement the config Provider interface\n\n```go\ntype Provider interface {\n\tProvide(field reflect.StructField) (string, error)\n}\n```\n\nCreate custom struct tags\n\n```go\ntype Config struct {\n\t// github.com/caarlos0/env properties\n\tHome         string        `env:\"HOME\"`\n\tPort         int           `env:\"PORT\" envDefault:\"3000\"`\n\tIsProduction bool          `env:\"PRODUCTION\"`\n\tHosts        []string      `env:\"HOSTS\" envSeparator:\":\"`\n\tDuration     time.Duration `env:\"DURATION\"`\n\tTempFolder   string        `env:\"TEMP_FOLDER\" envDefault:\"${HOME}/tmp\" envExpand:\"true\"`\n\t\n\t// custom properties\n\tMySecret     string        `secret:\"MY_SECRET,required\"`\n}\n```\n\nPass config providers to `conf.Parse(...)` like so\n\n```go\nvar cfg Config\nerr := env.Parse(\u0026cfg, conf.EnvProvider, myCustomProvider)\n```\n\nwhere `conf.EnvProvider` is the environment variable parser from `caarlos0/env` and `myCustomProvider` is the custom provider.\n\n# Providers\n\n* [AWS Secrets Manager](https://github.com/steinfletcher/aws-secrets-manager-conf) for resolving secrets from AWS secrets manager.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinfletcher%2Fconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteinfletcher%2Fconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinfletcher%2Fconf/lists"}