{"id":36484742,"url":"https://github.com/getoctane/octane-go","last_synced_at":"2026-01-12T01:44:59.798Z","repository":{"id":37798467,"uuid":"391812136","full_name":"getoctane/octane-go","owner":"getoctane","description":"Go library providing programatic access to the Octane API","archived":false,"fork":false,"pushed_at":"2023-12-22T19:21:36.000Z","size":2836,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-22T19:10:39.517Z","etag":null,"topics":["api","billing","go","go-library","go-module","golang","golang-library","octane"],"latest_commit_sha":null,"homepage":"https://getoctane.io","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/getoctane.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":"2021-08-02T04:11:15.000Z","updated_at":"2023-04-17T22:11:43.000Z","dependencies_parsed_at":"2023-12-05T03:22:40.551Z","dependency_job_id":"92060c9b-0214-4602-8063-40e192dc064d","html_url":"https://github.com/getoctane/octane-go","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/getoctane/octane-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getoctane%2Foctane-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getoctane%2Foctane-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getoctane%2Foctane-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getoctane%2Foctane-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getoctane","download_url":"https://codeload.github.com/getoctane/octane-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getoctane%2Foctane-go/sbom","scorecard":{"id":424497,"data":{"date":"2025-08-11","repo":{"name":"github.com/getoctane/octane-go","commit":"b7d0798e9bfcda0e86fc92ef1b13bac1716ba028"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"Code-Review","score":6,"reason":"Found 15/23 approved changesets -- score normalized to 6","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build-pr.yml:1","Warn: no topLevel permission defined: .github/workflows/build.yml:1","Info: no jobLevel write permissions found"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-pr.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/getoctane/octane-go/build-pr.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/getoctane/octane-go/build.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"26 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2021-0052 / GHSA-h395-qcrw-5vmq","Warn: Project is vulnerable to: GHSA-3vp4-m3rf-835h","Warn: Project is vulnerable to: GO-2023-1737 / GHSA-2c4m-59x9-fr2g","Warn: Project is vulnerable to: GO-2021-0227 / GHSA-3vm4-22fp-5rfm","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2022-0236 / GHSA-h86h-8ppg-mxmh","Warn: Project is vulnerable to: GO-2021-0238 / GHSA-83g2-8m93-v3w7","Warn: Project is vulnerable to: GO-2022-0288","Warn: Project is vulnerable to: GO-2022-0969 / GHSA-69cg-p879-7622","Warn: Project is vulnerable to: GO-2022-1144 / GHSA-xrjj-mj9h-534m","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"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-19T01:57:26.819Z","repository_id":37798467,"created_at":"2025-08-19T01:57:26.820Z","updated_at":"2025-08-19T01:57:26.820Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","billing","go","go-library","go-module","golang","golang-library","octane"],"created_at":"2026-01-12T01:44:59.148Z","updated_at":"2026-01-12T01:44:59.791Z","avatar_url":"https://github.com/getoctane.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Octane Go Library\n\n[![GoDoc](https://godoc.org/github.com/getoctane/octane-go?status.svg)](https://godoc.org/github.com/getoctane/octane-go)\n[![GitHub Actions status](https://github.com/getoctane/octane-go/workflows/build/badge.svg)](https://github.com/getoctane/octane-go/actions?query=workflow%3Abuild+)\n\n[![Octane](./octane.png)](https://www.getoctane.io/)\n\nThe **[Octane](https://www.getoctane.io/)** Go library provides programmatic access\nto the Octane API for Go applications.\n\n---\n\n- [Getting started](#getting-started)\n- [Example apps](#example-apps)\n- [Making API calls](#making-api-calls)\n    - [Customers API](#customers-api)\n        - [Example: Creating a new customer](#example-creating-a-new-customer)\n        - [Example: Subscribe a customer to a price plan](#example-subscribe-a-customer-to-a-price-plan)\n    - [Meters API](#meters-api)\n        - [Example: Creating a new meter](#example-creating-a-new-meter)\n    - [Price Plans API](#price-plans-api)\n        - [Example: Creating a new price plan](#example-creating-a-new-price-plan)\n    - [Measurements API](#measurements-api)\n        - [Example: Sending a measurement](#example-sending-a-measurement)\n- [Development](#development)\n- [Contributing](#contributing)\n\n## Getting started\n\nFirst, obtain an API key from within the [Octane portal](http://cloud.getoctane.io/), and set it in your environment:\n\n```shell\nexport OCTANE_API_KEY=\"\u003cinsert_octane_api_key_here\u003e\"\n```\n\nThen, from within your application, import the module and create a client:\n\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\t\"github.com/getoctane/octane-go\"\n)\n\nfunc main() {\n\tclient := octane.NewClient(os.Getenv(\"OCTANE_API_KEY\"))\n\t// ...\n}\n```\n\nUpdate your project's `go.mod` to include the new import, and vendor the dependencies:\n\n```shell\ngo mod tidy \u0026\u0026 go mod vendor\n```\n\n## Example apps\n\nThe following demo applications found in the [examples/](./examples/) directory display\nhow to use the Octane Go library in real-world settings:\n\n- [antler-db-cloud-shop](examples/antler-db-cloud-shop/) - Enable your customers to self-service various cloud resources\n- [customer-hours-tracker](./examples/customer-hours-tracker/) - Track hours spent working on freelance projects\n\n## Making API calls\n\nThe `Client` type (returned by `octane.NewClient(\"\u003ctoken\u003e\")`)\nprovides programmatic access to the Octane API.\n\n### Customers API\n\nThe `Customers` namespace on a `Client` instance provides the ability to\nmake calls to the Octane Customers API.\n\n#### Example: Creating a new customer\n\n```go\ncustomerName := \"r2d2\"\n\nargs := octane.CreateCustomerArgs{\n    Name: customerName,\n    MeasurementMappings: []octane.CustomerMeasurementMappingInputArgs{\n        {\n            Label:      \"customer_name\",\n            ValueRegex: customerName,\n        },\n    },\n}\n\ncustomer, resp, err := client.Customers.Create(args)\n```\n\n#### Example: Subscribe a customer to a price plan\n\n```go\ncustomerName := \"r2d2\"\n\nargs := octane.CreateSubscriptionArgs{\n    PricePlanName: \"droidplan\",\n}\n\nsubscription, resp, err := client.Customers.CreateSubscription(customerName, args)\n```\n\n### Meters API\n\nThe `Meters` namespace on a `Client` instance provides the ability to\nmake calls to the Octane Meters API.\n\n#### Example: Creating a new meter\n\n```go\nmeterName := \"droidrepairs\"\n\nargs := octane.MeterInputArgs{\n    Name:           meterName,\n    MeterType:      \"COUNTER\",\n    IsIncremental:  true,\n    ExpectedLabels: []string{\"customer_name\"},\n}\n\nmeter, resp, err := client.Meters.Create(args)\n```\n\n### Price Plans API\n\nThe `PricePlans` namespace on a `Client` instance provides the ability to\nmake calls to the Octane Price Plans API.\n\n#### Example: Creating a new price plan\n\n```go\npricePlanName := \"droidplan\"\npricePlanRate := 10000 // $100.00\nmeterName := \"droidrepairs\"\n\nargs := octane.CreatePricePlanArgs{\n    Name:   pricePlanName,\n    Period: \"month\",\n    MeteredComponents: []octane.MeteredComponentInputArgs{\n        {\n            MeterName: meterName,\n            PriceScheme: \u0026octane.PriceSchemeInputArgs{\n                Prices: []octane.PriceInputArgs{\n                    {\n                        Price: float64(pricePlanRate),\n                    },\n                },\n                SchemeType: \"FLAT\",\n            },\n        },\n    },\n}\n\npricePlan, resp, err := client.PricePlans.Create(args)\n```\n\n### Measurements API\n\nThe `Measurements` namespace on a `Client` instance provides the ability to\nmake calls to the Octane Measurements API.\n\n#### Example: Sending a measurement\n\n```go\nmeterName := \"droidrepairs\"\ncustomerName := \"r2d2\"\n\nargs := octane.Measurement{\n    MeterName: meterName,\n    Value: 1,\n    Labels: map[string]string{\n        \"customer_name\": customerName,\n    },\n}\n\nmeasurement, resp, err := client.Measurements.Create(args)\n```\n\n## Development\n\nIn the root of this repo, download required dependencies:\n\n```shell\ngo mod vendor\n```\n\nTo regenerate files in `internal/swagger/` from latest\nOctane OpenAPI spec, run the following (requires Docker):\n\n```shell\nmake codegen\n```\n\nThese files should then be checked into git:\n\n```shell\ngit add internal/swagger/\n```\n\n## Contributing\n\nContributions are welcome!\n\nPrior to submitting a \n[pull request](https://github.com/getoctane/octane-go/pulls), please\ncheck the list of [open issues](https://github.com/getoctane/octane-go/issues).\nIf there is not an existing issue related to your changes, please open a\nnew issue to first discuss your thoughts with the project maintainers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetoctane%2Foctane-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetoctane%2Foctane-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetoctane%2Foctane-go/lists"}