{"id":16812901,"url":"https://github.com/sjmudd/anonymiser","last_synced_at":"2025-08-18T15:04:42.367Z","repository":{"id":66973098,"uuid":"42100134","full_name":"sjmudd/anonymiser","owner":"sjmudd","description":"Anonymise some values for showing to the \"public\"","archived":false,"fork":false,"pushed_at":"2021-12-25T19:47:50.000Z","size":17,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T01:46:50.693Z","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":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjmudd.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-08T08:35:31.000Z","updated_at":"2023-01-26T17:35:47.000Z","dependencies_parsed_at":"2023-05-16T08:00:16.029Z","dependency_job_id":null,"html_url":"https://github.com/sjmudd/anonymiser","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/sjmudd/anonymiser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjmudd%2Fanonymiser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjmudd%2Fanonymiser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjmudd%2Fanonymiser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjmudd%2Fanonymiser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjmudd","download_url":"https://codeload.github.com/sjmudd/anonymiser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjmudd%2Fanonymiser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271011753,"owners_count":24684398,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-13T10:23:54.953Z","updated_at":"2025-08-18T15:04:42.328Z","avatar_url":"https://github.com/sjmudd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anonymiser\nAnonymise some values for showing to the \"public\"\n\n# Description.\n\nAnonymiser allows a group of strings to be anonymised: that is\nconverted into another set of string values.\n\nStrings can be split into groups so that similar types of\nstrings are anonymised together.\n\nAn example of this might be a program which is exposing database\nand table names from an internal company database server. Here\nwe would like to anonymise the names being used but share the\noutput of the screen with anonymous information.\n\nAll database names would be converted into `db1`, `db2` ... `dbn`,\nand all table names converted into `table1`, `table2` ... `tablen`.\n\nOther similar use cases can be imagined.\n\nAn example: [`ps-top`](https://godoc.org/github.com/sjmudd/ps-top])\n\nIn `ps-top` I wanted to anonymise the host, database and table names\nwhich were shown as they might expose internal information to third parties.\nThis package made that easy.\n\nThere is basically one routine `anonymise.Anonymise( \"group\", \"some_name\" )`.\n\nThe first parameter is the name of the group of strings to be\nanonyised, The second parameter is the name to anonymise and basically\neach new name gets an id starting at 1. This id is added to the end\nof the group name and that's what is returned as the anonymised\nname.\n\ne.g.\nTo anonymise some database names:\n* anonymise.Anonymise( \"db\",    \"my_db\" )   --\u003e db1\n* anonymise.Anonymise( \"db\",    \"otherdb\" ) --\u003e db2\n* anonymise.Anonymise( \"db\",    \"otherdb\" ) --\u003e db2\n* anonymise.Anonymise( \"db\",    \"my_db\" )   --\u003e db1\n\nTo anonymise some table names:\n* anonymise.Anonymise( \"table\", \"important_name\" )  --\u003e table1\n* anonymise.Anonymise( \"table\", \"something_else\" )  --\u003e table2\n* anonymise.Anonymise( \"table\", \"important_name\" )  --\u003e table1\n\nYou can use as many prefixes as you like.\n\nI guess in real code you'd do something like this:\n```\nvar secret []string { ... } // holds strings of secrent information (maybe with duplicates)\n\n... // fill secret with useful data\n\nfor i := range secret {\n\tfmt.Println( \"secret:\", secret[i], \"==\u003e\", anonymise.Anonymise( \"anonymised\", secret[i] ) )\n}\n``` \n\n# Installation\n\nInstall by doing:\n* `go get github.com/sjmudd/anonymiser`\n\n# Documentation\n\nDocumentation can be found using `godoc` or at [https://godoc.org/github.com/sjmudd/anonymiser]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjmudd%2Fanonymiser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjmudd%2Fanonymiser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjmudd%2Fanonymiser/lists"}