{"id":13414006,"url":"https://github.com/andygrunwald/cachet","last_synced_at":"2025-03-16T20:31:08.558Z","repository":{"id":57490512,"uuid":"45300858","full_name":"andygrunwald/cachet","owner":"andygrunwald","description":"Go(lang) client library for Cachet (open source status page system).","archived":false,"fork":false,"pushed_at":"2021-06-22T17:03:41.000Z","size":76,"stargazers_count":90,"open_issues_count":1,"forks_count":14,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-02-27T13:18:29.684Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andygrunwald.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"andygrunwald","custom":"https://paypal.me/andygrunwald"}},"created_at":"2015-10-31T12:30:07.000Z","updated_at":"2025-02-11T21:32:12.000Z","dependencies_parsed_at":"2022-09-02T12:01:32.804Z","dependency_job_id":null,"html_url":"https://github.com/andygrunwald/cachet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andygrunwald%2Fcachet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andygrunwald%2Fcachet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andygrunwald%2Fcachet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andygrunwald%2Fcachet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andygrunwald","download_url":"https://codeload.github.com/andygrunwald/cachet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830912,"owners_count":20354848,"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-07-30T20:01:55.010Z","updated_at":"2025-03-16T20:31:08.258Z","avatar_url":"https://github.com/andygrunwald.png","language":"Go","readme":"# cachet\n\n[![GoDoc](https://godoc.org/github.com/andygrunwald/cachet?status.svg)](https://godoc.org/github.com/andygrunwald/cachet)\n[![Build Status](https://travis-ci.org/andygrunwald/cachet.svg?branch=master)](https://travis-ci.org/andygrunwald/cachet)\n[![Go Report Card](https://goreportcard.com/badge/github.com/andygrunwald/cachet)](https://goreportcard.com/report/github.com/andygrunwald/cachet)\n\n[Go(lang)](https://golang.org/) client library for [Cachet (open source status page system)](https://cachethq.io/).\n\n## Features\n\n* Full API support\n    * Components\n    * Incidents\n    * Metrics\n    * Subscribers\n* Various authentication methods (Basic Auth and Token based)\n* Fully tested\n\n## Installation\n\nIt is go gettable\n\n    $ go get github.com/andygrunwald/cachet\n\n(optional) to run unit / example tests:\n\n    $ cd $GOPATH/src/github.com/andygrunwald/cachet\n    $ go test -v ./...\n\n## API\n\nPlease have a look at the [GoDoc documentation](https://godoc.org/github.com/andygrunwald/cachet) for a detailed API description.\n\n### Authentication\n\nCachet supports [two different ways](https://docs.cachethq.io/docs/api-authentication) for authentication: BasicAuth and API Token.\nBoth are supported by this library.\n\nFor BasicAuth you need to call the AuthenticationService and apply your email address and your password:\n\n```go\nclient.Authentication.SetBasicAuth(\"test@test.com\", \"test123\")\n```\n\nTo use the API Token way, you do nearly the same but use the `SetTokenAuth` function:\n\n```go\nclient.Authentication.SetTokenAuth(\"MY-SECRET-TOKEN\")\n```\n\n## Examples\n\nFurther a few examples how the API can be used.\nA few more examples are available in the [GoDoc examples section](https://godoc.org/github.com/andygrunwald/cachet#pkg-examples).\n\n### Ping\n\nCall the [API test endpoint](https://docs.cachethq.io/reference#ping). Example without error handling.\nFull example available in the [GoDoc examples section](https://godoc.org/github.com/andygrunwald/cachet#pkg-examples).\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/andygrunwald/cachet\"\n)\n\nfunc main() {\n    client, _ := cachet.NewClient(\"https://demo.cachethq.io/\", nil)\n    pong, resp, _ := client.General.Ping()\n\n    fmt.Printf(\"Result: %s\\n\", pong)\n    fmt.Printf(\"Status: %s\\n\", resp.Status)\n\n    // Output: Result: Pong!\n    // Status: 200 OK\n}\n```\n\n### Create a new component\n\nCalling [/components](https://docs.cachethq.io/reference#components). Example without error handling.\nFull example available in the [GoDoc examples section](https://godoc.org/github.com/andygrunwald/cachet#pkg-examples).\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/andygrunwald/cachet\"\n)\n\nfunc main() {\n    client, _ := cachet.NewClient(\"https://demo.cachethq.io/\", nil)\n    client.Authentication.SetBasicAuth(\"test@test.com\", \"test123\")\n\n    component := \u0026cachet.Component{\n        Name:        \"Beer Fridge\",\n        Description: \"Status of the beer fridge in the kitchen\",\n        Status:      cachet.ComponentStatusOperational,\n    }\n    newComponent, resp, _ := client.Components.Create(component)\n\n    fmt.Printf(\"Result: %s\\n\", newComponent.Name)\n    if newComponent.ID \u003e 0 {\n        fmt.Println(\"ID \u003e 0!\")\n    }\n    fmt.Printf(\"Status: %s\\n\", resp.Status)\n\n    // Output: Beer Fridge\n    // ID \u003e 0!\n    // Status: 200 OK\n}\n```\n\n## Supported versions\n\nTested with [v1.2.1](https://github.com/cachethq/Cachet/releases/tag/v1.2.1) of Cachet.\nIt may works with older and / or newer versions.\nNewer versions will be supported. Older versions not.\n\n## License\n\nThis project is released under the terms of the [MIT license](http://en.wikipedia.org/wiki/MIT_License).\n\n## Contribution and Contact\n\nContribution, in any kind of way, is highly welcome!\nIt doesn't matter if you are not able to write code.\nCreating issues or holding talks and help other people to use [cachet](https://github.com/andygrunwald/cachet) is contribution, too!\nA few examples:\n\n* Correct typos in the README / documentation\n* Reporting bugs\n* Implement a new feature or endpoint\n* Sharing the love if [cachet](https://github.com/andygrunwald/cachet) and help people to get use to it\n\nIf you are new to pull requests, checkout [Collaborating on projects using issues and pull requests / Creating a pull request](https://help.github.com/articles/creating-a-pull-request/).\nIf you've found a bug, a typo, have a question or a want to request new feature, please [report it as a GitHub issue](https://github.com/andygrunwald/cachet/issues).\n\nFor other queries, i'm available on Twitter ([@andygrunwald](https://twitter.com/andygrunwald)).\n","funding_links":["https://github.com/sponsors/andygrunwald","https://paypal.me/andygrunwald"],"categories":["Utility","Third-party APIs","第三方 APIs","第三方api","第三方API`第三方API 汇总`","\u003cspan id=\"第三方api-third-party-apis\"\u003e第三方API Third-party APIs\u003c/span\u003e","第三方API"],"sub_categories":["Utility/Miscellaneous","Fail injection","HTTP Clients","高級控制台界面","实用程序/Miscellaneous","查询语","Advanced Console UIs","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","交流","高级控制台界面"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandygrunwald%2Fcachet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandygrunwald%2Fcachet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandygrunwald%2Fcachet/lists"}