# README
opslevel-go

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: "[email protected]",
},
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
.
# Functions
NewClient returns a Client pointer.
WithBaseURL modifies the Client baseURL.
WithHTTPClient modifies the Client http.Client.
# Structs
CheckRequest represents a structured request to the OpsLevel checks webhook endpoint.
Client represents a rest http client and is used to send requests to OpsLevel integrations.
Commit represents the commit being deployed.
Deployer represents the entity taking the action.
DeployRequest represents a structured request to the OpsLevel deploys webhook endpoint.
PayloadRequest represents a structured request to the OpsLevel payload webhook endpoint.
# Type aliases
ClientOption modifies fields on a Client.