{"id":18594697,"url":"https://github.com/ernitingarg/blockchain-functions-golang","last_synced_at":"2025-05-16T12:13:09.423Z","repository":{"id":165084353,"uuid":"549040925","full_name":"ernitingarg/blockchain-functions-golang","owner":"ernitingarg","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-10T15:25:49.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T22:46:29.715Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ernitingarg.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}},"created_at":"2022-10-10T15:24:51.000Z","updated_at":"2023-10-21T12:28:12.000Z","dependencies_parsed_at":"2023-07-21T01:26:34.781Z","dependency_job_id":null,"html_url":"https://github.com/ernitingarg/blockchain-functions-golang","commit_stats":null,"previous_names":["ernitingarg/blockchain-functions-golang"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernitingarg%2Fblockchain-functions-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernitingarg%2Fblockchain-functions-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernitingarg%2Fblockchain-functions-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernitingarg%2Fblockchain-functions-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ernitingarg","download_url":"https://codeload.github.com/ernitingarg/blockchain-functions-golang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254527099,"owners_count":22085919,"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-07T01:16:41.952Z","updated_at":"2025-05-16T12:13:04.414Z","avatar_url":"https://github.com/ernitingarg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Soteria Blokchain Functions\n\n## Dependencies\n\n- Google cloud SDK\n- Go (1.11 or higher)\n\n## Prerequisites\n\nMake sure to be logged in to GCP in your cli\n```\ngcloud auth login\n```\nIn order to run the function locally, you need to have the default credentials set.\nThe easiest way to go is via gcloud cli:\n```\ngcloud auth application-default login\n```\nNow you should be able to boot a local server that can run your functions like this:\n```\nmake serve\n```\n## Usage\n\nUse make file for easier commands\n\n### Functions management\n\n#### 1. Deploy a function:\n\n------------\nDeploy a function into GCP `Cloud Functions`\n```\n# for dev/staging environment\nmake deploy-fn fn=\u003cYOUR_FUNC_NAME\u003e\n\n# for prod\nmake deploy-fn-prod fn=\u003cYOUR_FUNC_NAME\u003e\n```\n#### 2. Call a function\n----------------\nCalls a function hosted in GCP `Cloud Functions` from your local\n```\n# for dev/staging environment\nmake call-fn fn=\u003cYOUR_FUNC_NAME\u003e\n\n# for prod\nmake call-fn-prod fn=\u003cYOUR_FUNC_NAME\u003e\n```\n\n### 3. Run a function from local server\n-----------------\nAfter booting up a local server, you can use curl or postman to run any function defined locally even if it is not deployed yet.\nMake sure to have default credentials and the server running first.\n```\ncurl http://localhost:8080/\u003cYOUR_FUNC_NAME\u003e\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fernitingarg%2Fblockchain-functions-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fernitingarg%2Fblockchain-functions-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fernitingarg%2Fblockchain-functions-golang/lists"}