Releases: OpsLevel/opslevel-go
v2025.7.28
July 28, 2025
Feature
- Allow the HTTP transport of GraphQL and REST clients to be overridden
- Add Contacts to User
- Add SearchTeams, which allows providing a search term to search for teams by name
- Add
ListServicesWithInputFilter
method for constructing service queries with ad hoc filters.
Dependency
- Bump github.com/hashicorp/go-retryablehttp from 0.7.7 to 0.7.8
- Bump github.com/hasura/go-graphql-client from 0.14.3 to 0.14.4
v2025.6.13
June 13, 2025
Feature
- Add
client.GetServiceStats
function, which includes Rubric and CheckResults data to retrieve maturity report information for a service - Add support for Campaigns and client.ListCampaigns
Removed
- [Breaking change] Removed Check from CheckResult and replaced with CheckId. This prevents loops when working with Level
Dependency
- Bump github.com/stretchr/testify from 1.8.4 to 1.10.0
v2025.5.28
May 28, 2025
Feature
- Add error codes for different types of error to support better client error handling
- Add a function on the Service object to get the system of that service
- Add
client.CreateOrUpdateAlertSource
andclient.UpdateAlertSourceStatus
to interface with the new generic alert source APIs - Add
client.InvokeAction
to support triggering actions via the API - Add utility function to service struct to
GetLastDeploy
event - Add client functions to create, get, list, update and delete "RelationshipDefinition"'s
- Add ability to create and delete relationships
- Add ability to configure sbom generation on Repository Update
- Add maturity report Overall Level to ListServices
- Move user 'name' to 'UserId' struct so it comes out in the CLI
Docs
- Update docs on input types to include their default value
Dependency
- Bump github.com/go-playground/validator/v10 from 10.24.0 to 10.25.0
- Bump github.com/rs/zerolog from 1.33.0 to 1.34.0
- Bump github.com/go-playground/validator/v10 from 10.25.0 to 10.26.0
- Bump golang.org/x/crypto from 0.32.0 to 0.35.0
- Bump github.com/hasura/go-graphql-client from 0.13.1 to 0.14.3
v2025.2.10
February 10, 2025
Welcome to 2025! With this release of opslevel-go we have made a series of breaking changes in opslevel-go around how we handle pushing "null" through to our API. Historically we've not been able to do this consistently on input type fields because JSON struct tags omitempty
works differently depending on the target field type, especially when you get pointers involved. Additionally some of our API mutations for update differentiate functionality between null
and ""
(empty) - which gets even more complicated by custom scalar types and such.
So for nearly every input type field we need 4 logical states the field can be in:
- not present in the json variables
- present but json
null
AKA "unset" during update mutations - present but empty state
- present but filled state
For example with a string
type this is not possible today with only *string
so we've introduced a new wrapper type Nullable[T]
that has special JSON marshalling that gives us the 2nd state above - present but json null
This is a pretty big sweeping change to opslevel-go and any usages of it are going to need a refactor when you build out the data for your input types. Where before you might have had:
desc := "Hello World"
input := opslevel.DomainInput{
Description: &desc
}
you will now need
input := opslevel.DomainInput{
Description: opslevel.RefOf("Hello World")
}
For types other then standard go types it may become a bit more complicated. Please check out the tests for the resource types you are having issues with to get a sense for what you need to do.
Codegen
Additionally if you've been following the project for a while you'll know what we've been trying to codegenerate the client library for sometime now. 2025 takes us 1 step closer to having more structures under code generation. Additionally we've moved the codegen out to a separate repository - https://github.com/OpsLevel/client-gen
Over the course of 2025 we will continue to keep pushing more and more of the client library to be generated and we may take on expanding that out to other languages - python, javascript, rust, etc
Feature
- 'metadata' field has been added to AlertSource struct
- 'description' field has been added to Category struct
- Struct 'Scorecard' has been updated to match all the fields possible in the API
- Add ability to CRUD 'ComponentType'
- Add aliases functions for CRUD components that use the old services CRUD functions
- Add support for the
provisionedBy
field on User type
Refactor
- BREAKING CHANGE: "Nullable" type now wraps some optional struct fields of API input objects. This "Nullable" type enables fields to be set to the JSON "null" value.
- convert enum consts into vars for easier pointer referencing
- enums converted from consts to vars, e.g. opslevel.RefOf(opslevel.AlertSourceTypeEnumDatadog) should now be &opslevel.AlertSourceTypeEnumDatadog
- BREAKING CHANGE: 'OpsLevelErrors' has been renamed to 'Error'
- BREAKING CHANGE: Struct 'GoogleCloudProject' fields
ID
andURL
are nowId
andUrl
respectively - Field 'ChecksCount' has been renamed to 'TotalChecks' on the struct 'Scorecard' to match the API definition
- Field 'ID' on struct 'Secret' has been renamed to 'Id' for consistency
- BREAKING CHANGE: struct 'OpsLevelWarnings' was renamed to 'Warning'
- BREAKING CHANGE: client.GetService now properly takes in an identifier and calls the appropreate queries for alias or id
- BREAKING CHANGE: the
notes
field on check input types doesn't supportnull
only""
and"filled"
values or not present.
Removed
- removed NullableString func, no longer used
Dependency
- Bump github.com/gosimple/slug from 1.14.0 to 1.15.0
- Bump github.com/go-playground/validator/v10 from 10.23.0 to 10.24.0
- Bump github.com/go-resty/resty/v2 from 2.16.2 to 2.16.5
v2024.12.24
December 24, 2024
Dependency
- Bump goreleaser/goreleaser-action from 6.0.0 to 6.1.0
- Bump codecov/codecov-action from 4 to 5
- Bump github.com/go-playground/validator/v10 from 10.22.1 to 10.23.0
- Bump github.com/go-resty/resty/v2 from 2.15.3 to 2.16.2
- Bump opslevel/report-deploy-github-action from 1.0.0 to 2.0.0
- Bump opslevel/report-deploy-github-action from 2.0.0 to 3.0.0
- Bump golang.org/x/crypto from 0.26.0 to 0.31.0
v2024.11.8
November 08, 2024
Refactor
- BREAKING CHANGE revert ServiceCreateInput and ServiceUpdateInput YAML struct tags back to before 2024 convention
v2024.10.28
October 28, 2024
Bugfix
- BREAKING CHANGE: CheckPackageVersionUpdateInput changed to allow MissingPackageResult to be nullable
Feature
- add CodeIssue check type
- Add new 'Aliasable' interface for working with resources that are allowed to have aliases
Dependency
- Bump github.com/relvacode/iso8601 from 1.4.0 to 1.5.0
v2024.10.15
v2024.10.11
October 11, 2024
Feature
- add regionOverride field to AWS integration, for overriding multiple regions
- new
IntegrationReactivate
mutation to reactivate an invalidated or deactivated integration - added HasBadHttpStatus for better error handling
Refactor
- BREAKING CHANGE: new argument sendInvite added to UserInvite() method to force send a user invite e-mail
Dependency
- Bump github.com/go-playground/validator/v10 from 10.22.0 to 10.22.1
- Bump github.com/hasura/go-graphql-client from 0.13.0 to 0.13.1
- Bump github.com/go-resty/resty/v2 from 2.14.0 to 2.15.3