{"id":27969212,"url":"https://github.com/future-architect/gocloudurls","last_synced_at":"2025-09-05T22:32:55.414Z","repository":{"id":57519648,"uuid":"219707676","full_name":"future-architect/gocloudurls","owner":"future-architect","description":"gcloud.dev helper to manage urls","archived":false,"fork":false,"pushed_at":"2019-11-06T01:14:23.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-08-15T13:57:42.696Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/future-architect.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":"2019-11-05T09:34:38.000Z","updated_at":"2024-01-16T13:04:55.000Z","dependencies_parsed_at":"2022-08-30T04:22:46.063Z","dependency_job_id":null,"html_url":"https://github.com/future-architect/gocloudurls","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/future-architect/gocloudurls","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fgocloudurls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fgocloudurls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fgocloudurls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fgocloudurls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/future-architect","download_url":"https://codeload.github.com/future-architect/gocloudurls/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-architect%2Fgocloudurls/sbom","scorecard":{"id":414675,"data":{"date":"2025-08-11","repo":{"name":"github.com/future-architect/gocloudurls","commit":"c167ebb3680496578fd8a2735978faeb2e1b0084"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T23:31:50.563Z","repository_id":57519648,"created_at":"2025-08-18T23:31:50.563Z","updated_at":"2025-08-18T23:31:50.563Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273832260,"owners_count":25176262,"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-09-05T02:00:09.113Z","response_time":402,"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":"2025-05-07T21:09:05.044Z","updated_at":"2025-09-05T22:32:55.391Z","avatar_url":"https://github.com/future-architect.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gocloudurls\n\n[![GoDoc](https://godoc.org/github.com/future-architect/gocloudurls?status.svg)](https://godoc.org/github.com/future-architect/gocloudurls)\n\ngocloudurls package is a helper for gocloud.dev.\n\nNow it provides three functions for\n\n* PubSub\n* DocStore\n* Blob\n\n## Purpose\n\nIt makes configuration easy for gocloud.dev.\ngocloud.dev requires special form of URLs to specify cloud resources.\nThis package normalize more human readable/writable config values into gocloud.dev ones.\n\n\n## Functions\n\n### ``func NormalizeBlobURL(srcUrl string) (string, error)``\n\nIt normalize shorter version of blob URLs into gocloud.dev acceptable URLs.\n\nExamples:\n\n* ``mem`` → ``mem://``\n* ``folder`` → ``file://folder``\n* ``s3://my-bucket`` → ``s3://my-bucket?region=us-west-1``\n\nIt gets AWS region name form ``AWS_REGION`` environment variable that is acceptable in AWS Lambda.\n\n``MustNormalizeBlobURL`` raise panic if there is error.\n\n### ``func NormalizePubSubURL(srcUrl string) (string, error)``\n\nIt normalizes shorter version of PubSub/SQS/SNS identifier into gocloud.dev acceptable URLs.\n\nExamples:\n\n```go\ngocloudurls.NormalizePubSubURL(\"arn:aws:sns:us-east-2:123456789012:mytopic\")\n// \"awssns:///arn:aws:sns:us-east-2:123456789012:mytopic?region=us-east-2\"\n```\n\n```go\ngocloudurls.NormalizePubSubURL(\"https://sqs.us-east-2.amazonaws.com/123456789012/myqueue\")\n// \"awssqs://https://sqs.us-east-2.amazonaws.com/123456789012/myqueue?region=us-east-2\"\n```\n\n```go\ngocloudurls.NormalizePubSubURL(\"gcppubsub://myproject/mytopic\")\n// \"gcppubsub://projects/myproject/topics/mytopic\"\n```\n\n``MustNormalizePubSubURL`` raise panic if there is error.\n\n### ``func NormalizeDocStoreURL(srcUrl string, opt Option) (string, error)``\n\n```go\ntype Option struct {\n\tKeyName      string\n\tPartitionKey string\n\tCollection   string\n}\n```\n\nUsually, application uses multiple document collections (≒ table in RDB).\nSo it provides API to replace collection name by application code (config specify until DB location).\n\nDefault ``KeyName`` is ``\"_id\"`` as same as MongoDB.\n\nIf ``PartitionKey`` is specified for DynamoDB, ``KeyName`` is specified as ``sort_key``.\nThis config is ignored for other DocStores.\n\nExamples:\n\n```go\ngoclodurls.NormalizeDocStoreURL(\"mem://\", goclodurls.Option{\n    Collection: \"addresses\",\n})\n// \"mem://addresses/_id\"\n```\n\n```go\ngoclodurls.NormalizeDocStoreURL(\"firestore://my-project\", goclodurls.Option{\n    Collection: \"addresses\",\n})\n// \"firestore://projects/my-project/databases/(default)/documents/addresses?name_field=_id\"\n```\n\n```go\ngoclodurls.NormalizeDocStoreURL(\"firestore://my-project/my-documents/addresses\", goclodurls.Option{})\n// \"firestore://projects/my-project/databases/my-documents/documents/addresses?name_field=_id\"\n```\n\n```go\ngoclodurls.NormalizeDocStoreURL(\"dynamodb://\", goclodurls.Option{\n    Collection: \"tasks\",\n})\n// \"dynamodb://tasks?partition_key=_id\"\n```\n\n```go\ngoclodurls.NormalizeDocStoreURL(\"dynamodb://\", goclodurls.Option{\n    Collection:   \"tasks\",\n    PartitionKey: \"job_id\"\n})\n// \"dynamodb://tasks?partition_key=job_id\u0026sort_key=_id\"\n```\n\n``MustNormalizeDocStoreURL`` raise panic if there is error.\n\n## Struct\n\n``DynamoDBSchema`` creates AWS CLI command to create table.\n\nFor example you makes the following struct to handle DynamoDB record:\n\n```go\ntype Person struct {\n   Name string `docstore:\"name\"`\n   Age  int\n}\n```\n\nYou can get AWS command options:\n\n```go\nds, err := NewDynamoDBSchema(\u0026Person{}, MustMustNormalizeDocStoreURL(\"dynamodb://persons\"))\nds.CreateTableCommand()\n// It returns slice of string.\n// \"aws\", \"dynamodb\", \"create-table\", \"--table-name\", \"persons\",\n// \"--attribute-definitions\", \"AttributeName=name,AttributeType=S\",\n// \"--key-schema\", \"AttributeName=name,KeyType=HASH\",\n// \"--provisioned-throughput\", \"ReadCapacityUnits=5,WriteCapacityUnits=5\",\n```\n\nIf you can modify Read/Write capacity unis, you can use SchemaOption:\n\n```go\nds.CreateTableCommand(SchemaOption{\n    ReadCapacityUnits: 10,\n    WriteCapacityUnits: 10,\n})\n```\n\n## License\n\nApache 2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-architect%2Fgocloudurls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuture-architect%2Fgocloudurls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-architect%2Fgocloudurls/lists"}