Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
/ opslevel-go Public archive

A Go client for the OpsLevel Integrations API

License

Notifications You must be signed in to change notification settings

segmentio/opslevel-go

Repository files navigation

opslevel-go CircleCI Go Report Card GoDoc

opslevel-go is a client library for the OpsLevel integrations API

To get started create a new client:

client := opslevel.NewClient()

Deploys Integration

The Deploys Integration requires the following fields:

deployRequest := opslevel.DeployRequest{
    Service:     "my_service",
    Description: "my_service was deployed",
    Deployer: rest.Deployer{
        Email: "deployer@myapp.com",
    },
    Environment: "env",
    DeployedAt:  time.Now(),
}
err := client.Deploy(deployRequest, "my-integration-uuid")

For a full list fields, see the docs.

Checks Integration

The Deploys Integration requires the following fields:

checkRequest := CheckRequest{
    Service: "my_service",
    Check:   "my_check",
    Message: "Checks passed",
    Status:  "passed",
}
err := client.Check(checkRequest, "my-integration-uuid")

The Message field is optional and Status should be one of passed or failed.