Categorygithub.com/speakeasy-sdks/snyk-go
repositorypackage
0.24.0
Repository: https://github.com/speakeasy-sdks/snyk-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Go SDK for Synk API

The Snyk API v1 has the ability to test a package for issues as they are defined by Snyk, and to provide Snyk security automation according to your own workflows, unconstrained by security processes in Snyk products. Customers and partners can perform functions including

SDK Installation

go get github.com/speakeasy-sdks/snyk-go

Authentication

To use the Snyk API, you must first get your API token from Snyk. Go to the General Account Settings in your Snyk account. In the KEY field, click to show and then select and copy your API token. Refer to the screenshot that follows. To use the Snyk API, supply the token in an Authorization header, preceded by Token: Authorization: Token API_KEY

For more information about authentication, refer to the overview in the API reference docs. For additional information see Revoking and regenerating Snyk API tokens.

snyk

SDK Example Usage

package main

import(
	"context"
	"log"
	"github.com/speakeasy-sdks/snyk-go"
	"github.com/speakeasy-sdks/snyk-go/pkg/models/operations"
)

func main() {
    s := snyk.New()

    ctx := context.Background()
    res, err := s.DeleteConnection(ctx, operations.DeleteConnectionRequestBody{
        AccessToken: snyk.String("corrupti"),
    }, operations.DeleteConnectionSecurity{
        VesselAPIToken: "YOUR_API_KEY_HERE",
    })
    if err != nil {
        log.Fatal(err)
    }

    if res.DeleteConnection200ApplicationJSONString != nil {
        // handle response
    }
}

Available Resources and Operations

Snyk SDK

SDK Generated by Speakeasy