mirror of
https://github.com/ngrok/ngrok-api-go.git
synced 2026-05-17 16:50:37 +00:00
Merge pull request #52 from ngrok/pr/generated-fa667eced9
Update generated files
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# ngrok API client library for Golang
|
||||
[](https://github.com/ngrok/ngrok-api-go/actions/workflows/ci.yml)
|
||||
[](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v5)
|
||||
[](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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
// import (
|
||||
// "context"
|
||||
// "fmt"
|
||||
// "math/rand"
|
||||
//
|
||||
// "github.com/ngrok/ngrok-api-go/v5"
|
||||
// "github.com/ngrok/ngrok-api-go/v5/reserved_domains"
|
||||
// )
|
||||
// "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("<API KEY>"))
|
||||
// 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
|
||||
// }
|
||||
// func example(ctx context.Context) error {
|
||||
// domains := reserved_domains.NewClient(ngrok.NewClientConfig("<API KEY>"))
|
||||
// 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
|
||||
// # 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"
|
||||
// )
|
||||
// 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"
|
||||
// )
|
||||
//
|
||||
// // Construct the root api Client object
|
||||
// apiClientConfig := ngrok.NewClientConfig("<API KEY>")
|
||||
// // Construct the root api Client object
|
||||
// apiClientConfig := ngrok.NewClientConfig("<API KEY>")
|
||||
//
|
||||
// // then construct service-specific clients
|
||||
// policies := ip_policies.NewClient(apiClientConfig)
|
||||
// rules := ip_policy_rules.NewClient(apiClientConfig)
|
||||
// // 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("<API KEY>", ngrok.WithHTTPClient(yourHTTPClient))
|
||||
// ngrokAPI := ngrok.NewClientConfig("<API KEY>", 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("<API KEY>"))
|
||||
// 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("<API KEY>"))
|
||||
// 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("<API KEY>"))
|
||||
// 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("<API KEY>"))
|
||||
// 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("<API KEY>"))
|
||||
// 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("<API KEY>"))
|
||||
// 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("<API KEY>"))
|
||||
// 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
|
||||
// }
|
||||
// domains := reserved_domains.NewClient(ngrok.NewClientConfig("<API KEY>"))
|
||||
// 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
|
||||
// # 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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+2
-2
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user