{"id":22018121,"url":"https://github.com/rvflash/eve","last_synced_at":"2025-07-19T20:10:58.268Z","repository":{"id":57543251,"uuid":"106057757","full_name":"rvflash/eve","owner":"rvflash","description":"E.V.E. is an environment variables management tool","archived":false,"fork":false,"pushed_at":"2018-10-11T10:04:39.000Z","size":3205,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T09:35:12.388Z","etag":null,"topics":["distributed-cache","environment-variables","golang","rpc-server"],"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/rvflash.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}},"created_at":"2017-10-06T23:14:03.000Z","updated_at":"2024-09-18T05:12:47.000Z","dependencies_parsed_at":"2022-09-18T00:00:53.041Z","dependency_job_id":null,"html_url":"https://github.com/rvflash/eve","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/rvflash/eve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Feve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Feve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Feve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Feve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvflash","download_url":"https://codeload.github.com/rvflash/eve/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Feve/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266004418,"owners_count":23862951,"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":["distributed-cache","environment-variables","golang","rpc-server"],"created_at":"2024-11-30T05:10:00.312Z","updated_at":"2025-07-19T20:10:58.248Z","avatar_url":"https://github.com/rvflash.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E.V.E.\n\n[![GoDoc](https://godoc.org/github.com/rvflash/eve?status.svg)](https://godoc.org/github.com/rvflash/eve)\n[![Build Status](https://img.shields.io/travis/rvflash/eve.svg)](https://travis-ci.org/rvflash/eve)\n[![Code Coverage](https://img.shields.io/codecov/c/github/rvflash/eve.svg)](http://codecov.io/github/rvflash/eve?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/rvflash/eve)](https://goreportcard.com/report/github.com/rvflash/eve)\n\n\nE.V.E. is a environment variables management tool based on\na friendly user interface named Environment Variables Editor. \n\n* A HTTP web interface to manage server nodes, projects, environments and variables.\n* One or more RPC servers used to store the deployed variables values. \n* A library to retrieve environment variables from various handlers and schedule the get order.\n\n\n## Installation\n\n`eve` requires Go 1.5 or later. (os.LookupEnv is required)\nIt uses go dep to manage dependencies.\n\n```bash\n$ go get -u github.com/rvflash/eve\n$ cd $GOPATH/src/github.com/rvflash/eve\n$ dep ensure\n```\n\n\n### Quick start\n\n#### Launches the web interface\n\nBy default, the editor is available on the net address localhost:8080.\nThe database is a BoltDB file named eve.db created in the launch directory.\nThis interface is based on Bootstrap v4 and jQuery 3.2 to propose a simple interface.\n\n```bash\ncd $GOPATH/src/github.com/rvflash/eve/server/http/\ngo build \u0026\u0026 ./http\n```\n\nYou can change its behavior by using the command flags:\n\n```bash\n./http --help\nUsage of ./http:\n  -dsn string\n    \tdatabase's filepath (default \"eve.db\")\n  -host string\n    \thost addr to listen on\n  -port int\n    \tservice port (default 8080)\n``` \n\n\n#### Launches one instance of RPC cache where ever who want.\n\nBy default, the RPC server is available on the port 9090.\n\nE.V.E. exposes all environment variables behind /vars.\nThereby, to deploy a new instance of cache with all managed variables loaded on starting, we can use the `from` option to specify this URL.\n\n```bash\ncd $GOPATH/src/github.com/rvflash/eve/server/tcp/\ngo build \u0026\u0026 ./tcp -from \"http://localhost:8080/vars\"\n```\n\nYou can change it with :\n\n```bash\n./tcp --help\nUsage of ./tcp:\n  -from string\n    \tURL to fetch to get JSON data to use as default values\n  -host string\n    \thost addr to listen on\n  -port int\n    \tservice port (default 9090)\n```\n\nNow, you can open your favorite browser and go to http://localhost:8080 to create your first project.\nIts name: Alpha.\n\nAfter, you can if necessary add until two environments to vary the variable's values in case of these. \nBy example, you can create one environment named `Env`with `dev`, `qa` or `prod` as values.\nFor each variable afterwards, you can vary the value. \n\nTo finalize your discovery, you should add the net address of the RPC server as your first node cache.\nThen, deploy the variables for the environment of your choice in this remote or local cache.\n\n\n### Usage\n\nNow you can use the E.V.E. library to access to your environment variables.\nYou can schedule as you want the client to use. \n\nBy default, the handler is defined to lookup in its local cache, then in the OS environment and\nfinally in the cache servers added with the New method. \n\n\n#### Uses the data getters\n\n```go\n// Import the E.V.E. library.\nimport \"github.com/rvflash/eve\"\n\n// ...\n\n// Use the net address of the RPC cache started before. \ncaches, err := eve.Servers(\":9090\")\nif err != nil {\n    fmt.Println(err)\n    return\n}\n\n// Launch the E.V.E. handler.\n// The names of project, environment or variable are not case sensitive.\n// Moreover, dash will be internally replace with an underscore. \n// Start by setting the name of the project: alpha.\nvars := eve.New(\"alpha\", caches...)\n\n// Alpha is defined to have one environment.\n// Here we set the current environment value.\nif err := vars.Envs(\"qa\"); err != nil {\n    fmt.Println(err)\n    return\n}\n\n// Now, we suppose to have created 3 variables named: enabled, keyword and value.\n// With this configuration, E.V.E. will try to lookup the following variables:\n// ALPHA_QA_ENABLED, ALPHA_QA_KEYWORD and ALPHA_QA_VALUE.\nif vars.MustBool(\"enabled\") {\n    str, err := vars.String(\"keyword\")\n    if err != nil {\n    \tfmt.Println(err)\n        return\n    }\n    fmt.Print(str)\n}\nif data, ok := vars.Lookup(\"value\"); ok {\n    fmt.Printf(\": %d\", data.(int))\n}\n// Output: rv: 42\n```\n\n\n##### Processes the struct's fields.\n\nE.V.E. supports the use of struct tags to specify alternate name and required environment variables.\n\n`eve` can be used to specify an alternate name and `required` with `true` as value, marks as mandatory the field.\n\nE.V.E has automatic support for CamelCased structure fields.\nIn the following example, in the continuity of the previous sample, it searches for the variables named ALPHA_QA_OTHER_NAME and ALPHA_QA_REQUIRED_VAR.\nIf the last variable can not be found, as the field is tag as mandatory, the `Process` will return in error.\n\n```go\n// MyCnf is sample struct to feed.\ntype MyCnf struct {\n    AliasVar    string  `eve:\"OTHER_NAME\"`\n    RequiredVar int     `required:\"true\"`\n}\n\n// ...\n\nvar conf MyCnf\nif err := vars.Process(\u0026conf); err != nil {\n    fmt.Println(err)\n    return\n}\n```\n\n\n##### Supported structure field types\n\n* string\n* int, int8, int16, int32, int64\n* uint, uint8, uint16, uint32, uint64\n* bool\n* float32, float64\n* time.Duration\n\nSoon, E.V.E. will manage time.Time, slices and maps of any supported type. \n\n\n## More features\n\n* You can use your own client to supply the environment variables by implementing the client.Getter interface.\n* More client interfaces can be used: one to check the client's availability to disable the internal cache recycle.\n* Another interface named client.Asserter can be used to realize assertion on data of your client.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvflash%2Feve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvflash%2Feve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvflash%2Feve/lists"}