Skip to content

benson09/statusio-go

 
 

Repository files navigation

Statusio

GoDoc TravisCI

Statusio is a simple, transparent Go package for accessing version 2.0 of Status.io API.

Successful API queries return native Go structs that can be used immediately, with no need for type assertions.

Examples

Authentication

If you already have the API ID and API KEY for your user, creating the client is simple:

api := statusio.NewStatusioApi("your-api-id", "your-api-key")

Queries

Executing queries is simple

statusSummary, err := api.StatusSummary("your-statuspage-id")
if err != nil {
    log.Fatal(err)
}
fmt.Println(result.Result.Status[0].Containers[0].Status)

Endpoints

statusio` implements most of the endpoints defined in the Status.io documentation: http://developers.status.io

For clarity, in most cases, the function name is simply the name of the endpoint (e.g., the endpoint status/summary is provided by the function StatusSummary).

Error Handling

Service and network errors are returned as vanilla error.

About

Official Go library for Status.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%