diff --git a/README.md b/README.md index c395970..b960487 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # ngrok API client library for Golang [![CI](https://github.com/ngrok/ngrok-api-go/actions/workflows/ci.yml/badge.svg)](https://github.com/ngrok/ngrok-api-go/actions/workflows/ci.yml) -[![Go Reference](https://pkg.go.dev/badge/github.com/ngrok/ngrok-api-go.svg)](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v5) +[![Go Reference](https://pkg.go.dev/badge/github.com/ngrok/ngrok-api-go.svg)](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v6) This library wraps the [ngrok HTTP API](https://ngrok.com/docs/api) to make it easier to consume in Go. @@ -13,7 +13,7 @@ For creating ngrok tunnels directly from your Go application, check out the [ngr Installation is as simple as using `go get`. - go get github.com/ngrok/ngrok-api-go/v5 + go get github.com/ngrok/ngrok-api-go/v6 ## Support @@ -21,11 +21,11 @@ The best place to get support using this library is through the [ngrok Slack Com ## Documentation -A quickstart guide and a full API reference are included in the [ngrok go API documentation on pkg.go.dev](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v5) +A quickstart guide and a full API reference are included in the [ngrok go API documentation on pkg.go.dev](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v6) ## Quickstart -Please consult the [documentation](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v5) for additional examples. +Please consult the [documentation](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v6) for additional examples. ### Create an IP Policy that allows traffic from some subnets @@ -37,9 +37,9 @@ import ( "fmt" "os" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/ip_policies" - "github.com/ngrok/ngrok-api-go/v5/ip_policy_rules" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/ip_policies" + "github.com/ngrok/ngrok-api-go/v6/ip_policy_rules" ) func main() { @@ -85,8 +85,8 @@ import ( "fmt" "os" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/tunnels" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/tunnels" ) func main() { diff --git a/abuse_reports/client.go b/abuse_reports/client.go index 8ce728d..3414e33 100644 --- a/abuse_reports/client.go +++ b/abuse_reports/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // Abuse Reports allow you to submit take-down requests for URLs hosted by diff --git a/agent_ingresses/client.go b/agent_ingresses/client.go index cf6fd5c..01ba809 100644 --- a/agent_ingresses/client.go +++ b/agent_ingresses/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/api_keys/client.go b/api_keys/client.go index 6a221a5..728be02 100644 --- a/api_keys/client.go +++ b/api_keys/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // API Keys are used to authenticate to the ngrok diff --git a/application_sessions/client.go b/application_sessions/client.go index f35ee5a..0e84685 100644 --- a/application_sessions/client.go +++ b/application_sessions/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/application_users/client.go b/application_users/client.go index 28dfb69..895b192 100644 --- a/application_users/client.go +++ b/application_users/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/backends/failover/client.go b/backends/failover/client.go index c9a8d88..63839e4 100644 --- a/backends/failover/client.go +++ b/backends/failover/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // A Failover backend defines failover behavior within a list of referenced diff --git a/backends/http_response/client.go b/backends/http_response/client.go index 63e165e..29de365 100644 --- a/backends/http_response/client.go +++ b/backends/http_response/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/backends/static_address/client.go b/backends/static_address/client.go index 6dd0a82..58ef0cc 100644 --- a/backends/static_address/client.go +++ b/backends/static_address/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // A static backend sends traffic to a TCP address (hostname and port) that diff --git a/backends/tunnel_group/client.go b/backends/tunnel_group/client.go index f25450e..6008039 100644 --- a/backends/tunnel_group/client.go +++ b/backends/tunnel_group/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // A Tunnel Group Backend balances traffic among all online tunnels that match diff --git a/backends/weighted/client.go b/backends/weighted/client.go index 6e5e633..5bb557b 100644 --- a/backends/weighted/client.go +++ b/backends/weighted/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // A Weighted Backend balances traffic among the referenced backends. Traffic diff --git a/bot_users/client.go b/bot_users/client.go index ccd565b..86062b4 100644 --- a/bot_users/client.go +++ b/bot_users/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/certificate_authorities/client.go b/certificate_authorities/client.go index 1b1cfd4..3dd87e0 100644 --- a/certificate_authorities/client.go +++ b/certificate_authorities/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // Certificate Authorities are x509 certificates that are used to sign other diff --git a/credentials/client.go b/credentials/client.go index 23a6d2f..78cf360 100644 --- a/credentials/client.go +++ b/credentials/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // Tunnel Credentials are ngrok agent authtokens. They authorize the ngrok diff --git a/doc.go b/doc.go index 814a06d..a6a26d1 100644 --- a/doc.go +++ b/doc.go @@ -6,41 +6,40 @@ // // Full documentation of the ngrok API can be found at: https://ngrok.com/docs/api // -// Versioning +// # Versioning // // This package follows the best practices outlined for Go modules. All releases // are tagged and any breaking changes will be reflected as a new major // version. You should only import this package for production applications by // pointing at a stable tagged version. // -// Quickstart +// # Quickstart // // The following example code demonstrates typical initialization and usage of // the package to make an API call: // -// import ( -// "context" -// "fmt" -// "math/rand" -// -// "github.com/ngrok/ngrok-api-go/v5" -// "github.com/ngrok/ngrok-api-go/v5/reserved_domains" -// ) -// -// func example(ctx context.Context) error { -// domains := reserved_domains.NewClient(ngrok.NewClientConfig("")) -// d, err := domains.Create(ctx, &ngrok.ReservedDomainCreate{ -// Name: fmt.Sprintf("hello-gopher-%x", rand.Int()), -// }) -// if err != nil { -// return err -// } -// fmt.Println("reserved domain", d.Domain) -// return nil -// } -// -// -// Package Layout and API Clients +// import ( +// "context" +// "fmt" +// "math/rand" +// +// "github.com/ngrok/ngrok-api-go/v6" +// "github.com/ngrok/ngrok-api-go/v6/reserved_domains" +// ) +// +// func example(ctx context.Context) error { +// domains := reserved_domains.NewClient(ngrok.NewClientConfig("")) +// d, err := domains.Create(ctx, &ngrok.ReservedDomainCreate{ +// Name: fmt.Sprintf("hello-gopher-%x", rand.Int()), +// }) +// if err != nil { +// return err +// } +// fmt.Println("reserved domain", d.Domain) +// return nil +// } +// +// # Package Layout and API Clients // // API client configuration and all of the datatypes exchanged by the API are // defined in this base package. There are subpackages for every API service @@ -51,21 +50,20 @@ // It is recommended to construct the service-specific clients once at // initialization time. // -// import ( -// "github.com/ngrok/ngrok-api-go/v5" -// "github.com/ngrok/ngrok-api-go/v5/ip_policies" -// "github.com/ngrok/ngrok-api-go/v5/ip_policy_rules" -// ) -// -// // Construct the root api Client object -// apiClientConfig := ngrok.NewClientConfig("") +// import ( +// "github.com/ngrok/ngrok-api-go/v6" +// "github.com/ngrok/ngrok-api-go/v6/ip_policies" +// "github.com/ngrok/ngrok-api-go/v6/ip_policy_rules" +// ) // -// // then construct service-specific clients -// policies := ip_policies.NewClient(apiClientConfig) -// rules := ip_policy_rules.NewClient(apiClientConfig) +// // Construct the root api Client object +// apiClientConfig := ngrok.NewClientConfig("") // +// // then construct service-specific clients +// policies := ip_policies.NewClient(apiClientConfig) +// rules := ip_policy_rules.NewClient(apiClientConfig) // -// Functional Option Configuration +// # Functional Option Configuration // // The ClientConfig object in the root package supports functional options for // configuration. The most common option to use is `WithHTTPClient()` which @@ -73,10 +71,9 @@ // the caller full customization over the transport if needed for use with // proxies, custom TLS setups, observability and tracing, etc. // -// ngrokAPI := ngrok.NewClientConfig("", ngrok.WithHTTPClient(yourHTTPClient)) +// ngrokAPI := ngrok.NewClientConfig("", ngrok.WithHTTPClient(yourHTTPClient)) // -// -// Nullable arguments +// # Nullable arguments // // Some arguments to methods in the ngrok API are optional and must be // meaningfully distinguished from zero values, especially in Update() methods. @@ -86,14 +83,13 @@ // types and providing convenince functions like ngrok.String() and // ngrok.Bool() for the caller to wrap literals as pointer values. For example: // -// creds := credentials.NewClient(ngrok.NewClientConfig("")) -// c, err := creds.Update(ctx, &ngrok.CredentialUpdate{ -// ID: "cr_1kYzunEyn6XHHlqyMBLrj5nxkoz", -// Description: ngrok.String("this optional description is a pointer to a string"), -// }) -// +// creds := credentials.NewClient(ngrok.NewClientConfig("")) +// c, err := creds.Update(ctx, &ngrok.CredentialUpdate{ +// ID: "cr_1kYzunEyn6XHHlqyMBLrj5nxkoz", +// Description: ngrok.String("this optional description is a pointer to a string"), +// }) // -// Automatic Paging +// # Automatic Paging // // All List methods in the ngrok API are paged. This package abstracts that // problem away from you by returning an iterator from any List API call. As @@ -105,17 +101,16 @@ // after Next() returns false to determine if the iterator failed to fetch the // next page of results. // -// certs := tls_certificates.NewClient(ngrok.NewClientConfig("")) -// certsIter := certs.List(nil) -// for certsIter.Next(ctx) { -// fmt.Println(certsIter.Item()) -// } -// if err := certsIter.Err(); err != nil { -// return err -// } -// +// certs := tls_certificates.NewClient(ngrok.NewClientConfig("")) +// certsIter := certs.List(nil) +// for certsIter.Next(ctx) { +// fmt.Println(certsIter.Item()) +// } +// if err := certsIter.Err(); err != nil { +// return err +// } // -// Error Handling +// # Error Handling // // All errors returned by the ngrok API are returned as structured payloads for // easy error handling. Most non-networking errors returned by API calls in @@ -128,34 +123,33 @@ // IsNotFound and IsErrorCode. IsNotFound helps identify the common case of // accessing an API resource that no longer exists: // -// domains := reserved_domains.NewClient(ngrok.NewClientConfig("")) -// d, err := domains.Get(ctx, "rd_1bXG9oRzwO4wECTdws3hlVw6jCg") -// switch { -// case ngrok.IsNotFound(err): -// // maybe this is an expected condition -// case err != nil: -// return err -// } +// domains := reserved_domains.NewClient(ngrok.NewClientConfig("")) +// d, err := domains.Get(ctx, "rd_1bXG9oRzwO4wECTdws3hlVw6jCg") +// switch { +// case ngrok.IsNotFound(err): +// // maybe this is an expected condition +// case err != nil: +// return err +// } // // IsErrorCode helps you identify specific ngrok errors by their unique ngrok // error code. All ngrok error codes are documented at // https://ngrok.com/docs/errors To check for a specific error condition, you // would structure your code like the following example: // -// domains := reserved_domains.NewClient(ngrok.NewClientConfig("")) -// d, err := domains.Create(ctx, &ngrok.ReservedDomainCreate{ -// Region: "invalid", -// Name: "gopher", -// }) -// switch { -// case ngrok.IsErrorCode(err, 400): -// // handle this error -// case err != nil: -// return err -// } -// -// -// Pretty Printing +// domains := reserved_domains.NewClient(ngrok.NewClientConfig("")) +// d, err := domains.Create(ctx, &ngrok.ReservedDomainCreate{ +// Region: "invalid", +// Name: "gopher", +// }) +// switch { +// case ngrok.IsErrorCode(err, 400): +// // handle this error +// case err != nil: +// return err +// } +// +// # Pretty Printing // // All ngrok datatypes in this package define String() and GoString() methods // so that they can be formatted into strings in helpful representations. The diff --git a/edge_modules/https_edge_mutual_tls/client.go b/edge_modules/https_edge_mutual_tls/client.go index 463d75c..79736bc 100644 --- a/edge_modules/https_edge_mutual_tls/client.go +++ b/edge_modules/https_edge_mutual_tls/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_backend/client.go b/edge_modules/https_edge_route_backend/client.go index 747f714..c2b0321 100644 --- a/edge_modules/https_edge_route_backend/client.go +++ b/edge_modules/https_edge_route_backend/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_circuit_breaker/client.go b/edge_modules/https_edge_route_circuit_breaker/client.go index e168d6e..e75ca36 100644 --- a/edge_modules/https_edge_route_circuit_breaker/client.go +++ b/edge_modules/https_edge_route_circuit_breaker/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_compression/client.go b/edge_modules/https_edge_route_compression/client.go index 7bb0dc0..3172424 100644 --- a/edge_modules/https_edge_route_compression/client.go +++ b/edge_modules/https_edge_route_compression/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_ip_restriction/client.go b/edge_modules/https_edge_route_ip_restriction/client.go index 143bc1f..1b37748 100644 --- a/edge_modules/https_edge_route_ip_restriction/client.go +++ b/edge_modules/https_edge_route_ip_restriction/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_oauth/client.go b/edge_modules/https_edge_route_oauth/client.go index 3c4dc74..7c7e3a9 100644 --- a/edge_modules/https_edge_route_oauth/client.go +++ b/edge_modules/https_edge_route_oauth/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_oidc/client.go b/edge_modules/https_edge_route_oidc/client.go index 6981de4..f136231 100644 --- a/edge_modules/https_edge_route_oidc/client.go +++ b/edge_modules/https_edge_route_oidc/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_request_headers/client.go b/edge_modules/https_edge_route_request_headers/client.go index 1716a2c..f538d51 100644 --- a/edge_modules/https_edge_route_request_headers/client.go +++ b/edge_modules/https_edge_route_request_headers/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_response_headers/client.go b/edge_modules/https_edge_route_response_headers/client.go index 0ef510c..b45c84a 100644 --- a/edge_modules/https_edge_route_response_headers/client.go +++ b/edge_modules/https_edge_route_response_headers/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_saml/client.go b/edge_modules/https_edge_route_saml/client.go index 9950ba2..8e2579b 100644 --- a/edge_modules/https_edge_route_saml/client.go +++ b/edge_modules/https_edge_route_saml/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_traffic_policy/client.go b/edge_modules/https_edge_route_traffic_policy/client.go index 5955cc5..fbe19e9 100644 --- a/edge_modules/https_edge_route_traffic_policy/client.go +++ b/edge_modules/https_edge_route_traffic_policy/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_user_agent_filter/client.go b/edge_modules/https_edge_route_user_agent_filter/client.go index cf0b9be..fc9e8a8 100644 --- a/edge_modules/https_edge_route_user_agent_filter/client.go +++ b/edge_modules/https_edge_route_user_agent_filter/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_webhook_verification/client.go b/edge_modules/https_edge_route_webhook_verification/client.go index 1d56cee..20bdf1f 100644 --- a/edge_modules/https_edge_route_webhook_verification/client.go +++ b/edge_modules/https_edge_route_webhook_verification/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_route_websocket_tcp_converter/client.go b/edge_modules/https_edge_route_websocket_tcp_converter/client.go index c40e304..705e774 100644 --- a/edge_modules/https_edge_route_websocket_tcp_converter/client.go +++ b/edge_modules/https_edge_route_websocket_tcp_converter/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/https_edge_tls_termination/client.go b/edge_modules/https_edge_tls_termination/client.go index e9c7649..5265648 100644 --- a/edge_modules/https_edge_tls_termination/client.go +++ b/edge_modules/https_edge_tls_termination/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/tcp_edge_backend/client.go b/edge_modules/tcp_edge_backend/client.go index 75eef8d..1d96772 100644 --- a/edge_modules/tcp_edge_backend/client.go +++ b/edge_modules/tcp_edge_backend/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/tcp_edge_ip_restriction/client.go b/edge_modules/tcp_edge_ip_restriction/client.go index 11ca87d..bfadf80 100644 --- a/edge_modules/tcp_edge_ip_restriction/client.go +++ b/edge_modules/tcp_edge_ip_restriction/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/tcp_edge_traffic_policy/client.go b/edge_modules/tcp_edge_traffic_policy/client.go index b932470..4ade70c 100644 --- a/edge_modules/tcp_edge_traffic_policy/client.go +++ b/edge_modules/tcp_edge_traffic_policy/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/tls_edge_backend/client.go b/edge_modules/tls_edge_backend/client.go index 7cf3a91..4987a54 100644 --- a/edge_modules/tls_edge_backend/client.go +++ b/edge_modules/tls_edge_backend/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/tls_edge_ip_restriction/client.go b/edge_modules/tls_edge_ip_restriction/client.go index 649d296..05ef484 100644 --- a/edge_modules/tls_edge_ip_restriction/client.go +++ b/edge_modules/tls_edge_ip_restriction/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/tls_edge_mutual_tls/client.go b/edge_modules/tls_edge_mutual_tls/client.go index 223e4fe..f456ded 100644 --- a/edge_modules/tls_edge_mutual_tls/client.go +++ b/edge_modules/tls_edge_mutual_tls/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/tls_edge_tls_termination/client.go b/edge_modules/tls_edge_tls_termination/client.go index 7cd33e5..b9458e7 100644 --- a/edge_modules/tls_edge_tls_termination/client.go +++ b/edge_modules/tls_edge_tls_termination/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edge_modules/tls_edge_traffic_policy/client.go b/edge_modules/tls_edge_traffic_policy/client.go index e23f8bd..dee6fe0 100644 --- a/edge_modules/tls_edge_traffic_policy/client.go +++ b/edge_modules/tls_edge_traffic_policy/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edges/https/client.go b/edges/https/client.go index a5c1398..50137e1 100644 --- a/edges/https/client.go +++ b/edges/https/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edges/https_routes/client.go b/edges/https_routes/client.go index 556c7b9..7f0e50e 100644 --- a/edges/https_routes/client.go +++ b/edges/https_routes/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edges/tcp/client.go b/edges/tcp/client.go index ac878d5..3dc77ce 100644 --- a/edges/tcp/client.go +++ b/edges/tcp/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/edges/tls/client.go b/edges/tls/client.go index ff0feac..3cb6b0d 100644 --- a/edges/tls/client.go +++ b/edges/tls/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/endpoints/client.go b/endpoints/client.go index fffbf8d..dc6945e 100644 --- a/endpoints/client.go +++ b/endpoints/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // Endpoints provides an API for querying the endpoint objects diff --git a/event_destinations/client.go b/event_destinations/client.go index 7b1eef1..89021a0 100644 --- a/event_destinations/client.go +++ b/event_destinations/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/event_sources/client.go b/event_sources/client.go index ff1cde8..c1042dd 100644 --- a/event_sources/client.go +++ b/event_sources/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/event_subscriptions/client.go b/event_subscriptions/client.go index ed5af21..47ddb70 100644 --- a/event_subscriptions/client.go +++ b/event_subscriptions/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) type Client struct { diff --git a/go.mod b/go.mod index 96c9b42..45eecbe 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ // Code generated for API Clients. DO NOT EDIT. -module github.com/ngrok/ngrok-api-go/v5 +module github.com/ngrok/ngrok-api-go/v6 go 1.18 diff --git a/integration_test.go b/integration_test.go index 1943a73..eefe79a 100644 --- a/integration_test.go +++ b/integration_test.go @@ -8,8 +8,8 @@ import ( "os" "testing" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/ip_policies" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/ip_policies" "github.com/stretchr/testify/require" ) diff --git a/internal/api/client.go b/internal/api/client.go index 83bd855..5ef6d3a 100644 --- a/internal/api/client.go +++ b/internal/api/client.go @@ -2,7 +2,7 @@ package api -import "github.com/ngrok/ngrok-api-go/v5" +import "github.com/ngrok/ngrok-api-go/v6" type Client = ngrok.BaseClient diff --git a/ip_policies/client.go b/ip_policies/client.go index 27f237d..e22a6d6 100644 --- a/ip_policies/client.go +++ b/ip_policies/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // IP Policies are reusable groups of CIDR ranges with an allow or deny diff --git a/ip_policy_rules/client.go b/ip_policy_rules/client.go index af3aeab..a8b9aeb 100644 --- a/ip_policy_rules/client.go +++ b/ip_policy_rules/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // IP Policy Rules are the IPv4 or IPv6 CIDRs entries that diff --git a/ip_restrictions/client.go b/ip_restrictions/client.go index 0f6dece..1adad28 100644 --- a/ip_restrictions/client.go +++ b/ip_restrictions/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // An IP restriction is a restriction placed on the CIDRs that are allowed to diff --git a/reserved_addrs/client.go b/reserved_addrs/client.go index 7d6d5c4..5d8cdba 100644 --- a/reserved_addrs/client.go +++ b/reserved_addrs/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // Reserved Addresses are TCP addresses that can be used to listen for traffic. diff --git a/reserved_domains/client.go b/reserved_domains/client.go index aad50bf..0852318 100644 --- a/reserved_domains/client.go +++ b/reserved_domains/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // Reserved Domains are hostnames that you can listen for traffic on. Domains diff --git a/ssh_certificate_authorities/client.go b/ssh_certificate_authorities/client.go index 3b391a2..bff67b8 100644 --- a/ssh_certificate_authorities/client.go +++ b/ssh_certificate_authorities/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // An SSH Certificate Authority is a pair of an SSH Certificate and its private diff --git a/ssh_credentials/client.go b/ssh_credentials/client.go index 5ac7e34..73be4a3 100644 --- a/ssh_credentials/client.go +++ b/ssh_credentials/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // SSH Credentials are SSH public keys that can be used to start SSH tunnels diff --git a/ssh_host_certificates/client.go b/ssh_host_certificates/client.go index ea21a38..e850a10 100644 --- a/ssh_host_certificates/client.go +++ b/ssh_host_certificates/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // SSH Host Certificates along with the corresponding private key allows an SSH diff --git a/ssh_user_certificates/client.go b/ssh_user_certificates/client.go index ea4015f..d5b06e6 100644 --- a/ssh_user_certificates/client.go +++ b/ssh_user_certificates/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // SSH User Certificates are presented by SSH clients when connecting to an SSH diff --git a/tls_certificates/client.go b/tls_certificates/client.go index 4ea7cbe..e375709 100644 --- a/tls_certificates/client.go +++ b/tls_certificates/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // TLS Certificates are pairs of x509 certificates and their matching private diff --git a/tunnel_sessions/client.go b/tunnel_sessions/client.go index 34c279e..c846259 100644 --- a/tunnel_sessions/client.go +++ b/tunnel_sessions/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // Tunnel Sessions represent instances of ngrok agents or SSH reverse tunnel diff --git a/tunnels/client.go b/tunnels/client.go index 3dc7610..72eb355 100644 --- a/tunnels/client.go +++ b/tunnels/client.go @@ -8,8 +8,8 @@ import ( "net/url" "text/template" - "github.com/ngrok/ngrok-api-go/v5" - "github.com/ngrok/ngrok-api-go/v5/internal/api" + "github.com/ngrok/ngrok-api-go/v6" + "github.com/ngrok/ngrok-api-go/v6/internal/api" ) // Tunnels provide endpoints to access services exposed by a running ngrok