ngrok

package module
v5.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2024 License: MIT Imports: 10 Imported by: 4

README

ngrok API client library for Golang

CI Go Reference

This library wraps the ngrok HTTP API to make it easier to consume in Go.

For creating ngrok tunnels directly from your Go application, check out the ngrok Go Agent SDK instead.

Installation

Installation is as simple as using go get.

go get github.com/ngrok/ngrok-api-go/v5

Support

The best place to get support using this library is through the ngrok Slack Community. If you find any bugs, please contribute by opening a new GitHub issue.

Documentation

A quickstart guide and a full API reference are included in the ngrok go API documentation on pkg.go.dev

Quickstart

Please consult the documentation for additional examples.

Create an IP Policy that allows traffic from some subnets
package main

import (
	"context"
	"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"
)

func main() {
	fmt.Println(example(context.Background()))
}

func example(ctx context.Context) error {
	// create clients to api resources
	clientConfig := ngrok.NewClientConfig(os.Getenv("NGROK_API_KEY"))
	policies := ip_policies.NewClient(clientConfig)
	policyRules := ip_policy_rules.NewClient(clientConfig)

	// create the ip policy
	policy, err := policies.Create(ctx, &ngrok.IPPolicyCreate{})
	if err != nil {
		return err
	}
	fmt.Println(policy)

	// create rules for each cidr
	for _, cidr := range []string{"24.0.0.0/8", "12.0.0.0/8"} {
		rule, err := policyRules.Create(ctx, &ngrok.IPPolicyRuleCreate{
			CIDR:       cidr,
			IPPolicyID: policy.ID,
			Action:     ngrok.String("allow"),
		})
		if err != nil {
			return err
		}
		fmt.Println(rule)
	}
	return nil
}
List all online tunnels
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/ngrok/ngrok-api-go/v5"
	"github.com/ngrok/ngrok-api-go/v5/tunnels"
)

func main() {
	fmt.Println(example(context.Background()))
}

func example(ctx context.Context) error {
	// construct the api client
	clientConfig := ngrok.NewClientConfig(os.Getenv("NGROK_API_KEY"))

	// list all online tunnels
	tunnels := tunnels.NewClient(clientConfig)
	iter := tunnels.List(nil)
	for iter.Next(ctx) {
		fmt.Println(iter.Item())
	}
	if err := iter.Err(); err != nil {
		return err
	}
	return nil
}

Documentation

Overview

Package ngrok makes it easy to work with the ngrok API from Go. The package is fully code generated and should always be up to date with the latest ngrok API.

Full documentation of the ngrok API can be found at: https://ngrok.com/docs/api

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

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("<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

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 and a Client type defined in those packages with methods to interact with that API service. It's usually easiest to find the subpackage of the service you want to work with and begin consulting the documentation there.

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("<API KEY>")

// then construct service-specific clients
policies := ip_policies.NewClient(apiClientConfig)
rules := ip_policy_rules.NewClient(apiClientConfig)

Functional Option Configuration

The ClientConfig object in the root package supports functional options for configuration. The most common option to use is `WithHTTPClient()` which allows the caller to specify a different net/http.Client object. This allows 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))

Nullable arguments

Some arguments to methods in the ngrok API are optional and must be meaningfully distinguished from zero values, especially in Update() methods. This allows the API to distinguish between choosing not to update a value vs. setting it to zero or the empty string. For these arguments, ngrok follows the industry standard practice of using pointers to the primitive 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"),
})

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 you advance the iterator it will transparently fetch new pages of values for you behind the scenes. Note that the context supplied to the initial List() call will be used for all subsequent page fetches so it must be long enough to work through the entire list. Here's an example of paging through all of the TLS certificates on your account. Note that you must check for an error 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
}

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 this package will be an ngrok.Error type. The ngrok.Error type exposes important metadata that will help you handle errors. Specifically it includes the HTTP status code of any failed operation as well as an error code value that uniquely identifies the failure condition.

There are two helper functions that will make error handling easy: 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
}

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
}

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 GoString() method is defined to pretty-print an object for debugging purposes with the "%#v" formatting verb.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

func IsErrorCode

func IsErrorCode(err error, codes ...int) bool

Returns true if the given error is caused by any of the specified ngrok error codes. All ngrok error codes are documented at https://ngrok.com/docs/errors

func IsNotFound

func IsNotFound(err error) bool

Returns true if the error is a not found response from the ngrok API.

func String

func String(s string) *string

func Uint32

func Uint32(v uint32) *uint32

Types

type APIKey

type APIKey struct {
	// unique API key resource identifier
	ID string `json:"id,omitempty"`
	// URI to the API resource of this API key
	URI string `json:"uri,omitempty"`
	// human-readable description of what uses the API key to authenticate. optional,
	// max 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined data of this API key. optional, max 4096 bytes
	Metadata string `json:"metadata,omitempty"`
	// timestamp when the api key was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// the bearer token that can be placed into the Authorization header to
	// authenticate request to the ngrok API. This value is only available one time, on
	// the API response from key creation. Otherwise it is null.
	Token *string `json:"token,omitempty"`
	// If supplied at credential creation, ownership will be assigned to the specified
	// User or Bot. Only admins may specify an owner other than themselves. Defaults to
	// the authenticated User or Bot.
	OwnerID *string `json:"owner_id,omitempty"`
}

func (*APIKey) GoString

func (x *APIKey) GoString() string

func (*APIKey) String

func (x *APIKey) String() string

type APIKeyCreate

type APIKeyCreate struct {
	// human-readable description of what uses the API key to authenticate. optional,
	// max 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined data of this API key. optional, max 4096 bytes
	Metadata string `json:"metadata,omitempty"`
	// If supplied at credential creation, ownership will be assigned to the specified
	// User or Bot. Only admins may specify an owner other than themselves. Defaults to
	// the authenticated User or Bot.
	OwnerID *string `json:"owner_id,omitempty"`
}

func (*APIKeyCreate) GoString

func (x *APIKeyCreate) GoString() string

func (*APIKeyCreate) String

func (x *APIKeyCreate) String() string

type APIKeyList

type APIKeyList struct {
	// the list of API keys for this account
	Keys []APIKey `json:"keys,omitempty"`
	// URI of the API keys list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*APIKeyList) GoString

func (x *APIKeyList) GoString() string

func (*APIKeyList) String

func (x *APIKeyList) String() string

type APIKeyUpdate

type APIKeyUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of what uses the API key to authenticate. optional,
	// max 255 bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined data of this API key. optional, max 4096 bytes
	Metadata *string `json:"metadata,omitempty"`
}

func (*APIKeyUpdate) GoString

func (x *APIKeyUpdate) GoString() string

func (*APIKeyUpdate) String

func (x *APIKeyUpdate) String() string

type AWSAuth

type AWSAuth struct {
	// A role for ngrok to assume on your behalf to deposit events into your AWS
	// account.
	Role *AWSRole `json:"role,omitempty"`
	// Credentials to your AWS account if you prefer ngrok to sign in with long-term
	// access keys.
	Creds *AWSCredentials `json:"creds,omitempty"`
}

func (*AWSAuth) GoString

func (x *AWSAuth) GoString() string

func (*AWSAuth) String

func (x *AWSAuth) String() string

type AWSCredentials

type AWSCredentials struct {
	// The ID portion of an AWS access key.
	AWSAccessKeyID string `json:"aws_access_key_id,omitempty"`
	// The secret portion of an AWS access key.
	AWSSecretAccessKey *string `json:"aws_secret_access_key,omitempty"`
}

func (*AWSCredentials) GoString

func (x *AWSCredentials) GoString() string

func (*AWSCredentials) String

func (x *AWSCredentials) String() string

type AWSRole

type AWSRole struct {
	// An ARN that specifies the role that ngrok should use to deliver to the
	// configured target.
	RoleARN string `json:"role_arn,omitempty"`
}

func (*AWSRole) GoString

func (x *AWSRole) GoString() string

func (*AWSRole) String

func (x *AWSRole) String() string

type AbuseReport

type AbuseReport struct {
	// ID of the abuse report
	ID string `json:"id,omitempty"`
	// URI of the abuse report API resource
	URI string `json:"uri,omitempty"`
	// timestamp that the abuse report record was created in RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// a list of URLs containing suspected abusive content
	URLs []string `json:"urls,omitempty"`
	// arbitrary user-defined data about this abuse report. Optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// Indicates whether ngrok has processed the abuse report. one of PENDING,
	// PROCESSED, or PARTIALLY_PROCESSED
	Status string `json:"status,omitempty"`
	// an array of hostname statuses related to the report
	Hostnames []AbuseReportHostname `json:"hostnames,omitempty"`
}

func (*AbuseReport) GoString

func (x *AbuseReport) GoString() string

func (*AbuseReport) String

func (x *AbuseReport) String() string

type AbuseReportCreate

type AbuseReportCreate struct {
	// a list of URLs containing suspected abusive content
	URLs []string `json:"urls,omitempty"`
	// arbitrary user-defined data about this abuse report. Optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
}

func (*AbuseReportCreate) GoString

func (x *AbuseReportCreate) GoString() string

func (*AbuseReportCreate) String

func (x *AbuseReportCreate) String() string

type AbuseReportHostname

type AbuseReportHostname struct {
	// the hostname ngrok has parsed out of one of the reported URLs in this abuse
	// report
	Hostname string `json:"hostname,omitempty"`
	// indicates what action ngrok has taken against the hostname. one of PENDING,
	// BANNED, UNBANNED, or IGNORE
	Status string `json:"status,omitempty"`
}

func (*AbuseReportHostname) GoString

func (x *AbuseReportHostname) GoString() string

func (*AbuseReportHostname) String

func (x *AbuseReportHostname) String() string

type AgentIngress

type AgentIngress struct {
	// unique Agent Ingress resource identifier
	ID string `json:"id,omitempty"`
	// URI to the API resource of this Agent ingress
	URI string `json:"uri,omitempty"`
	// human-readable description of the use of this Agent Ingress. optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this Agent Ingress. optional,
	// max 4096 bytes
	Metadata string `json:"metadata,omitempty"`
	// the domain that you own to be used as the base domain name to generate regional
	// agent ingress domains.
	Domain string `json:"domain,omitempty"`
	// a list of target values to use as the values of NS records for the domain
	// property these values will delegate control over the domain to ngrok
	NSTargets []string `json:"ns_targets,omitempty"`
	// a list of regional agent ingress domains that are subdomains of the value of
	// domain this value may increase over time as ngrok adds more regions
	RegionDomains []string `json:"region_domains,omitempty"`
	// timestamp when the Agent Ingress was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// configuration for automatic management of TLS certificates for this domain, or
	// null if automatic management is disabled
	CertificateManagementPolicy *AgentIngressCertPolicy `json:"certificate_management_policy,omitempty"`
	// status of the automatic certificate management for this domain, or null if
	// automatic management is disabled
	CertificateManagementStatus *AgentIngressCertStatus `json:"certificate_management_status,omitempty"`
}

func (*AgentIngress) GoString

func (x *AgentIngress) GoString() string

func (*AgentIngress) String

func (x *AgentIngress) String() string

type AgentIngressCertJob added in v5.1.0

type AgentIngressCertJob struct {
	// if present, an error code indicating why provisioning is failing. It may be
	// either a temporary condition (INTERNAL_ERROR), or a permanent one the user must
	// correct (DNS_ERROR).
	ErrorCode *string `json:"error_code,omitempty"`
	// a message describing the current status or error
	Msg string `json:"msg,omitempty"`
	// timestamp when the provisioning job started, RFC 3339 format
	StartedAt string `json:"started_at,omitempty"`
	// timestamp when the provisioning job will be retried
	RetriesAt *string `json:"retries_at,omitempty"`
}

func (*AgentIngressCertJob) GoString added in v5.1.0

func (x *AgentIngressCertJob) GoString() string

func (*AgentIngressCertJob) String added in v5.1.0

func (x *AgentIngressCertJob) String() string

type AgentIngressCertPolicy added in v5.1.0

type AgentIngressCertPolicy struct {
	// certificate authority to request certificates from. The only supported value is
	// letsencrypt.
	Authority string `json:"authority,omitempty"`
	// type of private key to use when requesting certificates. Defaults to rsa, can be
	// either rsa or ecdsa.
	PrivateKeyType string `json:"private_key_type,omitempty"`
}

func (*AgentIngressCertPolicy) GoString added in v5.1.0

func (x *AgentIngressCertPolicy) GoString() string

func (*AgentIngressCertPolicy) String added in v5.1.0

func (x *AgentIngressCertPolicy) String() string

type AgentIngressCertStatus added in v5.1.0

type AgentIngressCertStatus struct {
	// timestamp when the next renewal will be requested, RFC 3339 format
	RenewsAt *string `json:"renews_at,omitempty"`
	// status of the certificate provisioning job, or null if the certificiate isn't
	// being provisioned or renewed
	ProvisioningJob *AgentIngressCertJob `json:"provisioning_job,omitempty"`
}

func (*AgentIngressCertStatus) GoString added in v5.1.0

func (x *AgentIngressCertStatus) GoString() string

func (*AgentIngressCertStatus) String added in v5.1.0

func (x *AgentIngressCertStatus) String() string

type AgentIngressCreate

type AgentIngressCreate struct {
	// human-readable description of the use of this Agent Ingress. optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this Agent Ingress. optional,
	// max 4096 bytes
	Metadata string `json:"metadata,omitempty"`
	// the domain that you own to be used as the base domain name to generate regional
	// agent ingress domains.
	Domain string `json:"domain,omitempty"`
	// configuration for automatic management of TLS certificates for this domain, or
	// null if automatic management is disabled. Optional.
	CertificateManagementPolicy *AgentIngressCertPolicy `json:"certificate_management_policy,omitempty"`
}

func (*AgentIngressCreate) GoString

func (x *AgentIngressCreate) GoString() string

func (*AgentIngressCreate) String

func (x *AgentIngressCreate) String() string

type AgentIngressList

type AgentIngressList struct {
	// the list of Agent Ingresses owned by this account
	Ingresses []AgentIngress `json:"ingresses,omitempty"`
	// URI of the Agent Ingress list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*AgentIngressList) GoString

func (x *AgentIngressList) GoString() string

func (*AgentIngressList) String

func (x *AgentIngressList) String() string

type AgentIngressUpdate

type AgentIngressUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of the use of this Agent Ingress. optional, max 255
	// bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this Agent Ingress. optional,
	// max 4096 bytes
	Metadata *string `json:"metadata,omitempty"`
	// configuration for automatic management of TLS certificates for this domain, or
	// null if automatic management is disabled. Optional.
	CertificateManagementPolicy *AgentIngressCertPolicy `json:"certificate_management_policy,omitempty"`
}

func (*AgentIngressUpdate) GoString

func (x *AgentIngressUpdate) GoString() string

func (*AgentIngressUpdate) String

func (x *AgentIngressUpdate) String() string

type ApplicationSession

type ApplicationSession struct {
	// unique application session resource identifier
	ID string `json:"id,omitempty"`
	// URI of the application session API resource
	URI string `json:"uri,omitempty"`
	// URL of the hostport served by this endpoint
	PublicURL string `json:"public_url,omitempty"`
	// browser session details of the application session
	BrowserSession BrowserSession `json:"browser_session,omitempty"`
	// application user this session is associated with
	ApplicationUser *Ref `json:"application_user,omitempty"`
	// timestamp when the user was created in RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// timestamp when the user was last active in RFC 3339 format
	LastActive string `json:"last_active,omitempty"`
	// timestamp when session expires in RFC 3339 format
	ExpiresAt string `json:"expires_at,omitempty"`
	// ephemeral endpoint this session is associated with
	Endpoint *Ref `json:"endpoint,omitempty"`
	// edge this session is associated with, null if the endpoint is agent-initiated
	Edge *Ref `json:"edge,omitempty"`
	// route this session is associated with, null if the endpoint is agent-initiated
	Route *Ref `json:"route,omitempty"`
}

func (*ApplicationSession) GoString

func (x *ApplicationSession) GoString() string

func (*ApplicationSession) String

func (x *ApplicationSession) String() string

type ApplicationSessionList

type ApplicationSessionList struct {
	// list of all application sessions on this account
	ApplicationSessions []ApplicationSession `json:"application_sessions,omitempty"`
	// URI of the application session list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*ApplicationSessionList) GoString

func (x *ApplicationSessionList) GoString() string

func (*ApplicationSessionList) String

func (x *ApplicationSessionList) String() string

type ApplicationUser

type ApplicationUser struct {
	// unique application user resource identifier
	ID string `json:"id,omitempty"`
	// URI of the application user API resource
	URI string `json:"uri,omitempty"`
	// identity provider that the user authenticated with
	IdentityProvider IdentityProvider `json:"identity_provider,omitempty"`
	// unique user identifier
	ProviderUserID string `json:"provider_user_id,omitempty"`
	// user username
	Username string `json:"username,omitempty"`
	// user email
	Email string `json:"email,omitempty"`
	// user common name
	Name string `json:"name,omitempty"`
	// timestamp when the user was created in RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// timestamp when the user was last active in RFC 3339 format
	LastActive string `json:"last_active,omitempty"`
	// timestamp when the user last signed-in in RFC 3339 format
	LastLogin string `json:"last_login,omitempty"`
}

func (*ApplicationUser) GoString

func (x *ApplicationUser) GoString() string

func (*ApplicationUser) String

func (x *ApplicationUser) String() string

type ApplicationUserList

type ApplicationUserList struct {
	// list of all application users on this account
	ApplicationUsers []ApplicationUser `json:"application_users,omitempty"`
	// URI of the application user list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*ApplicationUserList) GoString

func (x *ApplicationUserList) GoString() string

func (*ApplicationUserList) String

func (x *ApplicationUserList) String() string

type BaseClient added in v5.3.1

type BaseClient struct {
	// contains filtered or unexported fields
}

BaseClient is a generic client for the ngrok API capable of sending arbitrary requests.

func NewBaseClient added in v5.3.1

func NewBaseClient(cfg *ClientConfig) *BaseClient

NewBaseClient constructs a new BaseClient.

func (*BaseClient) Do added in v5.3.1

func (c *BaseClient) Do(ctx context.Context, method string, reqURL *url.URL, reqBody interface{}, respBody interface{}) error

Do sends a request to the ngrok API.

The `reqBody` and `respBody` parameters will be automatically serialized and deserialized.

The `reqURL` may include only the `Path` component. The full URL will be built from the `BaseURL` in the ClientConfig.

type BotUser added in v5.4.0

type BotUser struct {
	// unique API key resource identifier
	ID string `json:"id,omitempty"`
	// URI to the API resource of this bot user
	URI string `json:"uri,omitempty"`
	// human-readable name used to identify the bot
	Name string `json:"name,omitempty"`
	// whether or not the bot is active
	Active bool `json:"active,omitempty"`
	// timestamp when the api key was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
}

func (*BotUser) GoString added in v5.4.0

func (x *BotUser) GoString() string

func (*BotUser) String added in v5.4.0

func (x *BotUser) String() string

type BotUserCreate added in v5.4.0

type BotUserCreate struct {
	// human-readable name used to identify the bot
	Name string `json:"name,omitempty"`
	// whether or not the bot is active
	Active *bool `json:"active,omitempty"`
}

func (*BotUserCreate) GoString added in v5.4.0

func (x *BotUserCreate) GoString() string

func (*BotUserCreate) String added in v5.4.0

func (x *BotUserCreate) String() string

type BotUserList added in v5.4.0

type BotUserList struct {
	// the list of all bot users on this account
	BotUsers []BotUser `json:"bot_users,omitempty"`
	// URI of the bot users list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*BotUserList) GoString added in v5.4.0

func (x *BotUserList) GoString() string

func (*BotUserList) String added in v5.4.0

func (x *BotUserList) String() string

type BotUserUpdate added in v5.4.0

type BotUserUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable name used to identify the bot
	Name *string `json:"name,omitempty"`
	// whether or not the bot is active
	Active *bool `json:"active,omitempty"`
}

func (*BotUserUpdate) GoString added in v5.4.0

func (x *BotUserUpdate) GoString() string

func (*BotUserUpdate) String added in v5.4.0

func (x *BotUserUpdate) String() string

type BrowserSession

type BrowserSession struct {
	// HTTP User-Agent data
	UserAgent UserAgent `json:"user_agent,omitempty"`
	// IP address
	IPAddress string `json:"ip_address,omitempty"`
	// IP geolocation data
	Location *Location `json:"location,omitempty"`
}

func (*BrowserSession) GoString

func (x *BrowserSession) GoString() string

func (*BrowserSession) String

func (x *BrowserSession) String() string

type CertificateAuthority

type CertificateAuthority struct {
	// unique identifier for this Certificate Authority
	ID string `json:"id,omitempty"`
	// URI of the Certificate Authority API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the Certificate Authority was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of this Certificate Authority. optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this Certificate Authority.
	// optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// raw PEM of the Certificate Authority
	CAPEM string `json:"ca_pem,omitempty"`
	// subject common name of the Certificate Authority
	SubjectCommonName string `json:"subject_common_name,omitempty"`
	// timestamp when this Certificate Authority becomes valid, RFC 3339 format
	NotBefore string `json:"not_before,omitempty"`
	// timestamp when this Certificate Authority becomes invalid, RFC 3339 format
	NotAfter string `json:"not_after,omitempty"`
	// set of actions the private key of this Certificate Authority can be used for
	KeyUsages []string `json:"key_usages,omitempty"`
	// extended set of actions the private key of this Certificate Authority can be
	// used for
	ExtendedKeyUsages []string `json:"extended_key_usages,omitempty"`
}

func (*CertificateAuthority) GoString

func (x *CertificateAuthority) GoString() string

func (*CertificateAuthority) String

func (x *CertificateAuthority) String() string

type CertificateAuthorityCreate

type CertificateAuthorityCreate struct {
	// human-readable description of this Certificate Authority. optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this Certificate Authority.
	// optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// raw PEM of the Certificate Authority
	CAPEM string `json:"ca_pem,omitempty"`
}

func (*CertificateAuthorityCreate) GoString

func (x *CertificateAuthorityCreate) GoString() string

func (*CertificateAuthorityCreate) String

func (x *CertificateAuthorityCreate) String() string

type CertificateAuthorityList

type CertificateAuthorityList struct {
	// the list of all certificate authorities on this account
	CertificateAuthorities []CertificateAuthority `json:"certificate_authorities,omitempty"`
	// URI of the certificates authorities list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*CertificateAuthorityList) GoString

func (x *CertificateAuthorityList) GoString() string

func (*CertificateAuthorityList) String

func (x *CertificateAuthorityList) String() string

type CertificateAuthorityUpdate

type CertificateAuthorityUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of this Certificate Authority. optional, max 255
	// bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this Certificate Authority.
	// optional, max 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
}

func (*CertificateAuthorityUpdate) GoString

func (x *CertificateAuthorityUpdate) GoString() string

func (*CertificateAuthorityUpdate) String

func (x *CertificateAuthorityUpdate) String() string

type ClientConfig

type ClientConfig struct {
	APIKey     string
	BaseURL    *url.URL
	HTTPClient *http.Client
	UserAgent  *string
}

func NewClientConfig

func NewClientConfig(apiKey string, opts ...ClientConfigOption) *ClientConfig

type ClientConfigOption

type ClientConfigOption func(cc *clientConfigOpts)

func WithBaseURL

func WithBaseURL(baseURL string) ClientConfigOption

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) ClientConfigOption

func WithUserAgent

func WithUserAgent(userAgent string) ClientConfigOption

type Credential

type Credential struct {
	// unique tunnel credential resource identifier
	ID string `json:"id,omitempty"`
	// URI of the tunnel credential API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the tunnel credential was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of who or what will use the credential to
	// authenticate. Optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this credential. Optional, max
	// 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// the credential's authtoken that can be used to authenticate an ngrok agent. This
	// value is only available one time, on the API response from credential creation,
	// otherwise it is null.
	Token *string `json:"token,omitempty"`
	// optional list of ACL rules. If unspecified, the credential will have no
	// restrictions. The only allowed ACL rule at this time is the bind rule. The bind
	// rule allows the caller to restrict what domains, addresses, and labels the token
	// is allowed to bind. For example, to allow the token to open a tunnel on
	// example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind
	// rules for domains may specify a leading wildcard to match multiple domains with
	// a common suffix. For example, you may specify a rule of bind:*.example.com which
	// will allow x.example.com, y.example.com, *.example.com, etc. Bind rules for
	// labels may specify a wildcard key and/or value to match multiple labels. For
	// example, you may specify a rule of bind:*=example which will allow x=example,
	// y=example, etc. A rule of '*' is equivalent to no acl at all and will explicitly
	// permit all actions.
	ACL []string `json:"acl,omitempty"`
	// If supplied at credential creation, ownership will be assigned to the specified
	// User or Bot. Only admins may specify an owner other than themselves. Defaults to
	// the authenticated User or Bot.
	OwnerID *string `json:"owner_id,omitempty"`
}

func (*Credential) GoString

func (x *Credential) GoString() string

func (*Credential) String

func (x *Credential) String() string

type CredentialCreate

type CredentialCreate struct {
	// human-readable description of who or what will use the credential to
	// authenticate. Optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this credential. Optional, max
	// 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// optional list of ACL rules. If unspecified, the credential will have no
	// restrictions. The only allowed ACL rule at this time is the bind rule. The bind
	// rule allows the caller to restrict what domains, addresses, and labels the token
	// is allowed to bind. For example, to allow the token to open a tunnel on
	// example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind
	// rules for domains may specify a leading wildcard to match multiple domains with
	// a common suffix. For example, you may specify a rule of bind:*.example.com which
	// will allow x.example.com, y.example.com, *.example.com, etc. Bind rules for
	// labels may specify a wildcard key and/or value to match multiple labels. For
	// example, you may specify a rule of bind:*=example which will allow x=example,
	// y=example, etc. A rule of '*' is equivalent to no acl at all and will explicitly
	// permit all actions.
	ACL []string `json:"acl,omitempty"`
	// If supplied at credential creation, ownership will be assigned to the specified
	// User or Bot. Only admins may specify an owner other than themselves. Defaults to
	// the authenticated User or Bot.
	OwnerID *string `json:"owner_id,omitempty"`
}

func (*CredentialCreate) GoString

func (x *CredentialCreate) GoString() string

func (*CredentialCreate) String

func (x *CredentialCreate) String() string

type CredentialList

type CredentialList struct {
	// the list of all tunnel credentials on this account
	Credentials []Credential `json:"credentials,omitempty"`
	// URI of the tunnel credential list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*CredentialList) GoString

func (x *CredentialList) GoString() string

func (*CredentialList) String

func (x *CredentialList) String() string

type CredentialUpdate

type CredentialUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of who or what will use the credential to
	// authenticate. Optional, max 255 bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this credential. Optional, max
	// 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
	// optional list of ACL rules. If unspecified, the credential will have no
	// restrictions. The only allowed ACL rule at this time is the bind rule. The bind
	// rule allows the caller to restrict what domains, addresses, and labels the token
	// is allowed to bind. For example, to allow the token to open a tunnel on
	// example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind
	// rules for domains may specify a leading wildcard to match multiple domains with
	// a common suffix. For example, you may specify a rule of bind:*.example.com which
	// will allow x.example.com, y.example.com, *.example.com, etc. Bind rules for
	// labels may specify a wildcard key and/or value to match multiple labels. For
	// example, you may specify a rule of bind:*=example which will allow x=example,
	// y=example, etc. A rule of '*' is equivalent to no acl at all and will explicitly
	// permit all actions.
	ACL []string `json:"acl,omitempty"`
}

func (*CredentialUpdate) GoString

func (x *CredentialUpdate) GoString() string

func (*CredentialUpdate) String

func (x *CredentialUpdate) String() string

type EdgeBackendReplace

type EdgeBackendReplace struct {
	ID     string                `json:"id,omitempty"`
	Module EndpointBackendMutate `json:"module,omitempty"`
}

func (*EdgeBackendReplace) GoString

func (x *EdgeBackendReplace) GoString() string

func (*EdgeBackendReplace) String

func (x *EdgeBackendReplace) String() string

type EdgeIPRestrictionReplace

type EdgeIPRestrictionReplace struct {
	ID     string                 `json:"id,omitempty"`
	Module EndpointIPPolicyMutate `json:"module,omitempty"`
}

func (*EdgeIPRestrictionReplace) GoString

func (x *EdgeIPRestrictionReplace) GoString() string

func (*EdgeIPRestrictionReplace) String

func (x *EdgeIPRestrictionReplace) String() string

type EdgeMutualTLSReplace

type EdgeMutualTLSReplace struct {
	ID     string                  `json:"id,omitempty"`
	Module EndpointMutualTLSMutate `json:"module,omitempty"`
}

func (*EdgeMutualTLSReplace) GoString

func (x *EdgeMutualTLSReplace) GoString() string

func (*EdgeMutualTLSReplace) String

func (x *EdgeMutualTLSReplace) String() string

type EdgePolicyReplace added in v5.3.0

type EdgePolicyReplace struct {
	ID     string         `json:"id,omitempty"`
	Module EndpointPolicy `json:"module,omitempty"`
}

func (*EdgePolicyReplace) GoString added in v5.3.0

func (x *EdgePolicyReplace) GoString() string

func (*EdgePolicyReplace) String added in v5.3.0

func (x *EdgePolicyReplace) String() string

type EdgeRouteBackendReplace

type EdgeRouteBackendReplace struct {
	EdgeID string                `json:"edge_id,omitempty"`
	ID     string                `json:"id,omitempty"`
	Module EndpointBackendMutate `json:"module,omitempty"`
}

func (*EdgeRouteBackendReplace) GoString

func (x *EdgeRouteBackendReplace) GoString() string

func (*EdgeRouteBackendReplace) String

func (x *EdgeRouteBackendReplace) String() string

type EdgeRouteCircuitBreakerReplace

type EdgeRouteCircuitBreakerReplace struct {
	EdgeID string                 `json:"edge_id,omitempty"`
	ID     string                 `json:"id,omitempty"`
	Module EndpointCircuitBreaker `json:"module,omitempty"`
}

func (*EdgeRouteCircuitBreakerReplace) GoString

func (x *EdgeRouteCircuitBreakerReplace) GoString() string

func (*EdgeRouteCircuitBreakerReplace) String

type EdgeRouteCompressionReplace

type EdgeRouteCompressionReplace struct {
	EdgeID string              `json:"edge_id,omitempty"`
	ID     string              `json:"id,omitempty"`
	Module EndpointCompression `json:"module,omitempty"`
}

func (*EdgeRouteCompressionReplace) GoString

func (x *EdgeRouteCompressionReplace) GoString() string

func (*EdgeRouteCompressionReplace) String

func (x *EdgeRouteCompressionReplace) String() string

type EdgeRouteIPRestrictionReplace

type EdgeRouteIPRestrictionReplace struct {
	EdgeID string                 `json:"edge_id,omitempty"`
	ID     string                 `json:"id,omitempty"`
	Module EndpointIPPolicyMutate `json:"module,omitempty"`
}

func (*EdgeRouteIPRestrictionReplace) GoString

func (x *EdgeRouteIPRestrictionReplace) GoString() string

func (*EdgeRouteIPRestrictionReplace) String

type EdgeRouteItem

type EdgeRouteItem struct {
	// unique identifier of this edge
	EdgeID string `json:"edge_id,omitempty"`
	// unique identifier of this edge route
	ID string `json:"id,omitempty"`
}

func (*EdgeRouteItem) GoString

func (x *EdgeRouteItem) GoString() string

func (*EdgeRouteItem) String

func (x *EdgeRouteItem) String() string

type EdgeRouteOAuthReplace

type EdgeRouteOAuthReplace struct {
	EdgeID string        `json:"edge_id,omitempty"`
	ID     string        `json:"id,omitempty"`
	Module EndpointOAuth `json:"module,omitempty"`
}

func (*EdgeRouteOAuthReplace) GoString

func (x *EdgeRouteOAuthReplace) GoString() string

func (*EdgeRouteOAuthReplace) String

func (x *EdgeRouteOAuthReplace) String() string

type EdgeRouteOIDCReplace

type EdgeRouteOIDCReplace struct {
	EdgeID string       `json:"edge_id,omitempty"`
	ID     string       `json:"id,omitempty"`
	Module EndpointOIDC `json:"module,omitempty"`
}

func (*EdgeRouteOIDCReplace) GoString

func (x *EdgeRouteOIDCReplace) GoString() string

func (*EdgeRouteOIDCReplace) String

func (x *EdgeRouteOIDCReplace) String() string

type EdgeRoutePolicyReplace added in v5.3.0

type EdgeRoutePolicyReplace struct {
	EdgeID string         `json:"edge_id,omitempty"`
	ID     string         `json:"id,omitempty"`
	Module EndpointPolicy `json:"module,omitempty"`
}

func (*EdgeRoutePolicyReplace) GoString added in v5.3.0

func (x *EdgeRoutePolicyReplace) GoString() string

func (*EdgeRoutePolicyReplace) String added in v5.3.0

func (x *EdgeRoutePolicyReplace) String() string

type EdgeRouteRequestHeadersReplace

type EdgeRouteRequestHeadersReplace struct {
	EdgeID string                 `json:"edge_id,omitempty"`
	ID     string                 `json:"id,omitempty"`
	Module EndpointRequestHeaders `json:"module,omitempty"`
}

func (*EdgeRouteRequestHeadersReplace) GoString

func (x *EdgeRouteRequestHeadersReplace) GoString() string

func (*EdgeRouteRequestHeadersReplace) String

type EdgeRouteResponseHeadersReplace

type EdgeRouteResponseHeadersReplace struct {
	EdgeID string                  `json:"edge_id,omitempty"`
	ID     string                  `json:"id,omitempty"`
	Module EndpointResponseHeaders `json:"module,omitempty"`
}

func (*EdgeRouteResponseHeadersReplace) GoString

func (*EdgeRouteResponseHeadersReplace) String

type EdgeRouteSAMLReplace

type EdgeRouteSAMLReplace struct {
	EdgeID string             `json:"edge_id,omitempty"`
	ID     string             `json:"id,omitempty"`
	Module EndpointSAMLMutate `json:"module,omitempty"`
}

func (*EdgeRouteSAMLReplace) GoString

func (x *EdgeRouteSAMLReplace) GoString() string

func (*EdgeRouteSAMLReplace) String

func (x *EdgeRouteSAMLReplace) String() string

type EdgeRouteUserAgentFilterReplace added in v5.2.0

type EdgeRouteUserAgentFilterReplace struct {
	EdgeID string                  `json:"edge_id,omitempty"`
	ID     string                  `json:"id,omitempty"`
	Module EndpointUserAgentFilter `json:"module,omitempty"`
}

func (*EdgeRouteUserAgentFilterReplace) GoString added in v5.2.0

func (*EdgeRouteUserAgentFilterReplace) String added in v5.2.0

type EdgeRouteWebhookVerificationReplace

type EdgeRouteWebhookVerificationReplace struct {
	EdgeID string                    `json:"edge_id,omitempty"`
	ID     string                    `json:"id,omitempty"`
	Module EndpointWebhookValidation `json:"module,omitempty"`
}

func (*EdgeRouteWebhookVerificationReplace) GoString

func (*EdgeRouteWebhookVerificationReplace) String

type EdgeRouteWebsocketTCPConverterReplace

type EdgeRouteWebsocketTCPConverterReplace struct {
	EdgeID string                        `json:"edge_id,omitempty"`
	ID     string                        `json:"id,omitempty"`
	Module EndpointWebsocketTCPConverter `json:"module,omitempty"`
}

func (*EdgeRouteWebsocketTCPConverterReplace) GoString

func (*EdgeRouteWebsocketTCPConverterReplace) String

type EdgeTLSTerminationAtEdgeReplace

type EdgeTLSTerminationAtEdgeReplace struct {
	ID     string                       `json:"id,omitempty"`
	Module EndpointTLSTerminationAtEdge `json:"module,omitempty"`
}

func (*EdgeTLSTerminationAtEdgeReplace) GoString

func (*EdgeTLSTerminationAtEdgeReplace) String

type EdgeTLSTerminationReplace

type EdgeTLSTerminationReplace struct {
	ID     string                 `json:"id,omitempty"`
	Module EndpointTLSTermination `json:"module,omitempty"`
}

func (*EdgeTLSTerminationReplace) GoString

func (x *EdgeTLSTerminationReplace) GoString() string

func (*EdgeTLSTerminationReplace) String

func (x *EdgeTLSTerminationReplace) String() string

type Empty

type Empty struct {
}

func (*Empty) GoString

func (x *Empty) GoString() string

func (*Empty) String

func (x *Empty) String() string

type Endpoint

type Endpoint struct {
	// unique endpoint resource identifier
	ID string `json:"id,omitempty"`
	// identifier of the region this endpoint belongs to
	Region string `json:"region,omitempty"`
	// timestamp when the endpoint was created in RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// timestamp when the endpoint was updated in RFC 3339 format
	UpdatedAt string `json:"updated_at,omitempty"`
	// URL of the hostport served by this endpoint
	PublicURL string `json:"public_url,omitempty"`
	// protocol served by this endpoint. one of http, https, tcp, or tls
	Proto string `json:"proto,omitempty"`
	// hostport served by this endpoint (hostname:port)
	Hostport string `json:"hostport,omitempty"`
	// whether the endpoint is ephemeral (served directly by an agent-initiated tunnel)
	// or edge (served by an edge)
	Type string `json:"type,omitempty"`
	// user-supplied metadata of the associated tunnel or edge object
	Metadata string `json:"metadata,omitempty"`
	// the domain reserved for this endpoint
	Domain *Ref `json:"domain,omitempty"`
	// the address reserved for this endpoint
	TCPAddr *Ref `json:"tcp_addr,omitempty"`
	// the tunnel serving requests to this endpoint, if this is an ephemeral endpoint
	Tunnel *Ref `json:"tunnel,omitempty"`
	// the edge serving requests to this endpoint, if this is an edge endpoint
	Edge *Ref `json:"edge,omitempty"`
}

func (*Endpoint) GoString

func (x *Endpoint) GoString() string

func (*Endpoint) String

func (x *Endpoint) String() string

type EndpointAction added in v5.3.0

type EndpointAction struct {
	// the type of action on the policy rule.
	Type string `json:"type,omitempty"`
	// the configuration for the action on the policy rule.
	Config any `json:"config,omitempty"`
}

func (*EndpointAction) GoString added in v5.3.0

func (x *EndpointAction) GoString() string

func (*EndpointAction) String added in v5.3.0

func (x *EndpointAction) String() string

type EndpointBackend

type EndpointBackend struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// backend to be used to back this endpoint
	Backend Ref `json:"backend,omitempty"`
}

func (*EndpointBackend) GoString

func (x *EndpointBackend) GoString() string

func (*EndpointBackend) String

func (x *EndpointBackend) String() string

type EndpointBackendMutate

type EndpointBackendMutate struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// backend to be used to back this endpoint
	BackendID string `json:"backend_id,omitempty"`
}

func (*EndpointBackendMutate) GoString

func (x *EndpointBackendMutate) GoString() string

func (*EndpointBackendMutate) String

func (x *EndpointBackendMutate) String() string

type EndpointCircuitBreaker

type EndpointCircuitBreaker struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// Integer number of seconds after which the circuit is tripped to wait before
	// re-evaluating upstream health
	TrippedDuration uint32 `json:"tripped_duration,omitempty"`
	// Integer number of seconds in the statistical rolling window that metrics are
	// retained for.
	RollingWindow uint32 `json:"rolling_window,omitempty"`
	// Integer number of buckets into which metrics are retained. Max 128.
	NumBuckets uint32 `json:"num_buckets,omitempty"`
	// Integer number of requests in a rolling window that will trip the circuit.
	// Helpful if traffic volume is low.
	VolumeThreshold uint32 `json:"volume_threshold,omitempty"`
	// Error threshold percentage should be between 0 - 1.0, not 0-100.0
	ErrorThresholdPercentage float64 `json:"error_threshold_percentage,omitempty"`
}

func (*EndpointCircuitBreaker) GoString

func (x *EndpointCircuitBreaker) GoString() string

func (*EndpointCircuitBreaker) String

func (x *EndpointCircuitBreaker) String() string

type EndpointCompression

type EndpointCompression struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
}

func (*EndpointCompression) GoString

func (x *EndpointCompression) GoString() string

func (*EndpointCompression) String

func (x *EndpointCompression) String() string

type EndpointIPPolicy

type EndpointIPPolicy struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// list of all IP policies that will be used to check if a source IP is allowed
	// access to the endpoint
	IPPolicies []Ref `json:"ip_policies,omitempty"`
}

func (*EndpointIPPolicy) GoString

func (x *EndpointIPPolicy) GoString() string

func (*EndpointIPPolicy) String

func (x *EndpointIPPolicy) String() string

type EndpointIPPolicyMutate

type EndpointIPPolicyMutate struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// list of all IP policies that will be used to check if a source IP is allowed
	// access to the endpoint
	IPPolicyIDs []string `json:"ip_policy_ids,omitempty"`
}

func (*EndpointIPPolicyMutate) GoString

func (x *EndpointIPPolicyMutate) GoString() string

func (*EndpointIPPolicyMutate) String

func (x *EndpointIPPolicyMutate) String() string

type EndpointList

type EndpointList struct {
	// the list of all active endpoints on this account
	Endpoints []Endpoint `json:"endpoints,omitempty"`
	// URI of the endpoints list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*EndpointList) GoString

func (x *EndpointList) GoString() string

func (*EndpointList) String

func (x *EndpointList) String() string

type EndpointMutualTLS

type EndpointMutualTLS struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// PEM-encoded CA certificates that will be used to validate. Multiple CAs may be
	// provided by concatenating them together.
	CertificateAuthorities []Ref `json:"certificate_authorities,omitempty"`
}

func (*EndpointMutualTLS) GoString

func (x *EndpointMutualTLS) GoString() string

func (*EndpointMutualTLS) String

func (x *EndpointMutualTLS) String() string

type EndpointMutualTLSMutate

type EndpointMutualTLSMutate struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// list of certificate authorities that will be used to validate the TLS client
	// certificate presented by the initiator of the TLS connection
	CertificateAuthorityIDs []string `json:"certificate_authority_ids,omitempty"`
}

func (*EndpointMutualTLSMutate) GoString

func (x *EndpointMutualTLSMutate) GoString() string

func (*EndpointMutualTLSMutate) String

func (x *EndpointMutualTLSMutate) String() string

type EndpointOAuth

type EndpointOAuth struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// an object which defines the identity provider to use for authentication and
	// configuration for who may access the endpoint
	Provider EndpointOAuthProvider `json:"provider,omitempty"`
	// Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
	// supporting CORS.
	OptionsPassthrough bool `json:"options_passthrough,omitempty"`
	// the prefix of the session cookie that ngrok sets on the http client to cache
	// authentication. default is 'ngrok.'
	CookiePrefix string `json:"cookie_prefix,omitempty"`
	// Integer number of seconds of inactivity after which if the user has not accessed
	// the endpoint, their session will time out and they will be forced to
	// reauthenticate.
	InactivityTimeout uint32 `json:"inactivity_timeout,omitempty"`
	// Integer number of seconds of the maximum duration of an authenticated session.
	// After this period is exceeded, a user must reauthenticate.
	MaximumDuration uint32 `json:"maximum_duration,omitempty"`
	// Integer number of seconds after which ngrok guarantees it will refresh user
	// state from the identity provider and recheck whether the user is still
	// authorized to access the endpoint. This is the preferred tunable to use to
	// enforce a minimum amount of time after which a revoked user will no longer be
	// able to access the resource.
	AuthCheckInterval uint32 `json:"auth_check_interval,omitempty"`
}

func (*EndpointOAuth) GoString

func (x *EndpointOAuth) GoString() string

func (*EndpointOAuth) String

func (x *EndpointOAuth) String() string

type EndpointOAuthAmazon

type EndpointOAuthAmazon struct {
	ClientID       *string  `json:"client_id,omitempty"`
	ClientSecret   *string  `json:"client_secret,omitempty"`
	Scopes         []string `json:"scopes,omitempty"`
	EmailAddresses []string `json:"email_addresses,omitempty"`
	EmailDomains   []string `json:"email_domains,omitempty"`
}

func (*EndpointOAuthAmazon) GoString

func (x *EndpointOAuthAmazon) GoString() string

func (*EndpointOAuthAmazon) String

func (x *EndpointOAuthAmazon) String() string

type EndpointOAuthFacebook

type EndpointOAuthFacebook struct {
	// the OAuth app client ID. retrieve it from the identity provider's dashboard
	// where you created your own OAuth app. optional. if unspecified, ngrok will use
	// its own managed oauth application which has additional restrictions. see the
	// OAuth module docs for more details. if present, client_secret must be present as
	// well.
	ClientID *string `json:"client_id,omitempty"`
	// the OAuth app client secret. retrieve if from the identity provider's dashboard
	// where you created your own OAuth app. optional, see all of the caveats in the
	// docs for client_id.
	ClientSecret *string `json:"client_secret,omitempty"`
	// a list of provider-specific OAuth scopes with the permissions your OAuth app
	// would like to ask for. these may not be set if you are using the ngrok-managed
	// oauth app (i.e. you must pass both client_id and client_secret to set scopes)
	Scopes []string `json:"scopes,omitempty"`
	// a list of email addresses of users authenticated by identity provider who are
	// allowed access to the endpoint
	EmailAddresses []string `json:"email_addresses,omitempty"`
	// a list of email domains of users authenticated by identity provider who are
	// allowed access to the endpoint
	EmailDomains []string `json:"email_domains,omitempty"`
}

func (*EndpointOAuthFacebook) GoString

func (x *EndpointOAuthFacebook) GoString() string

func (*EndpointOAuthFacebook) String

func (x *EndpointOAuthFacebook) String() string

type EndpointOAuthGitHub

type EndpointOAuthGitHub struct {
	// the OAuth app client ID. retrieve it from the identity provider's dashboard
	// where you created your own OAuth app. optional. if unspecified, ngrok will use
	// its own managed oauth application which has additional restrictions. see the
	// OAuth module docs for more details. if present, client_secret must be present as
	// well.
	ClientID *string `json:"client_id,omitempty"`
	// the OAuth app client secret. retrieve if from the identity provider's dashboard
	// where you created your own OAuth app. optional, see all of the caveats in the
	// docs for client_id.
	ClientSecret *string `json:"client_secret,omitempty"`
	// a list of provider-specific OAuth scopes with the permissions your OAuth app
	// would like to ask for. these may not be set if you are using the ngrok-managed
	// oauth app (i.e. you must pass both client_id and client_secret to set scopes)
	Scopes []string `json:"scopes,omitempty"`
	// a list of email addresses of users authenticated by identity provider who are
	// allowed access to the endpoint
	EmailAddresses []string `json:"email_addresses,omitempty"`
	// a list of email domains of users authenticated by identity provider who are
	// allowed access to the endpoint
	EmailDomains []string `json:"email_domains,omitempty"`
	// a list of github teams identifiers. users will be allowed access to the endpoint
	// if they are a member of any of these teams. identifiers should be in the 'slug'
	// format qualified with the org name, e.g. org-name/team-name
	Teams []string `json:"teams,omitempty"`
	// a list of github org identifiers. users who are members of any of the listed
	// organizations will be allowed access. identifiers should be the organization's
	// 'slug'
	Organizations []string `json:"organizations,omitempty"`
}

func (*EndpointOAuthGitHub) GoString

func (x *EndpointOAuthGitHub) GoString() string

func (*EndpointOAuthGitHub) String

func (x *EndpointOAuthGitHub) String() string

type EndpointOAuthGitLab

type EndpointOAuthGitLab struct {
	ClientID       *string  `json:"client_id,omitempty"`
	ClientSecret   *string  `json:"client_secret,omitempty"`
	Scopes         []string `json:"scopes,omitempty"`
	EmailAddresses []string `json:"email_addresses,omitempty"`
	EmailDomains   []string `json:"email_domains,omitempty"`
}

func (*EndpointOAuthGitLab) GoString

func (x *EndpointOAuthGitLab) GoString() string

func (*EndpointOAuthGitLab) String

func (x *EndpointOAuthGitLab) String() string

type EndpointOAuthGoogle

type EndpointOAuthGoogle struct {
	// the OAuth app client ID. retrieve it from the identity provider's dashboard
	// where you created your own OAuth app. optional. if unspecified, ngrok will use
	// its own managed oauth application which has additional restrictions. see the
	// OAuth module docs for more details. if present, client_secret must be present as
	// well.
	ClientID *string `json:"client_id,omitempty"`
	// the OAuth app client secret. retrieve if from the identity provider's dashboard
	// where you created your own OAuth app. optional, see all of the caveats in the
	// docs for client_id.
	ClientSecret *string `json:"client_secret,omitempty"`
	// a list of provider-specific OAuth scopes with the permissions your OAuth app
	// would like to ask for. these may not be set if you are using the ngrok-managed
	// oauth app (i.e. you must pass both client_id and client_secret to set scopes)
	Scopes []string `json:"scopes,omitempty"`
	// a list of email addresses of users authenticated by identity provider who are
	// allowed access to the endpoint
	EmailAddresses []string `json:"email_addresses,omitempty"`
	// a list of email domains of users authenticated by identity provider who are
	// allowed access to the endpoint
	EmailDomains []string `json:"email_domains,omitempty"`
}

func (*EndpointOAuthGoogle) GoString

func (x *EndpointOAuthGoogle) GoString() string

func (*EndpointOAuthGoogle) String

func (x *EndpointOAuthGoogle) String() string

type EndpointOAuthLinkedIn

type EndpointOAuthLinkedIn struct {
	ClientID       *string  `json:"client_id,omitempty"`
	ClientSecret   *string  `json:"client_secret,omitempty"`
	Scopes         []string `json:"scopes,omitempty"`
	EmailAddresses []string `json:"email_addresses,omitempty"`
	EmailDomains   []string `json:"email_domains,omitempty"`
}

func (*EndpointOAuthLinkedIn) GoString

func (x *EndpointOAuthLinkedIn) GoString() string

func (*EndpointOAuthLinkedIn) String

func (x *EndpointOAuthLinkedIn) String() string

type EndpointOAuthMicrosoft

type EndpointOAuthMicrosoft struct {
	// the OAuth app client ID. retrieve it from the identity provider's dashboard
	// where you created your own OAuth app. optional. if unspecified, ngrok will use
	// its own managed oauth application which has additional restrictions. see the
	// OAuth module docs for more details. if present, client_secret must be present as
	// well.
	ClientID *string `json:"client_id,omitempty"`
	// the OAuth app client secret. retrieve if from the identity provider's dashboard
	// where you created your own OAuth app. optional, see all of the caveats in the
	// docs for client_id.
	ClientSecret *string `json:"client_secret,omitempty"`
	// a list of provider-specific OAuth scopes with the permissions your OAuth app
	// would like to ask for. these may not be set if you are using the ngrok-managed
	// oauth app (i.e. you must pass both client_id and client_secret to set scopes)
	Scopes []string `json:"scopes,omitempty"`
	// a list of email addresses of users authenticated by identity provider who are
	// allowed access to the endpoint
	EmailAddresses []string `json:"email_addresses,omitempty"`
	// a list of email domains of users authenticated by identity provider who are
	// allowed access to the endpoint
	EmailDomains []string `json:"email_domains,omitempty"`
}

func (*EndpointOAuthMicrosoft) GoString

func (x *EndpointOAuthMicrosoft) GoString() string

func (*EndpointOAuthMicrosoft) String

func (x *EndpointOAuthMicrosoft) String() string

type EndpointOAuthProvider

type EndpointOAuthProvider struct {
	// configuration for using github as the identity provider
	Github *EndpointOAuthGitHub `json:"github,omitempty"`
	// configuration for using facebook as the identity provider
	Facebook *EndpointOAuthFacebook `json:"facebook,omitempty"`
	// configuration for using microsoft as the identity provider
	Microsoft *EndpointOAuthMicrosoft `json:"microsoft,omitempty"`
	// configuration for using google as the identity provider
	Google *EndpointOAuthGoogle `json:"google,omitempty"`
	// configuration for using linkedin as the identity provider
	Linkedin *EndpointOAuthLinkedIn `json:"linkedin,omitempty"`
	// configuration for using gitlab as the identity provider
	Gitlab *EndpointOAuthGitLab `json:"gitlab,omitempty"`
	// configuration for using twitch as the identity provider
	Twitch *EndpointOAuthTwitch `json:"twitch,omitempty"`
	// configuration for using amazon as the identity provider
	Amazon *EndpointOAuthAmazon `json:"amazon,omitempty"`
}

func (*EndpointOAuthProvider) GoString

func (x *EndpointOAuthProvider) GoString() string

func (*EndpointOAuthProvider) String

func (x *EndpointOAuthProvider) String() string

type EndpointOAuthTwitch

type EndpointOAuthTwitch struct {
	ClientID       *string  `json:"client_id,omitempty"`
	ClientSecret   *string  `json:"client_secret,omitempty"`
	Scopes         []string `json:"scopes,omitempty"`
	EmailAddresses []string `json:"email_addresses,omitempty"`
	EmailDomains   []string `json:"email_domains,omitempty"`
}

func (*EndpointOAuthTwitch) GoString

func (x *EndpointOAuthTwitch) GoString() string

func (*EndpointOAuthTwitch) String

func (x *EndpointOAuthTwitch) String() string

type EndpointOIDC

type EndpointOIDC struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
	// supporting CORS.
	OptionsPassthrough bool `json:"options_passthrough,omitempty"`
	// the prefix of the session cookie that ngrok sets on the http client to cache
	// authentication. default is 'ngrok.'
	CookiePrefix string `json:"cookie_prefix,omitempty"`
	// Integer number of seconds of inactivity after which if the user has not accessed
	// the endpoint, their session will time out and they will be forced to
	// reauthenticate.
	InactivityTimeout uint32 `json:"inactivity_timeout,omitempty"`
	// Integer number of seconds of the maximum duration of an authenticated session.
	// After this period is exceeded, a user must reauthenticate.
	MaximumDuration uint32 `json:"maximum_duration,omitempty"`
	// URL of the OIDC "OpenID provider". This is the base URL used for discovery.
	Issuer string `json:"issuer,omitempty"`
	// The OIDC app's client ID and OIDC audience.
	ClientID string `json:"client_id,omitempty"`
	// The OIDC app's client secret.
	ClientSecret string `json:"client_secret,omitempty"`
	// The set of scopes to request from the OIDC identity provider.
	Scopes []string `json:"scopes,omitempty"`
}

func (*EndpointOIDC) GoString

func (x *EndpointOIDC) GoString() string

func (*EndpointOIDC) String

func (x *EndpointOIDC) String() string

type EndpointPolicy added in v5.3.0

type EndpointPolicy struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// the inbound rules of the traffic policy.
	Inbound []EndpointRule `json:"inbound,omitempty"`
	// the outbound rules on the traffic policy.
	Outbound []EndpointRule `json:"outbound,omitempty"`
}

func (*EndpointPolicy) GoString added in v5.3.0

func (x *EndpointPolicy) GoString() string

func (*EndpointPolicy) String added in v5.3.0

func (x *EndpointPolicy) String() string

type EndpointRequestHeaders

type EndpointRequestHeaders struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// a map of header key to header value that will be injected into the HTTP Request
	// before being sent to the upstream application server
	Add map[string]string `json:"add,omitempty"`
	// a list of header names that will be removed from the HTTP Request before being
	// sent to the upstream application server
	Remove []string `json:"remove,omitempty"`
}

func (*EndpointRequestHeaders) GoString

func (x *EndpointRequestHeaders) GoString() string

func (*EndpointRequestHeaders) String

func (x *EndpointRequestHeaders) String() string

type EndpointResponseHeaders

type EndpointResponseHeaders struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// a map of header key to header value that will be injected into the HTTP Response
	// returned to the HTTP client
	Add map[string]string `json:"add,omitempty"`
	// a list of header names that will be removed from the HTTP Response returned to
	// the HTTP client
	Remove []string `json:"remove,omitempty"`
}

func (*EndpointResponseHeaders) GoString

func (x *EndpointResponseHeaders) GoString() string

func (*EndpointResponseHeaders) String

func (x *EndpointResponseHeaders) String() string

type EndpointRule added in v5.3.0

type EndpointRule struct {
	// cel expressions that filter traffic the policy rule applies to.
	Expressions []string `json:"expressions,omitempty"`
	// the set of actions on a policy rule.
	Actions []EndpointAction `json:"actions,omitempty"`
	// the name of the rule that is part of the traffic policy.
	Name string `json:"name,omitempty"`
}

func (*EndpointRule) GoString added in v5.3.0

func (x *EndpointRule) GoString() string

func (*EndpointRule) String added in v5.3.0

func (x *EndpointRule) String() string

type EndpointSAML

type EndpointSAML struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
	// supporting CORS.
	OptionsPassthrough bool `json:"options_passthrough,omitempty"`
	// the prefix of the session cookie that ngrok sets on the http client to cache
	// authentication. default is 'ngrok.'
	CookiePrefix string `json:"cookie_prefix,omitempty"`
	// Integer number of seconds of inactivity after which if the user has not accessed
	// the endpoint, their session will time out and they will be forced to
	// reauthenticate.
	InactivityTimeout uint32 `json:"inactivity_timeout,omitempty"`
	// Integer number of seconds of the maximum duration of an authenticated session.
	// After this period is exceeded, a user must reauthenticate.
	MaximumDuration uint32 `json:"maximum_duration,omitempty"`
	// The full XML IdP EntityDescriptor. Your IdP may provide this to you as a a file
	// to download or as a URL.
	IdPMetadata string `json:"idp_metadata,omitempty"`
	// If true, indicates that whenever we redirect a user to the IdP for
	// authentication that the IdP must prompt the user for authentication credentials
	// even if the user already has a valid session with the IdP.
	ForceAuthn bool `json:"force_authn,omitempty"`
	// If true, the IdP may initiate a login directly (e.g. the user does not need to
	// visit the endpoint first and then be redirected). The IdP should set the
	// RelayState parameter to the target URL of the resource they want the user to be
	// redirected to after the SAML login assertion has been processed.
	AllowIdPInitiated *bool `json:"allow_idp_initiated,omitempty"`
	// If present, only users who are a member of one of the listed groups may access
	// the target endpoint.
	AuthorizedGroups []string `json:"authorized_groups,omitempty"`
	// The SP Entity's unique ID. This always takes the form of a URL. In ngrok's
	// implementation, this URL is the same as the metadata URL. This will need to be
	// specified to the IdP as configuration.
	EntityID string `json:"entity_id,omitempty"`
	// The public URL of the SP's Assertion Consumer Service. This is where the IdP
	// will redirect to during an authentication flow. This will need to be specified
	// to the IdP as configuration.
	AssertionConsumerServiceURL string `json:"assertion_consumer_service_url,omitempty"`
	// The public URL of the SP's Single Logout Service. This is where the IdP will
	// redirect to during a single logout flow. This will optionally need to be
	// specified to the IdP as configuration.
	SingleLogoutURL string `json:"single_logout_url,omitempty"`
	// PEM-encoded x.509 certificate of the key pair that is used to sign all SAML
	// requests that the ngrok SP makes to the IdP. Many IdPs do not support request
	// signing verification, but we highly recommend specifying this in the IdP's
	// configuration if it is supported.
	RequestSigningCertificatePEM string `json:"request_signing_certificate_pem,omitempty"`
	// A public URL where the SP's metadata is hosted. If an IdP supports dynamic
	// configuration, this is the URL it can use to retrieve the SP metadata.
	MetadataURL string `json:"metadata_url,omitempty"`
	// Defines the name identifier format the SP expects the IdP to use in its
	// assertions to identify subjects. If unspecified, a default value of
	// urn:oasis:names:tc:SAML:2.0:nameid-format:persistent will be used. A subset of
	// the allowed values enumerated by the SAML specification are supported.
	NameIDFormat string `json:"nameid_format,omitempty"`
}

func (*EndpointSAML) GoString

func (x *EndpointSAML) GoString() string

func (*EndpointSAML) String

func (x *EndpointSAML) String() string

type EndpointSAMLMutate

type EndpointSAMLMutate struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// Do not enforce authentication on HTTP OPTIONS requests. necessary if you are
	// supporting CORS.
	OptionsPassthrough bool `json:"options_passthrough,omitempty"`
	// the prefix of the session cookie that ngrok sets on the http client to cache
	// authentication. default is 'ngrok.'
	CookiePrefix string `json:"cookie_prefix,omitempty"`
	// Integer number of seconds of inactivity after which if the user has not accessed
	// the endpoint, their session will time out and they will be forced to
	// reauthenticate.
	InactivityTimeout uint32 `json:"inactivity_timeout,omitempty"`
	// Integer number of seconds of the maximum duration of an authenticated session.
	// After this period is exceeded, a user must reauthenticate.
	MaximumDuration uint32 `json:"maximum_duration,omitempty"`
	// The full XML IdP EntityDescriptor. Your IdP may provide this to you as a a file
	// to download or as a URL.
	IdPMetadata string `json:"idp_metadata,omitempty"`
	// If true, indicates that whenever we redirect a user to the IdP for
	// authentication that the IdP must prompt the user for authentication credentials
	// even if the user already has a valid session with the IdP.
	ForceAuthn bool `json:"force_authn,omitempty"`
	// If true, the IdP may initiate a login directly (e.g. the user does not need to
	// visit the endpoint first and then be redirected). The IdP should set the
	// RelayState parameter to the target URL of the resource they want the user to be
	// redirected to after the SAML login assertion has been processed.
	AllowIdPInitiated *bool `json:"allow_idp_initiated,omitempty"`
	// If present, only users who are a member of one of the listed groups may access
	// the target endpoint.
	AuthorizedGroups []string `json:"authorized_groups,omitempty"`
	// Defines the name identifier format the SP expects the IdP to use in its
	// assertions to identify subjects. If unspecified, a default value of
	// urn:oasis:names:tc:SAML:2.0:nameid-format:persistent will be used. A subset of
	// the allowed values enumerated by the SAML specification are supported.
	NameIDFormat string `json:"nameid_format,omitempty"`
}

func (*EndpointSAMLMutate) GoString

func (x *EndpointSAMLMutate) GoString() string

func (*EndpointSAMLMutate) String

func (x *EndpointSAMLMutate) String() string

type EndpointTLSTermination

type EndpointTLSTermination struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// edge if the ngrok edge should terminate TLS traffic, upstream if TLS traffic
	// should be passed through to the upstream ngrok agent / application server for
	// termination. if upstream is chosen, most other modules will be disallowed
	// because they rely on the ngrok edge being able to access the underlying traffic.
	TerminateAt string `json:"terminate_at,omitempty"`
	// The minimum TLS version used for termination and advertised to the client during
	// the TLS handshake. if unspecified, ngrok will choose an industry-safe default.
	// This value must be null if terminate_at is set to upstream.
	MinVersion *string `json:"min_version,omitempty"`
}

func (*EndpointTLSTermination) GoString

func (x *EndpointTLSTermination) GoString() string

func (*EndpointTLSTermination) String

func (x *EndpointTLSTermination) String() string

type EndpointTLSTerminationAtEdge

type EndpointTLSTerminationAtEdge struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// The minimum TLS version used for termination and advertised to the client during
	// the TLS handshake. if unspecified, ngrok will choose an industry-safe default.
	// This value must be null if terminate_at is set to upstream.
	MinVersion *string `json:"min_version,omitempty"`
}

func (*EndpointTLSTerminationAtEdge) GoString

func (x *EndpointTLSTerminationAtEdge) GoString() string

func (*EndpointTLSTerminationAtEdge) String

type EndpointUserAgentFilter added in v5.2.0

type EndpointUserAgentFilter struct {
	Enabled              *bool    `json:"enabled,omitempty"`
	UserAgentFilterAllow []string `json:"allow,omitempty"`
	UserAgentFilterDeny  []string `json:"deny,omitempty"`
}

func (*EndpointUserAgentFilter) GoString added in v5.2.0

func (x *EndpointUserAgentFilter) GoString() string

func (*EndpointUserAgentFilter) String added in v5.2.0

func (x *EndpointUserAgentFilter) String() string

type EndpointWebhookValidation

type EndpointWebhookValidation struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
	// a string indicating which webhook provider will be sending webhooks to this
	// endpoint. Value must be one of the supported providers defined at
	// https://ngrok.com/docs/cloud-edge/modules/webhook-verification
	// (https://ngrok.com/docs/cloud-edge/modules/webhook-verification)
	Provider string `json:"provider,omitempty"`
	// a string secret used to validate requests from the given provider. All providers
	// except AWS SNS require a secret
	Secret string `json:"secret,omitempty"`
}

func (*EndpointWebhookValidation) GoString

func (x *EndpointWebhookValidation) GoString() string

func (*EndpointWebhookValidation) String

func (x *EndpointWebhookValidation) String() string

type EndpointWebsocketTCPConverter

type EndpointWebsocketTCPConverter struct {
	// true if the module will be applied to traffic, false to disable. default true if
	// unspecified
	Enabled *bool `json:"enabled,omitempty"`
}

func (*EndpointWebsocketTCPConverter) GoString

func (x *EndpointWebsocketTCPConverter) GoString() string

func (*EndpointWebsocketTCPConverter) String

type Error

type Error struct {
	ErrorCode  string            `json:"error_code,omitempty"`
	StatusCode int32             `json:"status_code,omitempty"`
	Msg        string            `json:"msg,omitempty"`
	Details    map[string]string `json:"details,omitempty"`
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) GoString

func (x *Error) GoString() string

func (*Error) OperationID

func (e *Error) OperationID() string

OperationID returns the unique trace ID assigned by ngrok to this API request.

func (*Error) String

func (x *Error) String() string

type EventDestination

type EventDestination struct {
	// Unique identifier for this Event Destination.
	ID string `json:"id,omitempty"`
	// Arbitrary user-defined machine-readable data of this Event Destination.
	// Optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// Timestamp when the Event Destination was created, RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`
	// Human-readable description of the Event Destination. Optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// The output format you would like to serialize events into when sending to their
	// target. Currently the only accepted value is JSON.
	Format string `json:"format,omitempty"`
	// An object that encapsulates where and how to send your events. An event
	// destination must contain exactly one of the following objects, leaving the rest
	// null: kinesis, firehose, cloudwatch_logs, or s3.
	Target EventTarget `json:"target,omitempty"`
	// URI of the Event Destination API resource.
	URI string `json:"uri,omitempty"`
}

func (*EventDestination) GoString

func (x *EventDestination) GoString() string

func (*EventDestination) String

func (x *EventDestination) String() string

type EventDestinationCreate

type EventDestinationCreate struct {
	// Arbitrary user-defined machine-readable data of this Event Destination.
	// Optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// Human-readable description of the Event Destination. Optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// The output format you would like to serialize events into when sending to their
	// target. Currently the only accepted value is JSON.
	Format string `json:"format,omitempty"`
	// An object that encapsulates where and how to send your events. An event
	// destination must contain exactly one of the following objects, leaving the rest
	// null: kinesis, firehose, cloudwatch_logs, or s3.
	Target EventTarget `json:"target,omitempty"`
}

func (*EventDestinationCreate) GoString

func (x *EventDestinationCreate) GoString() string

func (*EventDestinationCreate) String

func (x *EventDestinationCreate) String() string

type EventDestinationList

type EventDestinationList struct {
	// The list of all Event Destinations on this account.
	EventDestinations []EventDestination `json:"event_destinations,omitempty"`
	// URI of the Event Destinations list API resource.
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page.
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*EventDestinationList) GoString

func (x *EventDestinationList) GoString() string

func (*EventDestinationList) String

func (x *EventDestinationList) String() string

type EventDestinationUpdate

type EventDestinationUpdate struct {
	// Unique identifier for this Event Destination.
	ID string `json:"id,omitempty"`
	// Arbitrary user-defined machine-readable data of this Event Destination.
	// Optional, max 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
	// Human-readable description of the Event Destination. Optional, max 255 bytes.
	Description *string `json:"description,omitempty"`
	// The output format you would like to serialize events into when sending to their
	// target. Currently the only accepted value is JSON.
	Format *string `json:"format,omitempty"`
	// An object that encapsulates where and how to send your events. An event
	// destination must contain exactly one of the following objects, leaving the rest
	// null: kinesis, firehose, cloudwatch_logs, or s3.
	Target *EventTarget `json:"target,omitempty"`
}

func (*EventDestinationUpdate) GoString

func (x *EventDestinationUpdate) GoString() string

func (*EventDestinationUpdate) String

func (x *EventDestinationUpdate) String() string

type EventSource

type EventSource struct {
	// Type of event for which an event subscription will trigger
	Type string `json:"type,omitempty"`
	// URI of the Event Source API resource.
	URI string `json:"uri,omitempty"`
}

func (*EventSource) GoString

func (x *EventSource) GoString() string

func (*EventSource) String

func (x *EventSource) String() string

type EventSourceCreate

type EventSourceCreate struct {
	// The unique identifier for the Event Subscription that this Event Source is
	// attached to.
	SubscriptionID string `json:"subscription_id,omitempty"`
	// Type of event for which an event subscription will trigger
	Type string `json:"type,omitempty"`
}

func (*EventSourceCreate) GoString

func (x *EventSourceCreate) GoString() string

func (*EventSourceCreate) String

func (x *EventSourceCreate) String() string

type EventSourceItem

type EventSourceItem struct {
	// The unique identifier for the Event Subscription that this Event Source is
	// attached to.
	SubscriptionID string `json:"subscription_id,omitempty"`
	// Type of event for which an event subscription will trigger
	Type string `json:"type,omitempty"`
}

This is needed instead of Item because the parameters are different.

func (*EventSourceItem) GoString

func (x *EventSourceItem) GoString() string

func (*EventSourceItem) String

func (x *EventSourceItem) String() string

type EventSourceList

type EventSourceList struct {
	// The list of all Event Sources for an Event Subscription
	Sources []EventSource `json:"sources,omitempty"`
	// URI of the next page, or null if there is no next page.
	URI string `json:"uri,omitempty"`
}

func (*EventSourceList) GoString

func (x *EventSourceList) GoString() string

func (*EventSourceList) String

func (x *EventSourceList) String() string

type EventSourcePaging

type EventSourcePaging struct {
	// The unique identifier for the Event Subscription that this Event Source is
	// attached to.
	SubscriptionID string `json:"subscription_id,omitempty"`
}

This is needed instead of Paging because the parameters are different. We also don't need the typical pagination params because pagination of this isn't necessary or supported.

func (*EventSourcePaging) GoString

func (x *EventSourcePaging) GoString() string

func (*EventSourcePaging) String

func (x *EventSourcePaging) String() string

type EventSourceReplace

type EventSourceReplace struct {
	// Type of event for which an event subscription will trigger
	Type string `json:"type,omitempty"`
}

func (*EventSourceReplace) GoString

func (x *EventSourceReplace) GoString() string

func (*EventSourceReplace) String

func (x *EventSourceReplace) String() string

type EventSourceUpdate

type EventSourceUpdate struct {
	// The unique identifier for the Event Subscription that this Event Source is
	// attached to.
	SubscriptionID string `json:"subscription_id,omitempty"`
	// Type of event for which an event subscription will trigger
	Type string `json:"type,omitempty"`
}

func (*EventSourceUpdate) GoString

func (x *EventSourceUpdate) GoString() string

func (*EventSourceUpdate) String

func (x *EventSourceUpdate) String() string

type EventSubscription

type EventSubscription struct {
	// Unique identifier for this Event Subscription.
	ID string `json:"id,omitempty"`
	// URI of the Event Subscription API resource.
	URI string `json:"uri,omitempty"`
	// When the Event Subscription was created (RFC 3339 format).
	CreatedAt string `json:"created_at,omitempty"`
	// Arbitrary customer supplied information intended to be machine readable.
	// Optional, max 4096 chars.
	Metadata string `json:"metadata,omitempty"`
	// Arbitrary customer supplied information intended to be human readable. Optional,
	// max 255 chars.
	Description string `json:"description,omitempty"`
	// Sources containing the types for which this event subscription will trigger
	Sources []EventSource `json:"sources,omitempty"`
	// Destinations to which these events will be sent
	Destinations []Ref `json:"destinations,omitempty"`
}

func (*EventSubscription) GoString

func (x *EventSubscription) GoString() string

func (*EventSubscription) String

func (x *EventSubscription) String() string

type EventSubscriptionCreate

type EventSubscriptionCreate struct {
	// Arbitrary customer supplied information intended to be machine readable.
	// Optional, max 4096 chars.
	Metadata string `json:"metadata,omitempty"`
	// Arbitrary customer supplied information intended to be human readable. Optional,
	// max 255 chars.
	Description string `json:"description,omitempty"`
	// Sources containing the types for which this event subscription will trigger
	Sources []EventSourceReplace `json:"sources,omitempty"`
	// A list of Event Destination IDs which should be used for this Event
	// Subscription.
	DestinationIDs []string `json:"destination_ids,omitempty"`
}

func (*EventSubscriptionCreate) GoString

func (x *EventSubscriptionCreate) GoString() string

func (*EventSubscriptionCreate) String

func (x *EventSubscriptionCreate) String() string

type EventSubscriptionList

type EventSubscriptionList struct {
	// The list of all Event Subscriptions on this account.
	EventSubscriptions []EventSubscription `json:"event_subscriptions,omitempty"`
	// URI of the Event Subscriptions list API resource.
	URI string `json:"uri,omitempty"`
	// URI of next page, or null if there is no next page.
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*EventSubscriptionList) GoString

func (x *EventSubscriptionList) GoString() string

func (*EventSubscriptionList) String

func (x *EventSubscriptionList) String() string

type EventSubscriptionUpdate

type EventSubscriptionUpdate struct {
	// Unique identifier for this Event Subscription.
	ID string `json:"id,omitempty"`
	// Arbitrary customer supplied information intended to be machine readable.
	// Optional, max 4096 chars.
	Metadata *string `json:"metadata,omitempty"`
	// Arbitrary customer supplied information intended to be human readable. Optional,
	// max 255 chars.
	Description *string `json:"description,omitempty"`
	// Sources containing the types for which this event subscription will trigger
	Sources []EventSourceReplace `json:"sources,omitempty"`
	// A list of Event Destination IDs which should be used for this Event
	// Subscription.
	DestinationIDs []string `json:"destination_ids,omitempty"`
}

func (*EventSubscriptionUpdate) GoString

func (x *EventSubscriptionUpdate) GoString() string

func (*EventSubscriptionUpdate) String

func (x *EventSubscriptionUpdate) String() string

type EventTarget

type EventTarget struct {
	// Configuration used to send events to Amazon Kinesis Data Firehose.
	Firehose *EventTargetFirehose `json:"firehose,omitempty"`
	// Configuration used to send events to Amazon Kinesis.
	Kinesis *EventTargetKinesis `json:"kinesis,omitempty"`
	// Configuration used to send events to Amazon CloudWatch Logs.
	CloudwatchLogs *EventTargetCloudwatchLogs `json:"cloudwatch_logs,omitempty"`
	// Configuration used to send events to Datadog.
	Datadog *EventTargetDatadog `json:"datadog,omitempty"`
}

func (*EventTarget) GoString

func (x *EventTarget) GoString() string

func (*EventTarget) String

func (x *EventTarget) String() string

type EventTargetCloudwatchLogs

type EventTargetCloudwatchLogs struct {
	// Configuration for how to authenticate into your AWS account. Exactly one of role
	// or creds should be configured.
	Auth AWSAuth `json:"auth,omitempty"`
	// An Amazon Resource Name specifying the CloudWatch Logs group to deposit events
	// into.
	LogGroupARN string `json:"log_group_arn,omitempty"`
}

func (*EventTargetCloudwatchLogs) GoString

func (x *EventTargetCloudwatchLogs) GoString() string

func (*EventTargetCloudwatchLogs) String

func (x *EventTargetCloudwatchLogs) String() string

type EventTargetDatadog added in v5.1.0

type EventTargetDatadog struct {
	// Datadog API key to use.
	ApiKey *string `json:"api_key,omitempty"`
	// Tags to send with the event.
	Ddtags *string `json:"ddtags,omitempty"`
	// Service name to send with the event.
	Service *string `json:"service,omitempty"`
	// Datadog site to send event to.
	Ddsite *string `json:"ddsite,omitempty"`
}

func (*EventTargetDatadog) GoString added in v5.1.0

func (x *EventTargetDatadog) GoString() string

func (*EventTargetDatadog) String added in v5.1.0

func (x *EventTargetDatadog) String() string

type EventTargetFirehose

type EventTargetFirehose struct {
	// Configuration for how to authenticate into your AWS account. Exactly one of role
	// or creds should be configured.
	Auth AWSAuth `json:"auth,omitempty"`
	// An Amazon Resource Name specifying the Firehose delivery stream to deposit
	// events into.
	DeliveryStreamARN string `json:"delivery_stream_arn,omitempty"`
}

func (*EventTargetFirehose) GoString

func (x *EventTargetFirehose) GoString() string

func (*EventTargetFirehose) String

func (x *EventTargetFirehose) String() string

type EventTargetKinesis

type EventTargetKinesis struct {
	// Configuration for how to authenticate into your AWS account. Exactly one of role
	// or creds should be configured.
	Auth AWSAuth `json:"auth,omitempty"`
	// An Amazon Resource Name specifying the Kinesis stream to deposit events into.
	StreamARN string `json:"stream_arn,omitempty"`
}

func (*EventTargetKinesis) GoString

func (x *EventTargetKinesis) GoString() string

func (*EventTargetKinesis) String

func (x *EventTargetKinesis) String() string

type FailoverBackend

type FailoverBackend struct {
	// unique identifier for this Failover backend
	ID string `json:"id,omitempty"`
	// URI of the FailoverBackend API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the backend was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of this backend. Optional
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata string `json:"metadata,omitempty"`
	// the ids of the child backends in order
	Backends []string `json:"backends,omitempty"`
}

func (*FailoverBackend) GoString

func (x *FailoverBackend) GoString() string

func (*FailoverBackend) String

func (x *FailoverBackend) String() string

type FailoverBackendCreate

type FailoverBackendCreate struct {
	// human-readable description of this backend. Optional
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata string `json:"metadata,omitempty"`
	// the ids of the child backends in order
	Backends []string `json:"backends,omitempty"`
}

func (*FailoverBackendCreate) GoString

func (x *FailoverBackendCreate) GoString() string

func (*FailoverBackendCreate) String

func (x *FailoverBackendCreate) String() string

type FailoverBackendList

type FailoverBackendList struct {
	// the list of all Failover backends on this account
	Backends []FailoverBackend `json:"backends,omitempty"`
	// URI of the Failover backends list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*FailoverBackendList) GoString

func (x *FailoverBackendList) GoString() string

func (*FailoverBackendList) String

func (x *FailoverBackendList) String() string

type FailoverBackendUpdate

type FailoverBackendUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of this backend. Optional
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata *string `json:"metadata,omitempty"`
	// the ids of the child backends in order
	Backends []string `json:"backends,omitempty"`
}

func (*FailoverBackendUpdate) GoString

func (x *FailoverBackendUpdate) GoString() string

func (*FailoverBackendUpdate) String

func (x *FailoverBackendUpdate) String() string

type HTTPResponseBackend

type HTTPResponseBackend struct {
	ID string `json:"id,omitempty"`
	// URI of the HTTPResponseBackend API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the backend was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of this backend. Optional
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata string `json:"metadata,omitempty"`
	// body to return as fixed content
	Body string `json:"body,omitempty"`
	// headers to return
	Headers map[string]string `json:"headers,omitempty"`
	// status code to return
	StatusCode int32 `json:"status_code,omitempty"`
}

func (*HTTPResponseBackend) GoString

func (x *HTTPResponseBackend) GoString() string

func (*HTTPResponseBackend) String

func (x *HTTPResponseBackend) String() string

type HTTPResponseBackendCreate

type HTTPResponseBackendCreate struct {
	// human-readable description of this backend. Optional
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata string `json:"metadata,omitempty"`
	// body to return as fixed content
	Body string `json:"body,omitempty"`
	// headers to return
	Headers map[string]string `json:"headers,omitempty"`
	// status code to return
	StatusCode *int32 `json:"status_code,omitempty"`
}

func (*HTTPResponseBackendCreate) GoString

func (x *HTTPResponseBackendCreate) GoString() string

func (*HTTPResponseBackendCreate) String

func (x *HTTPResponseBackendCreate) String() string

type HTTPResponseBackendList

type HTTPResponseBackendList struct {
	Backends    []HTTPResponseBackend `json:"backends,omitempty"`
	URI         string                `json:"uri,omitempty"`
	NextPageURI *string               `json:"next_page_uri,omitempty"`
}

func (*HTTPResponseBackendList) GoString

func (x *HTTPResponseBackendList) GoString() string

func (*HTTPResponseBackendList) String

func (x *HTTPResponseBackendList) String() string

type HTTPResponseBackendUpdate

type HTTPResponseBackendUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of this backend. Optional
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata *string `json:"metadata,omitempty"`
	// body to return as fixed content
	Body *string `json:"body,omitempty"`
	// headers to return
	Headers map[string]string `json:"headers,omitempty"`
	// status code to return
	StatusCode *int32 `json:"status_code,omitempty"`
}

func (*HTTPResponseBackendUpdate) GoString

func (x *HTTPResponseBackendUpdate) GoString() string

func (*HTTPResponseBackendUpdate) String

func (x *HTTPResponseBackendUpdate) String() string

type HTTPSEdge

type HTTPSEdge struct {
	// unique identifier of this edge
	ID string `json:"id,omitempty"`
	// human-readable description of what this edge will be used for; optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this edge; optional, max 4096
	// bytes.
	Metadata string `json:"metadata,omitempty"`
	// timestamp when the edge configuration was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// URI of the edge API resource
	URI string `json:"uri,omitempty"`
	// hostports served by this edge
	Hostports []string `json:"hostports,omitempty"`
	// edge modules
	MutualTls      *EndpointMutualTLS      `json:"mutual_tls,omitempty"`
	TlsTermination *EndpointTLSTermination `json:"tls_termination,omitempty"`
	// routes
	Routes []HTTPSEdgeRoute `json:"routes,omitempty"`
}

func (*HTTPSEdge) GoString

func (x *HTTPSEdge) GoString() string

func (*HTTPSEdge) String

func (x *HTTPSEdge) String() string

type HTTPSEdgeCreate

type HTTPSEdgeCreate struct {
	// human-readable description of what this edge will be used for; optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this edge; optional, max 4096
	// bytes.
	Metadata string `json:"metadata,omitempty"`
	// hostports served by this edge
	Hostports []string `json:"hostports,omitempty"`
	// edge modules
	MutualTLS      *EndpointMutualTLSMutate      `json:"mutual_tls,omitempty"`
	TLSTermination *EndpointTLSTerminationAtEdge `json:"tls_termination,omitempty"`
}

func (*HTTPSEdgeCreate) GoString

func (x *HTTPSEdgeCreate) GoString() string

func (*HTTPSEdgeCreate) String

func (x *HTTPSEdgeCreate) String() string

type HTTPSEdgeList

type HTTPSEdgeList struct {
	// the list of all HTTPS Edges on this account
	HTTPSEdges []HTTPSEdge `json:"https_edges,omitempty"`
	// URI of the HTTPS Edge list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*HTTPSEdgeList) GoString

func (x *HTTPSEdgeList) GoString() string

func (*HTTPSEdgeList) String

func (x *HTTPSEdgeList) String() string

type HTTPSEdgeRoute

type HTTPSEdgeRoute struct {
	// unique identifier of this edge
	EdgeID string `json:"edge_id,omitempty"`
	// unique identifier of this edge route
	ID string `json:"id,omitempty"`
	// timestamp when the edge configuration was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// Type of match to use for this route. Valid values are "exact_path" and
	// "path_prefix".
	MatchType string `json:"match_type,omitempty"`
	// Route selector: "/blog" or "example.com" or "example.com/blog"
	Match string `json:"match,omitempty"`
	// URI of the edge API resource
	URI string `json:"uri,omitempty"`
	// human-readable description of what this edge will be used for; optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
	// bytes.
	Metadata string `json:"metadata,omitempty"`
	// backend module configuration or null
	Backend *EndpointBackend `json:"backend,omitempty"`
	// ip restriction module configuration or null
	IpRestriction *EndpointIPPolicy `json:"ip_restriction,omitempty"`
	// circuit breaker module configuration or null
	CircuitBreaker *EndpointCircuitBreaker `json:"circuit_breaker,omitempty"`
	// compression module configuration or null
	Compression *EndpointCompression `json:"compression,omitempty"`
	// request headers module configuration or null
	RequestHeaders *EndpointRequestHeaders `json:"request_headers,omitempty"`
	// response headers module configuration or null
	ResponseHeaders *EndpointResponseHeaders `json:"response_headers,omitempty"`
	// webhook verification module configuration or null
	WebhookVerification *EndpointWebhookValidation `json:"webhook_verification,omitempty"`
	// oauth module configuration or null
	OAuth *EndpointOAuth `json:"oauth,omitempty"`
	// saml module configuration or null
	SAML *EndpointSAML `json:"saml,omitempty"`
	// oidc module configuration or null
	OIDC *EndpointOIDC `json:"oidc,omitempty"`
	// websocket to tcp adapter configuration or null
	WebsocketTCPConverter *EndpointWebsocketTCPConverter `json:"websocket_tcp_converter,omitempty"`
	UserAgentFilter       *EndpointUserAgentFilter       `json:"user_agent_filter,omitempty"`
	// the traffic policy associated with this edge or null
	Policy *EndpointPolicy `json:"policy,omitempty"`
}

func (*HTTPSEdgeRoute) GoString

func (x *HTTPSEdgeRoute) GoString() string

func (*HTTPSEdgeRoute) String

func (x *HTTPSEdgeRoute) String() string

type HTTPSEdgeRouteCreate

type HTTPSEdgeRouteCreate struct {
	// unique identifier of this edge
	EdgeID string `json:"edge_id,omitempty"`
	// Type of match to use for this route. Valid values are "exact_path" and
	// "path_prefix".
	MatchType string `json:"match_type,omitempty"`
	// Route selector: "/blog" or "example.com" or "example.com/blog"
	Match string `json:"match,omitempty"`
	// human-readable description of what this edge will be used for; optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
	// bytes.
	Metadata string `json:"metadata,omitempty"`
	// backend module configuration or null
	Backend *EndpointBackendMutate `json:"backend,omitempty"`
	// ip restriction module configuration or null
	IPRestriction *EndpointIPPolicyMutate `json:"ip_restriction,omitempty"`
	// circuit breaker module configuration or null
	CircuitBreaker *EndpointCircuitBreaker `json:"circuit_breaker,omitempty"`
	// compression module configuration or null
	Compression *EndpointCompression `json:"compression,omitempty"`
	// request headers module configuration or null
	RequestHeaders *EndpointRequestHeaders `json:"request_headers,omitempty"`
	// response headers module configuration or null
	ResponseHeaders *EndpointResponseHeaders `json:"response_headers,omitempty"`
	// webhook verification module configuration or null
	WebhookVerification *EndpointWebhookValidation `json:"webhook_verification,omitempty"`
	// oauth module configuration or null
	OAuth *EndpointOAuth `json:"oauth,omitempty"`
	// saml module configuration or null
	SAML *EndpointSAMLMutate `json:"saml,omitempty"`
	// oidc module configuration or null
	OIDC *EndpointOIDC `json:"oidc,omitempty"`
	// websocket to tcp adapter configuration or null
	WebsocketTCPConverter *EndpointWebsocketTCPConverter `json:"websocket_tcp_converter,omitempty"`
	UserAgentFilter       *EndpointUserAgentFilter       `json:"user_agent_filter,omitempty"`
	// the traffic policy associated with this edge or null
	Policy *EndpointPolicy `json:"policy,omitempty"`
}

func (*HTTPSEdgeRouteCreate) GoString

func (x *HTTPSEdgeRouteCreate) GoString() string

func (*HTTPSEdgeRouteCreate) String

func (x *HTTPSEdgeRouteCreate) String() string

type HTTPSEdgeRouteUpdate

type HTTPSEdgeRouteUpdate struct {
	// unique identifier of this edge
	EdgeID string `json:"edge_id,omitempty"`
	// unique identifier of this edge route
	ID string `json:"id,omitempty"`
	// Type of match to use for this route. Valid values are "exact_path" and
	// "path_prefix".
	MatchType string `json:"match_type,omitempty"`
	// Route selector: "/blog" or "example.com" or "example.com/blog"
	Match string `json:"match,omitempty"`
	// human-readable description of what this edge will be used for; optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
	// bytes.
	Metadata string `json:"metadata,omitempty"`
	// backend module configuration or null
	Backend *EndpointBackendMutate `json:"backend,omitempty"`
	// ip restriction module configuration or null
	IPRestriction *EndpointIPPolicyMutate `json:"ip_restriction,omitempty"`
	// circuit breaker module configuration or null
	CircuitBreaker *EndpointCircuitBreaker `json:"circuit_breaker,omitempty"`
	// compression module configuration or null
	Compression *EndpointCompression `json:"compression,omitempty"`
	// request headers module configuration or null
	RequestHeaders *EndpointRequestHeaders `json:"request_headers,omitempty"`
	// response headers module configuration or null
	ResponseHeaders *EndpointResponseHeaders `json:"response_headers,omitempty"`
	// webhook verification module configuration or null
	WebhookVerification *EndpointWebhookValidation `json:"webhook_verification,omitempty"`
	// oauth module configuration or null
	OAuth *EndpointOAuth `json:"oauth,omitempty"`
	// saml module configuration or null
	SAML *EndpointSAMLMutate `json:"saml,omitempty"`
	// oidc module configuration or null
	OIDC *EndpointOIDC `json:"oidc,omitempty"`
	// websocket to tcp adapter configuration or null
	WebsocketTCPConverter *EndpointWebsocketTCPConverter `json:"websocket_tcp_converter,omitempty"`
	UserAgentFilter       *EndpointUserAgentFilter       `json:"user_agent_filter,omitempty"`
	// the traffic policy associated with this edge or null
	Policy *EndpointPolicy `json:"policy,omitempty"`
}

func (*HTTPSEdgeRouteUpdate) GoString

func (x *HTTPSEdgeRouteUpdate) GoString() string

func (*HTTPSEdgeRouteUpdate) String

func (x *HTTPSEdgeRouteUpdate) String() string

type HTTPSEdgeUpdate

type HTTPSEdgeUpdate struct {
	// unique identifier of this edge
	ID string `json:"id,omitempty"`
	// human-readable description of what this edge will be used for; optional, max 255
	// bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this edge; optional, max 4096
	// bytes.
	Metadata *string `json:"metadata,omitempty"`
	// hostports served by this edge
	Hostports []string `json:"hostports,omitempty"`
	// edge modules
	MutualTLS      *EndpointMutualTLSMutate      `json:"mutual_tls,omitempty"`
	TLSTermination *EndpointTLSTerminationAtEdge `json:"tls_termination,omitempty"`
}

func (*HTTPSEdgeUpdate) GoString

func (x *HTTPSEdgeUpdate) GoString() string

func (*HTTPSEdgeUpdate) String

func (x *HTTPSEdgeUpdate) String() string

type IPPolicy

type IPPolicy struct {
	// unique identifier for this IP policy
	ID string `json:"id,omitempty"`
	// URI of the IP Policy API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the IP policy was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of the source IPs of this IP policy. optional, max
	// 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this IP policy. optional, max
	// 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
}

func (*IPPolicy) GoString

func (x *IPPolicy) GoString() string

func (*IPPolicy) String

func (x *IPPolicy) String() string

type IPPolicyCreate

type IPPolicyCreate struct {
	// human-readable description of the source IPs of this IP policy. optional, max
	// 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this IP policy. optional, max
	// 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
}

func (*IPPolicyCreate) GoString

func (x *IPPolicyCreate) GoString() string

func (*IPPolicyCreate) String

func (x *IPPolicyCreate) String() string

type IPPolicyList

type IPPolicyList struct {
	// the list of all IP policies on this account
	IPPolicies []IPPolicy `json:"ip_policies,omitempty"`
	// URI of the IP policy list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*IPPolicyList) GoString

func (x *IPPolicyList) GoString() string

func (*IPPolicyList) String

func (x *IPPolicyList) String() string

type IPPolicyRule

type IPPolicyRule struct {
	// unique identifier for this IP policy rule
	ID string `json:"id,omitempty"`
	// URI of the IP policy rule API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the IP policy rule was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of the source IPs of this IP rule. optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this IP policy rule. optional,
	// max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
	CIDR string `json:"cidr,omitempty"`
	// object describing the IP policy this IP Policy Rule belongs to
	IPPolicy Ref `json:"ip_policy,omitempty"`
	// the action to apply to the policy rule, either allow or deny
	Action string `json:"action,omitempty"`
}

func (*IPPolicyRule) GoString

func (x *IPPolicyRule) GoString() string

func (*IPPolicyRule) String

func (x *IPPolicyRule) String() string

type IPPolicyRuleCreate

type IPPolicyRuleCreate struct {
	// human-readable description of the source IPs of this IP rule. optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this IP policy rule. optional,
	// max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
	CIDR string `json:"cidr,omitempty"`
	// ID of the IP policy this IP policy rule will be attached to
	IPPolicyID string `json:"ip_policy_id,omitempty"`
	// the action to apply to the policy rule, either allow or deny
	Action *string `json:"action,omitempty"`
}

func (*IPPolicyRuleCreate) GoString

func (x *IPPolicyRuleCreate) GoString() string

func (*IPPolicyRuleCreate) String

func (x *IPPolicyRuleCreate) String() string

type IPPolicyRuleList

type IPPolicyRuleList struct {
	// the list of all IP policy rules on this account
	IPPolicyRules []IPPolicyRule `json:"ip_policy_rules,omitempty"`
	// URI of the IP policy rule list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*IPPolicyRuleList) GoString

func (x *IPPolicyRuleList) GoString() string

func (*IPPolicyRuleList) String

func (x *IPPolicyRuleList) String() string

type IPPolicyRuleUpdate

type IPPolicyRuleUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of the source IPs of this IP rule. optional, max 255
	// bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this IP policy rule. optional,
	// max 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
	// an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
	CIDR *string `json:"cidr,omitempty"`
}

func (*IPPolicyRuleUpdate) GoString

func (x *IPPolicyRuleUpdate) GoString() string

func (*IPPolicyRuleUpdate) String

func (x *IPPolicyRuleUpdate) String() string

type IPPolicyUpdate

type IPPolicyUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of the source IPs of this IP policy. optional, max
	// 255 bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this IP policy. optional, max
	// 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
}

func (*IPPolicyUpdate) GoString

func (x *IPPolicyUpdate) GoString() string

func (*IPPolicyUpdate) String

func (x *IPPolicyUpdate) String() string

type IPRestriction

type IPRestriction struct {
	// unique identifier for this IP restriction
	ID string `json:"id,omitempty"`
	// URI of the IP restriction API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the IP restriction was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of this IP restriction. optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this IP restriction. optional,
	// max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// true if the IP restriction will be enforced. if false, only warnings will be
	// issued
	Enforced bool `json:"enforced,omitempty"`
	// the type of IP restriction. this defines what traffic will be restricted with
	// the attached policies. four values are currently supported: dashboard, api,
	// agent, and endpoints
	Type string `json:"type,omitempty"`
	// the set of IP policies that are used to enforce the restriction
	IPPolicies []Ref `json:"ip_policies,omitempty"`
}

func (*IPRestriction) GoString

func (x *IPRestriction) GoString() string

func (*IPRestriction) String

func (x *IPRestriction) String() string

type IPRestrictionCreate

type IPRestrictionCreate struct {
	// human-readable description of this IP restriction. optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this IP restriction. optional,
	// max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// true if the IP restriction will be enforced. if false, only warnings will be
	// issued
	Enforced bool `json:"enforced,omitempty"`
	// the type of IP restriction. this defines what traffic will be restricted with
	// the attached policies. four values are currently supported: dashboard, api,
	// agent, and endpoints
	Type string `json:"type,omitempty"`
	// the set of IP policy identifiers that are used to enforce the restriction
	IPPolicyIDs []string `json:"ip_policy_ids,omitempty"`
}

func (*IPRestrictionCreate) GoString

func (x *IPRestrictionCreate) GoString() string

func (*IPRestrictionCreate) String

func (x *IPRestrictionCreate) String() string

type IPRestrictionList

type IPRestrictionList struct {
	// the list of all IP restrictions on this account
	IPRestrictions []IPRestriction `json:"ip_restrictions,omitempty"`
	// URI of the IP restrictions list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*IPRestrictionList) GoString

func (x *IPRestrictionList) GoString() string

func (*IPRestrictionList) String

func (x *IPRestrictionList) String() string

type IPRestrictionUpdate

type IPRestrictionUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of this IP restriction. optional, max 255 bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this IP restriction. optional,
	// max 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
	// true if the IP restriction will be enforced. if false, only warnings will be
	// issued
	Enforced *bool `json:"enforced,omitempty"`
	// the set of IP policy identifiers that are used to enforce the restriction
	IPPolicyIDs []string `json:"ip_policy_ids,omitempty"`
}

func (*IPRestrictionUpdate) GoString

func (x *IPRestrictionUpdate) GoString() string

func (*IPRestrictionUpdate) String

func (x *IPRestrictionUpdate) String() string

type IdentityProvider

type IdentityProvider struct {
	// name of the identity provider (e.g. Google)
	Name string `json:"name,omitempty"`
	// URL of the identity provider (e.g. https://accounts.google.com
	// (https://accounts.google.com))
	URL string `json:"url,omitempty"`
}

func (*IdentityProvider) GoString

func (x *IdentityProvider) GoString() string

func (*IdentityProvider) String

func (x *IdentityProvider) String() string

type Item

type Item struct {
	// a resource identifier
	ID string `json:"id,omitempty"`
}

func (*Item) GoString

func (x *Item) GoString() string

func (*Item) String

func (x *Item) String() string

type Location

type Location struct {
	// ISO country code
	CountryCode *string `json:"country_code,omitempty"`
	// geographical latitude
	Latitude *float64 `json:"latitude,omitempty"`
	// geographical longitude
	Longitude *float64 `json:"longitude,omitempty"`
	// accuracy radius of the geographical coordinates
	LatLongRadiusKm *uint64 `json:"lat_long_radius_km,omitempty"`
}

func (*Location) GoString

func (x *Location) GoString() string

func (*Location) String

func (x *Location) String() string

type Paging

type Paging struct {
	BeforeID *string `json:"before_id,omitempty"`
	Limit    *string `json:"limit,omitempty"`
}

func (*Paging) GoString

func (x *Paging) GoString() string

func (*Paging) String

func (x *Paging) String() string

type Ref

type Ref struct {
	// a resource identifier
	ID string `json:"id,omitempty"`
	// a uri for locating a resource
	URI string `json:"uri,omitempty"`
}

func (*Ref) GoString

func (x *Ref) GoString() string

func (*Ref) String

func (x *Ref) String() string

type ReservedAddr

type ReservedAddr struct {
	// unique reserved address resource identifier
	ID string `json:"id,omitempty"`
	// URI of the reserved address API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the reserved address was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of what this reserved address will be used for
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this reserved address. Optional,
	// max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// hostname:port of the reserved address that was assigned at creation time
	Addr string `json:"addr,omitempty"`
	// reserve the address in this geographic ngrok datacenter. Optional, default is
	// us. (au, eu, ap, us, jp, in, sa)
	Region string `json:"region,omitempty"`
}

func (*ReservedAddr) GoString

func (x *ReservedAddr) GoString() string

func (*ReservedAddr) String

func (x *ReservedAddr) String() string

type ReservedAddrCreate

type ReservedAddrCreate struct {
	// human-readable description of what this reserved address will be used for
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this reserved address. Optional,
	// max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// reserve the address in this geographic ngrok datacenter. Optional, default is
	// us. (au, eu, ap, us, jp, in, sa)
	Region string `json:"region,omitempty"`
}

func (*ReservedAddrCreate) GoString

func (x *ReservedAddrCreate) GoString() string

func (*ReservedAddrCreate) String

func (x *ReservedAddrCreate) String() string

type ReservedAddrList

type ReservedAddrList struct {
	// the list of all reserved addresses on this account
	ReservedAddrs []ReservedAddr `json:"reserved_addrs,omitempty"`
	// URI of the reserved address list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*ReservedAddrList) GoString

func (x *ReservedAddrList) GoString() string

func (*ReservedAddrList) String

func (x *ReservedAddrList) String() string

type ReservedAddrUpdate

type ReservedAddrUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of what this reserved address will be used for
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this reserved address. Optional,
	// max 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
}

func (*ReservedAddrUpdate) GoString

func (x *ReservedAddrUpdate) GoString() string

func (*ReservedAddrUpdate) String

func (x *ReservedAddrUpdate) String() string

type ReservedDomain

type ReservedDomain struct {
	// unique reserved domain resource identifier
	ID string `json:"id,omitempty"`
	// URI of the reserved domain API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the reserved domain was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of what this reserved domain will be used for
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this reserved domain. Optional,
	// max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// hostname of the reserved domain
	Domain string `json:"domain,omitempty"`
	// deprecated: With the launch of the ngrok Global Network domains traffic is now
	// handled globally. This field applied only to endpoints. Note that agents may
	// still connect to specific regions. Optional, null by default. (au, eu, ap, us,
	// jp, in, sa)
	Region string `json:"region,omitempty"`
	// DNS CNAME target for a custom hostname, or null if the reserved domain is a
	// subdomain of an ngrok owned domain (e.g. *.ngrok.app)
	CNAMETarget *string `json:"cname_target,omitempty"`
	// object referencing the TLS certificate used for connections to this domain. This
	// can be either a user-uploaded certificate, the most recently issued automatic
	// one, or null otherwise.
	Certificate *Ref `json:"certificate,omitempty"`
	// configuration for automatic management of TLS certificates for this domain, or
	// null if automatic management is disabled
	CertificateManagementPolicy *ReservedDomainCertPolicy `json:"certificate_management_policy,omitempty"`
	// status of the automatic certificate management for this domain, or null if
	// automatic management is disabled
	CertificateManagementStatus *ReservedDomainCertStatus `json:"certificate_management_status,omitempty"`
	// DNS CNAME target for the host _acme-challenge.example.com, where example.com is
	// your reserved domain name. This is required to issue certificates for wildcard,
	// non-ngrok reserved domains. Must be null for non-wildcard domains and ngrok
	// subdomains.
	ACMEChallengeCNAMETarget *string `json:"acme_challenge_cname_target,omitempty"`
}

func (*ReservedDomain) GoString

func (x *ReservedDomain) GoString() string

func (*ReservedDomain) String

func (x *ReservedDomain) String() string

type ReservedDomainCertJob

type ReservedDomainCertJob struct {
	// if present, an error code indicating why provisioning is failing. It may be
	// either a temporary condition (INTERNAL_ERROR), or a permanent one the user must
	// correct (DNS_ERROR).
	ErrorCode *string `json:"error_code,omitempty"`
	// a message describing the current status or error
	Msg string `json:"msg,omitempty"`
	// timestamp when the provisioning job started, RFC 3339 format
	StartedAt string `json:"started_at,omitempty"`
	// timestamp when the provisioning job will be retried
	RetriesAt *string `json:"retries_at,omitempty"`
}

func (*ReservedDomainCertJob) GoString

func (x *ReservedDomainCertJob) GoString() string

func (*ReservedDomainCertJob) String

func (x *ReservedDomainCertJob) String() string

type ReservedDomainCertPolicy

type ReservedDomainCertPolicy struct {
	// certificate authority to request certificates from. The only supported value is
	// letsencrypt.
	Authority string `json:"authority,omitempty"`
	// type of private key to use when requesting certificates. Defaults to rsa, can be
	// either rsa or ecdsa.
	PrivateKeyType string `json:"private_key_type,omitempty"`
}

func (*ReservedDomainCertPolicy) GoString

func (x *ReservedDomainCertPolicy) GoString() string

func (*ReservedDomainCertPolicy) String

func (x *ReservedDomainCertPolicy) String() string

type ReservedDomainCertStatus

type ReservedDomainCertStatus struct {
	// timestamp when the next renewal will be requested, RFC 3339 format
	RenewsAt *string `json:"renews_at,omitempty"`
	// status of the certificate provisioning job, or null if the certificiate isn't
	// being provisioned or renewed
	ProvisioningJob *ReservedDomainCertJob `json:"provisioning_job,omitempty"`
}

func (*ReservedDomainCertStatus) GoString

func (x *ReservedDomainCertStatus) GoString() string

func (*ReservedDomainCertStatus) String

func (x *ReservedDomainCertStatus) String() string

type ReservedDomainCreate

type ReservedDomainCreate struct {
	// hostname of the reserved domain
	Domain string `json:"domain,omitempty"`
	// deprecated: With the launch of the ngrok Global Network domains traffic is now
	// handled globally. This field applied only to endpoints. Note that agents may
	// still connect to specific regions. Optional, null by default. (au, eu, ap, us,
	// jp, in, sa)
	Region string `json:"region,omitempty"`
	// human-readable description of what this reserved domain will be used for
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this reserved domain. Optional,
	// max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// ID of a user-uploaded TLS certificate to use for connections to targeting this
	// domain. Optional, mutually exclusive with certificate_management_policy.
	CertificateID *string `json:"certificate_id,omitempty"`
	// configuration for automatic management of TLS certificates for this domain, or
	// null if automatic management is disabled. Optional, mutually exclusive with
	// certificate_id.
	CertificateManagementPolicy *ReservedDomainCertPolicy `json:"certificate_management_policy,omitempty"`
}

func (*ReservedDomainCreate) GoString

func (x *ReservedDomainCreate) GoString() string

func (*ReservedDomainCreate) String

func (x *ReservedDomainCreate) String() string

type ReservedDomainList

type ReservedDomainList struct {
	// the list of all reserved domains on this account
	ReservedDomains []ReservedDomain `json:"reserved_domains,omitempty"`
	// URI of the reserved domain list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*ReservedDomainList) GoString

func (x *ReservedDomainList) GoString() string

func (*ReservedDomainList) String

func (x *ReservedDomainList) String() string

type ReservedDomainUpdate

type ReservedDomainUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of what this reserved domain will be used for
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this reserved domain. Optional,
	// max 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
	// ID of a user-uploaded TLS certificate to use for connections to targeting this
	// domain. Optional, mutually exclusive with certificate_management_policy.
	CertificateID *string `json:"certificate_id,omitempty"`
	// configuration for automatic management of TLS certificates for this domain, or
	// null if automatic management is disabled. Optional, mutually exclusive with
	// certificate_id.
	CertificateManagementPolicy *ReservedDomainCertPolicy `json:"certificate_management_policy,omitempty"`
}

func (*ReservedDomainUpdate) GoString

func (x *ReservedDomainUpdate) GoString() string

func (*ReservedDomainUpdate) String

func (x *ReservedDomainUpdate) String() string

type SSHCertificateAuthority

type SSHCertificateAuthority struct {
	// unique identifier for this SSH Certificate Authority
	ID string `json:"id,omitempty"`
	// URI of the SSH Certificate Authority API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the SSH Certificate Authority API resource was created, RFC 3339
	// format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of this SSH Certificate Authority. optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this SSH Certificate Authority.
	// optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// raw public key for this SSH Certificate Authority
	PublicKey string `json:"public_key,omitempty"`
	// the type of private key for this SSH Certificate Authority
	KeyType string `json:"key_type,omitempty"`
}

func (*SSHCertificateAuthority) GoString

func (x *SSHCertificateAuthority) GoString() string

func (*SSHCertificateAuthority) String

func (x *SSHCertificateAuthority) String() string

type SSHCertificateAuthorityCreate

type SSHCertificateAuthorityCreate struct {
	// human-readable description of this SSH Certificate Authority. optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this SSH Certificate Authority.
	// optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// the type of private key to generate. one of rsa, ecdsa, ed25519
	PrivateKeyType string `json:"private_key_type,omitempty"`
	// the type of elliptic curve to use when creating an ECDSA key
	EllipticCurve string `json:"elliptic_curve,omitempty"`
	// the key size to use when creating an RSA key. one of 2048 or 4096
	KeySize int64 `json:"key_size,omitempty"`
}

func (*SSHCertificateAuthorityCreate) GoString

func (x *SSHCertificateAuthorityCreate) GoString() string

func (*SSHCertificateAuthorityCreate) String

type SSHCertificateAuthorityList

type SSHCertificateAuthorityList struct {
	// the list of all certificate authorities on this account
	SSHCertificateAuthorities []SSHCertificateAuthority `json:"ssh_certificate_authorities,omitempty"`
	// URI of the certificates authorities list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*SSHCertificateAuthorityList) GoString

func (x *SSHCertificateAuthorityList) GoString() string

func (*SSHCertificateAuthorityList) String

func (x *SSHCertificateAuthorityList) String() string

type SSHCertificateAuthorityUpdate

type SSHCertificateAuthorityUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of this SSH Certificate Authority. optional, max 255
	// bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this SSH Certificate Authority.
	// optional, max 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
}

func (*SSHCertificateAuthorityUpdate) GoString

func (x *SSHCertificateAuthorityUpdate) GoString() string

func (*SSHCertificateAuthorityUpdate) String

type SSHCredential

type SSHCredential struct {
	// unique ssh credential resource identifier
	ID string `json:"id,omitempty"`
	// URI of the ssh credential API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the ssh credential was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of who or what will use the ssh credential to
	// authenticate. Optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this ssh credential. Optional,
	// max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// the PEM-encoded public key of the SSH keypair that will be used to authenticate
	PublicKey string `json:"public_key,omitempty"`
	// optional list of ACL rules. If unspecified, the credential will have no
	// restrictions. The only allowed ACL rule at this time is the bind rule. The bind
	// rule allows the caller to restrict what domains, addresses, and labels the token
	// is allowed to bind. For example, to allow the token to open a tunnel on
	// example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind
	// rules for domains may specify a leading wildcard to match multiple domains with
	// a common suffix. For example, you may specify a rule of bind:*.example.com which
	// will allow x.example.com, y.example.com, *.example.com, etc. Bind rules for
	// labels may specify a wildcard key and/or value to match multiple labels. For
	// example, you may specify a rule of bind:*=example which will allow x=example,
	// y=example, etc. A rule of '*' is equivalent to no acl at all and will explicitly
	// permit all actions.
	ACL []string `json:"acl,omitempty"`
	// If supplied at credential creation, ownership will be assigned to the specified
	// User or Bot. Only admins may specify an owner other than themselves. Defaults to
	// the authenticated User or Bot.
	OwnerID *string `json:"owner_id,omitempty"`
}

func (*SSHCredential) GoString

func (x *SSHCredential) GoString() string

func (*SSHCredential) String

func (x *SSHCredential) String() string

type SSHCredentialCreate

type SSHCredentialCreate struct {
	// human-readable description of who or what will use the ssh credential to
	// authenticate. Optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this ssh credential. Optional,
	// max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// optional list of ACL rules. If unspecified, the credential will have no
	// restrictions. The only allowed ACL rule at this time is the bind rule. The bind
	// rule allows the caller to restrict what domains, addresses, and labels the token
	// is allowed to bind. For example, to allow the token to open a tunnel on
	// example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind
	// rules for domains may specify a leading wildcard to match multiple domains with
	// a common suffix. For example, you may specify a rule of bind:*.example.com which
	// will allow x.example.com, y.example.com, *.example.com, etc. Bind rules for
	// labels may specify a wildcard key and/or value to match multiple labels. For
	// example, you may specify a rule of bind:*=example which will allow x=example,
	// y=example, etc. A rule of '*' is equivalent to no acl at all and will explicitly
	// permit all actions.
	ACL []string `json:"acl,omitempty"`
	// the PEM-encoded public key of the SSH keypair that will be used to authenticate
	PublicKey string `json:"public_key,omitempty"`
	// If supplied at credential creation, ownership will be assigned to the specified
	// User or Bot. Only admins may specify an owner other than themselves. Defaults to
	// the authenticated User or Bot.
	OwnerID *string `json:"owner_id,omitempty"`
}

func (*SSHCredentialCreate) GoString

func (x *SSHCredentialCreate) GoString() string

func (*SSHCredentialCreate) String

func (x *SSHCredentialCreate) String() string

type SSHCredentialList

type SSHCredentialList struct {
	// the list of all ssh credentials on this account
	SSHCredentials []SSHCredential `json:"ssh_credentials,omitempty"`
	// URI of the ssh credential list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*SSHCredentialList) GoString

func (x *SSHCredentialList) GoString() string

func (*SSHCredentialList) String

func (x *SSHCredentialList) String() string

type SSHCredentialUpdate

type SSHCredentialUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of who or what will use the ssh credential to
	// authenticate. Optional, max 255 bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this ssh credential. Optional,
	// max 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
	// optional list of ACL rules. If unspecified, the credential will have no
	// restrictions. The only allowed ACL rule at this time is the bind rule. The bind
	// rule allows the caller to restrict what domains, addresses, and labels the token
	// is allowed to bind. For example, to allow the token to open a tunnel on
	// example.ngrok.io your ACL would include the rule bind:example.ngrok.io. Bind
	// rules for domains may specify a leading wildcard to match multiple domains with
	// a common suffix. For example, you may specify a rule of bind:*.example.com which
	// will allow x.example.com, y.example.com, *.example.com, etc. Bind rules for
	// labels may specify a wildcard key and/or value to match multiple labels. For
	// example, you may specify a rule of bind:*=example which will allow x=example,
	// y=example, etc. A rule of '*' is equivalent to no acl at all and will explicitly
	// permit all actions.
	ACL []string `json:"acl,omitempty"`
}

func (*SSHCredentialUpdate) GoString

func (x *SSHCredentialUpdate) GoString() string

func (*SSHCredentialUpdate) String

func (x *SSHCredentialUpdate) String() string

type SSHHostCertificate

type SSHHostCertificate struct {
	// unique identifier for this SSH Host Certificate
	ID string `json:"id,omitempty"`
	// URI of the SSH Host Certificate API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the SSH Host Certificate API resource was created, RFC 3339
	// format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of this SSH Host Certificate. optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this SSH Host Certificate.
	// optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// a public key in OpenSSH Authorized Keys format that this certificate signs
	PublicKey string `json:"public_key,omitempty"`
	// the key type of the public_key, one of rsa, ecdsa or ed25519
	KeyType string `json:"key_type,omitempty"`
	// the ssh certificate authority that is used to sign this ssh host certificate
	SSHCertificateAuthorityID string `json:"ssh_certificate_authority_id,omitempty"`
	// the list of principals included in the ssh host certificate. This is the list of
	// hostnames and/or IP addresses that are authorized to serve SSH traffic with this
	// certificate. Dangerously, if no principals are specified, this certificate is
	// considered valid for all hosts.
	Principals []string `json:"principals,omitempty"`
	// the time when the ssh host certificate becomes valid, in RFC 3339 format.
	ValidAfter string `json:"valid_after,omitempty"`
	// the time after which the ssh host certificate becomes invalid, in RFC 3339
	// format. the OpenSSH certificates RFC calls this valid_before.
	ValidUntil string `json:"valid_until,omitempty"`
	// the signed SSH certificate in OpenSSH Authorized Keys format. this value should
	// be placed in a -cert.pub certificate file on disk that should be referenced in
	// your sshd_config configuration file with a HostCertificate directive
	Certificate string `json:"certificate,omitempty"`
}

func (*SSHHostCertificate) GoString

func (x *SSHHostCertificate) GoString() string

func (*SSHHostCertificate) String

func (x *SSHHostCertificate) String() string

type SSHHostCertificateCreate

type SSHHostCertificateCreate struct {
	// the ssh certificate authority that is used to sign this ssh host certificate
	SSHCertificateAuthorityID string `json:"ssh_certificate_authority_id,omitempty"`
	// a public key in OpenSSH Authorized Keys format that this certificate signs
	PublicKey string `json:"public_key,omitempty"`
	// the list of principals included in the ssh host certificate. This is the list of
	// hostnames and/or IP addresses that are authorized to serve SSH traffic with this
	// certificate. Dangerously, if no principals are specified, this certificate is
	// considered valid for all hosts.
	Principals []string `json:"principals,omitempty"`
	// The time when the host certificate becomes valid, in RFC 3339 format. Defaults
	// to the current time if unspecified.
	ValidAfter string `json:"valid_after,omitempty"`
	// The time when this host certificate becomes invalid, in RFC 3339 format. If
	// unspecified, a default value of one year in the future will be used. The OpenSSH
	// certificates RFC calls this valid_before.
	ValidUntil string `json:"valid_until,omitempty"`
	// human-readable description of this SSH Host Certificate. optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this SSH Host Certificate.
	// optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
}

func (*SSHHostCertificateCreate) GoString

func (x *SSHHostCertificateCreate) GoString() string

func (*SSHHostCertificateCreate) String

func (x *SSHHostCertificateCreate) String() string

type SSHHostCertificateList

type SSHHostCertificateList struct {
	// the list of all ssh host certificates on this account
	SSHHostCertificates []SSHHostCertificate `json:"ssh_host_certificates,omitempty"`
	// URI of the ssh host certificates list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*SSHHostCertificateList) GoString

func (x *SSHHostCertificateList) GoString() string

func (*SSHHostCertificateList) String

func (x *SSHHostCertificateList) String() string

type SSHHostCertificateUpdate

type SSHHostCertificateUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of this SSH Host Certificate. optional, max 255
	// bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this SSH Host Certificate.
	// optional, max 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
}

func (*SSHHostCertificateUpdate) GoString

func (x *SSHHostCertificateUpdate) GoString() string

func (*SSHHostCertificateUpdate) String

func (x *SSHHostCertificateUpdate) String() string

type SSHUserCertificate

type SSHUserCertificate struct {
	// unique identifier for this SSH User Certificate
	ID string `json:"id,omitempty"`
	// URI of the SSH User Certificate API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the SSH User Certificate API resource was created, RFC 3339
	// format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of this SSH User Certificate. optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this SSH User Certificate.
	// optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// a public key in OpenSSH Authorized Keys format that this certificate signs
	PublicKey string `json:"public_key,omitempty"`
	// the key type of the public_key, one of rsa, ecdsa or ed25519
	KeyType string `json:"key_type,omitempty"`
	// the ssh certificate authority that is used to sign this ssh user certificate
	SSHCertificateAuthorityID string `json:"ssh_certificate_authority_id,omitempty"`
	// the list of principals included in the ssh user certificate. This is the list of
	// usernames that the certificate holder may sign in as on a machine authorizing
	// the signing certificate authority. Dangerously, if no principals are specified,
	// this certificate may be used to log in as any user.
	Principals []string `json:"principals,omitempty"`
	// A map of critical options included in the certificate. Only two critical options
	// are currently defined by OpenSSH: force-command and source-address. See the
	// OpenSSH certificate protocol spec
	// (https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys) for
	// additional details.
	CriticalOptions map[string]string `json:"critical_options,omitempty"`
	// A map of extensions included in the certificate. Extensions are additional
	// metadata that can be interpreted by the SSH server for any purpose. These can be
	// used to permit or deny the ability to open a terminal, do port forwarding, x11
	// forwarding, and more. If unspecified, the certificate will include limited
	// permissions with the following extension map: {"permit-pty": "",
	// "permit-user-rc": ""} OpenSSH understands a number of predefined extensions. See
	// the OpenSSH certificate protocol spec
	// (https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys) for
	// additional details.
	Extensions map[string]string `json:"extensions,omitempty"`
	// the time when the ssh host certificate becomes valid, in RFC 3339 format.
	ValidAfter string `json:"valid_after,omitempty"`
	// the time after which the ssh host certificate becomes invalid, in RFC 3339
	// format. the OpenSSH certificates RFC calls this valid_before.
	ValidUntil string `json:"valid_until,omitempty"`
	// the signed SSH certificate in OpenSSH Authorized Keys Format. this value should
	// be placed in a -cert.pub certificate file on disk that should be referenced in
	// your sshd_config configuration file with a HostCertificate directive
	Certificate string `json:"certificate,omitempty"`
}

func (*SSHUserCertificate) GoString

func (x *SSHUserCertificate) GoString() string

func (*SSHUserCertificate) String

func (x *SSHUserCertificate) String() string

type SSHUserCertificateCreate

type SSHUserCertificateCreate struct {
	// the ssh certificate authority that is used to sign this ssh user certificate
	SSHCertificateAuthorityID string `json:"ssh_certificate_authority_id,omitempty"`
	// a public key in OpenSSH Authorized Keys format that this certificate signs
	PublicKey string `json:"public_key,omitempty"`
	// the list of principals included in the ssh user certificate. This is the list of
	// usernames that the certificate holder may sign in as on a machine authorizing
	// the signing certificate authority. Dangerously, if no principals are specified,
	// this certificate may be used to log in as any user.
	Principals []string `json:"principals,omitempty"`
	// A map of critical options included in the certificate. Only two critical options
	// are currently defined by OpenSSH: force-command and source-address. See the
	// OpenSSH certificate protocol spec
	// (https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys) for
	// additional details.
	CriticalOptions map[string]string `json:"critical_options,omitempty"`
	// A map of extensions included in the certificate. Extensions are additional
	// metadata that can be interpreted by the SSH server for any purpose. These can be
	// used to permit or deny the ability to open a terminal, do port forwarding, x11
	// forwarding, and more. If unspecified, the certificate will include limited
	// permissions with the following extension map: {"permit-pty": "",
	// "permit-user-rc": ""} OpenSSH understands a number of predefined extensions. See
	// the OpenSSH certificate protocol spec
	// (https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys) for
	// additional details.
	Extensions map[string]string `json:"extensions,omitempty"`
	// The time when the user certificate becomes valid, in RFC 3339 format. Defaults
	// to the current time if unspecified.
	ValidAfter string `json:"valid_after,omitempty"`
	// The time when this host certificate becomes invalid, in RFC 3339 format. If
	// unspecified, a default value of 24 hours will be used. The OpenSSH certificates
	// RFC calls this valid_before.
	ValidUntil string `json:"valid_until,omitempty"`
	// human-readable description of this SSH User Certificate. optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this SSH User Certificate.
	// optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
}

func (*SSHUserCertificateCreate) GoString

func (x *SSHUserCertificateCreate) GoString() string

func (*SSHUserCertificateCreate) String

func (x *SSHUserCertificateCreate) String() string

type SSHUserCertificateList

type SSHUserCertificateList struct {
	// the list of all ssh user certificates on this account
	SSHUserCertificates []SSHUserCertificate `json:"ssh_user_certificates,omitempty"`
	// URI of the ssh user certificates list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*SSHUserCertificateList) GoString

func (x *SSHUserCertificateList) GoString() string

func (*SSHUserCertificateList) String

func (x *SSHUserCertificateList) String() string

type SSHUserCertificateUpdate

type SSHUserCertificateUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of this SSH User Certificate. optional, max 255
	// bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this SSH User Certificate.
	// optional, max 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
}

func (*SSHUserCertificateUpdate) GoString

func (x *SSHUserCertificateUpdate) GoString() string

func (*SSHUserCertificateUpdate) String

func (x *SSHUserCertificateUpdate) String() string

type StaticBackend added in v5.3.0

type StaticBackend struct {
	// unique identifier for this static backend
	ID string `json:"id,omitempty"`
	// URI of the StaticBackend API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the backend was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of this backend. Optional
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata string `json:"metadata,omitempty"`
	// the address to forward to
	Address string `json:"address,omitempty"`
	// tls configuration to use
	TLS StaticBackendTLS `json:"tls,omitempty"`
}

func (*StaticBackend) GoString added in v5.3.0

func (x *StaticBackend) GoString() string

func (*StaticBackend) String added in v5.3.0

func (x *StaticBackend) String() string

type StaticBackendCreate added in v5.3.0

type StaticBackendCreate struct {
	// human-readable description of this backend. Optional
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata string `json:"metadata,omitempty"`
	// the address to forward to
	Address string `json:"address,omitempty"`
	// tls configuration to use
	TLS StaticBackendTLS `json:"tls,omitempty"`
}

func (*StaticBackendCreate) GoString added in v5.3.0

func (x *StaticBackendCreate) GoString() string

func (*StaticBackendCreate) String added in v5.3.0

func (x *StaticBackendCreate) String() string

type StaticBackendList added in v5.3.0

type StaticBackendList struct {
	// the list of all static backends on this account
	Backends []StaticBackend `json:"backends,omitempty"`
	// URI of the static backends list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*StaticBackendList) GoString added in v5.3.0

func (x *StaticBackendList) GoString() string

func (*StaticBackendList) String added in v5.3.0

func (x *StaticBackendList) String() string

type StaticBackendTLS added in v5.3.0

type StaticBackendTLS struct {
	// if TLS is checked
	Enabled bool `json:"enabled,omitempty"`
}

func (*StaticBackendTLS) GoString added in v5.3.0

func (x *StaticBackendTLS) GoString() string

func (*StaticBackendTLS) String added in v5.3.0

func (x *StaticBackendTLS) String() string

type StaticBackendUpdate added in v5.3.0

type StaticBackendUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of this backend. Optional
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata *string `json:"metadata,omitempty"`
	// the address to forward to
	Address string `json:"address,omitempty"`
	// tls configuration to use
	TLS StaticBackendTLS `json:"tls,omitempty"`
}

func (*StaticBackendUpdate) GoString added in v5.3.0

func (x *StaticBackendUpdate) GoString() string

func (*StaticBackendUpdate) String added in v5.3.0

func (x *StaticBackendUpdate) String() string

type TCPEdge

type TCPEdge struct {
	// unique identifier of this edge
	ID string `json:"id,omitempty"`
	// human-readable description of what this edge will be used for; optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
	// bytes.
	Metadata string `json:"metadata,omitempty"`
	// timestamp when the edge was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// URI of the edge API resource
	URI string `json:"uri,omitempty"`
	// hostports served by this edge
	Hostports []string `json:"hostports,omitempty"`
	// edge modules
	Backend       *EndpointBackend  `json:"backend,omitempty"`
	IpRestriction *EndpointIPPolicy `json:"ip_restriction,omitempty"`
	// the traffic policy associated with this edge or null
	Policy *EndpointPolicy `json:"policy,omitempty"`
}

func (*TCPEdge) GoString

func (x *TCPEdge) GoString() string

func (*TCPEdge) String

func (x *TCPEdge) String() string

type TCPEdgeCreate

type TCPEdgeCreate struct {
	// human-readable description of what this edge will be used for; optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
	// bytes.
	Metadata string `json:"metadata,omitempty"`
	// hostports served by this edge
	Hostports []string `json:"hostports,omitempty"`
	// edge modules
	Backend       *EndpointBackendMutate  `json:"backend,omitempty"`
	IPRestriction *EndpointIPPolicyMutate `json:"ip_restriction,omitempty"`
	// the traffic policy associated with this edge or null
	Policy *EndpointPolicy `json:"policy,omitempty"`
}

func (*TCPEdgeCreate) GoString

func (x *TCPEdgeCreate) GoString() string

func (*TCPEdgeCreate) String

func (x *TCPEdgeCreate) String() string

type TCPEdgeList

type TCPEdgeList struct {
	// the list of all TCP Edges on this account
	TCPEdges []TCPEdge `json:"tcp_edges,omitempty"`
	// URI of the TCP Edge list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*TCPEdgeList) GoString

func (x *TCPEdgeList) GoString() string

func (*TCPEdgeList) String

func (x *TCPEdgeList) String() string

type TCPEdgeUpdate

type TCPEdgeUpdate struct {
	// unique identifier of this edge
	ID string `json:"id,omitempty"`
	// human-readable description of what this edge will be used for; optional, max 255
	// bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
	// bytes.
	Metadata *string `json:"metadata,omitempty"`
	// hostports served by this edge
	Hostports []string `json:"hostports,omitempty"`
	// edge modules
	Backend       *EndpointBackendMutate  `json:"backend,omitempty"`
	IPRestriction *EndpointIPPolicyMutate `json:"ip_restriction,omitempty"`
	// the traffic policy associated with this edge or null
	Policy *EndpointPolicy `json:"policy,omitempty"`
}

func (*TCPEdgeUpdate) GoString

func (x *TCPEdgeUpdate) GoString() string

func (*TCPEdgeUpdate) String

func (x *TCPEdgeUpdate) String() string

type TLSCertificate

type TLSCertificate struct {
	// unique identifier for this TLS certificate
	ID string `json:"id,omitempty"`
	// URI of the TLS certificate API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the TLS certificate was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of this TLS certificate. optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this TLS certificate. optional,
	// max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// chain of PEM-encoded certificates, leaf first. See Certificate Bundles
	// (https://ngrok.com/docs/cloud-edge/endpoints#certificate-chains).
	CertificatePEM string `json:"certificate_pem,omitempty"`
	// subject common name from the leaf of this TLS certificate
	SubjectCommonName string `json:"subject_common_name,omitempty"`
	// subject alternative names (SANs) from the leaf of this TLS certificate
	SubjectAlternativeNames TLSCertificateSANs `json:"subject_alternative_names,omitempty"`
	// timestamp (in RFC 3339 format) when this TLS certificate was issued
	// automatically, or null if this certificate was user-uploaded
	IssuedAt *string `json:"issued_at,omitempty"`
	// timestamp when this TLS certificate becomes valid, RFC 3339 format
	NotBefore string `json:"not_before,omitempty"`
	// timestamp when this TLS certificate becomes invalid, RFC 3339 format
	NotAfter string `json:"not_after,omitempty"`
	// set of actions the private key of this TLS certificate can be used for
	KeyUsages []string `json:"key_usages,omitempty"`
	// extended set of actions the private key of this TLS certificate can be used for
	ExtendedKeyUsages []string `json:"extended_key_usages,omitempty"`
	// type of the private key of this TLS certificate. One of rsa, ecdsa, or ed25519.
	PrivateKeyType string `json:"private_key_type,omitempty"`
	// issuer common name from the leaf of this TLS certificate
	IssuerCommonName string `json:"issuer_common_name,omitempty"`
	// serial number of the leaf of this TLS certificate
	SerialNumber string `json:"serial_number,omitempty"`
	// subject organization from the leaf of this TLS certificate
	SubjectOrganization string `json:"subject_organization,omitempty"`
	// subject organizational unit from the leaf of this TLS certificate
	SubjectOrganizationalUnit string `json:"subject_organizational_unit,omitempty"`
	// subject locality from the leaf of this TLS certificate
	SubjectLocality string `json:"subject_locality,omitempty"`
	// subject province from the leaf of this TLS certificate
	SubjectProvince string `json:"subject_province,omitempty"`
	// subject country from the leaf of this TLS certificate
	SubjectCountry string `json:"subject_country,omitempty"`
}

func (*TLSCertificate) GoString

func (x *TLSCertificate) GoString() string

func (*TLSCertificate) String

func (x *TLSCertificate) String() string

type TLSCertificateCreate

type TLSCertificateCreate struct {
	// human-readable description of this TLS certificate. optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this TLS certificate. optional,
	// max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// chain of PEM-encoded certificates, leaf first. See Certificate Bundles
	// (https://ngrok.com/docs/cloud-edge/endpoints#certificate-chains).
	CertificatePEM string `json:"certificate_pem,omitempty"`
	// private key for the TLS certificate, PEM-encoded. See Private Keys
	// (https://ngrok.com/docs/cloud-edge/endpoints#private-keys).
	PrivateKeyPEM string `json:"private_key_pem,omitempty"`
}

func (*TLSCertificateCreate) GoString

func (x *TLSCertificateCreate) GoString() string

func (*TLSCertificateCreate) String

func (x *TLSCertificateCreate) String() string

type TLSCertificateList

type TLSCertificateList struct {
	// the list of all TLS certificates on this account
	TLSCertificates []TLSCertificate `json:"tls_certificates,omitempty"`
	// URI of the TLS certificates list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*TLSCertificateList) GoString

func (x *TLSCertificateList) GoString() string

func (*TLSCertificateList) String

func (x *TLSCertificateList) String() string

type TLSCertificateSANs

type TLSCertificateSANs struct {
	// set of additional domains (including wildcards) this TLS certificate is valid
	// for
	DNSNames []string `json:"dns_names,omitempty"`
	// set of IP addresses this TLS certificate is also valid for
	IPs []string `json:"ips,omitempty"`
}

func (*TLSCertificateSANs) GoString

func (x *TLSCertificateSANs) GoString() string

func (*TLSCertificateSANs) String

func (x *TLSCertificateSANs) String() string

type TLSCertificateUpdate

type TLSCertificateUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of this TLS certificate. optional, max 255 bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this TLS certificate. optional,
	// max 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
}

func (*TLSCertificateUpdate) GoString

func (x *TLSCertificateUpdate) GoString() string

func (*TLSCertificateUpdate) String

func (x *TLSCertificateUpdate) String() string

type TLSEdge

type TLSEdge struct {
	// unique identifier of this edge
	ID string `json:"id,omitempty"`
	// human-readable description of what this edge will be used for; optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
	// bytes.
	Metadata string `json:"metadata,omitempty"`
	// timestamp when the edge configuration was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// URI of the edge API resource
	URI string `json:"uri,omitempty"`
	// hostports served by this edge
	Hostports []string `json:"hostports,omitempty"`
	// edge modules
	Backend        *EndpointBackend        `json:"backend,omitempty"`
	IpRestriction  *EndpointIPPolicy       `json:"ip_restriction,omitempty"`
	MutualTls      *EndpointMutualTLS      `json:"mutual_tls,omitempty"`
	TlsTermination *EndpointTLSTermination `json:"tls_termination,omitempty"`
	// the traffic policy associated with this edge or null
	Policy *EndpointPolicy `json:"policy,omitempty"`
}

func (*TLSEdge) GoString

func (x *TLSEdge) GoString() string

func (*TLSEdge) String

func (x *TLSEdge) String() string

type TLSEdgeCreate

type TLSEdgeCreate struct {
	// human-readable description of what this edge will be used for; optional, max 255
	// bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
	// bytes.
	Metadata string `json:"metadata,omitempty"`
	// hostports served by this edge
	Hostports []string `json:"hostports,omitempty"`
	// edge modules
	Backend        *EndpointBackendMutate   `json:"backend,omitempty"`
	IPRestriction  *EndpointIPPolicyMutate  `json:"ip_restriction,omitempty"`
	MutualTLS      *EndpointMutualTLSMutate `json:"mutual_tls,omitempty"`
	TLSTermination *EndpointTLSTermination  `json:"tls_termination,omitempty"`
	// the traffic policy associated with this edge or null
	Policy *EndpointPolicy `json:"policy,omitempty"`
}

func (*TLSEdgeCreate) GoString

func (x *TLSEdgeCreate) GoString() string

func (*TLSEdgeCreate) String

func (x *TLSEdgeCreate) String() string

type TLSEdgeList

type TLSEdgeList struct {
	// the list of all TLS Edges on this account
	TLSEdges []TLSEdge `json:"tls_edges,omitempty"`
	// URI of the TLS Edge list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*TLSEdgeList) GoString

func (x *TLSEdgeList) GoString() string

func (*TLSEdgeList) String

func (x *TLSEdgeList) String() string

type TLSEdgeUpdate

type TLSEdgeUpdate struct {
	// unique identifier of this edge
	ID string `json:"id,omitempty"`
	// human-readable description of what this edge will be used for; optional, max 255
	// bytes.
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this edge. Optional, max 4096
	// bytes.
	Metadata *string `json:"metadata,omitempty"`
	// hostports served by this edge
	Hostports []string `json:"hostports,omitempty"`
	// edge modules
	Backend        *EndpointBackendMutate   `json:"backend,omitempty"`
	IPRestriction  *EndpointIPPolicyMutate  `json:"ip_restriction,omitempty"`
	MutualTLS      *EndpointMutualTLSMutate `json:"mutual_tls,omitempty"`
	TLSTermination *EndpointTLSTermination  `json:"tls_termination,omitempty"`
	// the traffic policy associated with this edge or null
	Policy *EndpointPolicy `json:"policy,omitempty"`
}

func (*TLSEdgeUpdate) GoString

func (x *TLSEdgeUpdate) GoString() string

func (*TLSEdgeUpdate) String

func (x *TLSEdgeUpdate) String() string

type Tunnel

type Tunnel struct {
	// unique tunnel resource identifier
	ID string `json:"id,omitempty"`
	// URL of the ephemeral tunnel's public endpoint
	PublicURL string `json:"public_url,omitempty"`
	// timestamp when the tunnel was initiated in RFC 3339 format
	StartedAt string `json:"started_at,omitempty"`
	// user-supplied metadata for the tunnel defined in the ngrok configuration file.
	// See the tunnel metadata configuration option
	// (https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config#common-tunnel-configuration-properties)
	// In API version 0, this value was instead pulled from the top-level metadata
	// configuration option
	// (https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config#metadata).
	Metadata string `json:"metadata,omitempty"`
	// tunnel protocol for ephemeral tunnels. one of http, https, tcp or tls
	Proto string `json:"proto,omitempty"`
	// identifier of tune region where the tunnel is running
	Region string `json:"region,omitempty"`
	// reference object pointing to the tunnel session on which this tunnel was started
	TunnelSession Ref `json:"tunnel_session,omitempty"`
	// the ephemeral endpoint this tunnel is associated with, if this is an
	// agent-initiated tunnel
	Endpoint *Ref `json:"endpoint,omitempty"`
	// the labels the tunnel group backends will match against, if this is a backend
	// tunnel
	Labels map[string]string `json:"labels,omitempty"`
	// tunnel group backends served by this backend tunnel
	Backends []Ref `json:"backends,omitempty"`
	// upstream address the ngrok agent forwards traffic over this tunnel to. this may
	// be expressed as a URL or a network address.
	ForwardsTo string `json:"forwards_to,omitempty"`
}

func (*Tunnel) GoString

func (x *Tunnel) GoString() string

func (*Tunnel) String

func (x *Tunnel) String() string

type TunnelGroupBackend

type TunnelGroupBackend struct {
	// unique identifier for this TunnelGroup backend
	ID string `json:"id,omitempty"`
	// URI of the TunnelGroupBackend API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the backend was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of this backend. Optional
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata string `json:"metadata,omitempty"`
	// labels to watch for tunnels on, e.g. app->foo, dc->bar
	Labels map[string]string `json:"labels,omitempty"`
	// tunnels matching this backend
	Tunnels []Ref `json:"tunnels,omitempty"`
}

func (*TunnelGroupBackend) GoString

func (x *TunnelGroupBackend) GoString() string

func (*TunnelGroupBackend) String

func (x *TunnelGroupBackend) String() string

type TunnelGroupBackendCreate

type TunnelGroupBackendCreate struct {
	// human-readable description of this backend. Optional
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata string `json:"metadata,omitempty"`
	// labels to watch for tunnels on, e.g. app->foo, dc->bar
	Labels map[string]string `json:"labels,omitempty"`
}

func (*TunnelGroupBackendCreate) GoString

func (x *TunnelGroupBackendCreate) GoString() string

func (*TunnelGroupBackendCreate) String

func (x *TunnelGroupBackendCreate) String() string

type TunnelGroupBackendList

type TunnelGroupBackendList struct {
	// the list of all TunnelGroup backends on this account
	Backends []TunnelGroupBackend `json:"backends,omitempty"`
	// URI of the TunnelGroup backends list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*TunnelGroupBackendList) GoString

func (x *TunnelGroupBackendList) GoString() string

func (*TunnelGroupBackendList) String

func (x *TunnelGroupBackendList) String() string

type TunnelGroupBackendUpdate

type TunnelGroupBackendUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of this backend. Optional
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata *string `json:"metadata,omitempty"`
	// labels to watch for tunnels on, e.g. app->foo, dc->bar
	Labels map[string]string `json:"labels,omitempty"`
}

func (*TunnelGroupBackendUpdate) GoString

func (x *TunnelGroupBackendUpdate) GoString() string

func (*TunnelGroupBackendUpdate) String

func (x *TunnelGroupBackendUpdate) String() string

type TunnelList

type TunnelList struct {
	// the list of all online tunnels on this account
	Tunnels []Tunnel `json:"tunnels,omitempty"`
	// URI of the tunnels list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*TunnelList) GoString

func (x *TunnelList) GoString() string

func (*TunnelList) String

func (x *TunnelList) String() string

type TunnelSession

type TunnelSession struct {
	// version of the ngrok agent that started this ngrok tunnel session
	AgentVersion string `json:"agent_version,omitempty"`
	// reference to the tunnel credential or ssh credential used by the ngrok agent to
	// start this tunnel session
	Credential Ref `json:"credential,omitempty"`
	// unique tunnel session resource identifier
	ID string `json:"id,omitempty"`
	// source ip address of the tunnel session
	IP string `json:"ip,omitempty"`
	// arbitrary user-defined data specified in the metadata property in the ngrok
	// configuration file. See the metadata configuration option
	Metadata string `json:"metadata,omitempty"`
	// operating system of the host the ngrok agent is running on
	OS string `json:"os,omitempty"`
	// the ngrok region identifier in which this tunnel session was started
	Region string `json:"region,omitempty"`
	// time when the tunnel session first connected to the ngrok servers
	StartedAt string `json:"started_at,omitempty"`
	// the transport protocol used to start the tunnel session. Either ngrok/v2 or ssh
	Transport string `json:"transport,omitempty"`
	// URI to the API resource of the tunnel session
	URI string `json:"uri,omitempty"`
}

func (*TunnelSession) GoString

func (x *TunnelSession) GoString() string

func (*TunnelSession) String

func (x *TunnelSession) String() string

type TunnelSessionList

type TunnelSessionList struct {
	// list of all tunnel sessions on this account
	TunnelSessions []TunnelSession `json:"tunnel_sessions,omitempty"`
	// URI to the API resource of the tunnel session list
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*TunnelSessionList) GoString

func (x *TunnelSessionList) GoString() string

func (*TunnelSessionList) String

func (x *TunnelSessionList) String() string

type TunnelSessionsUpdate

type TunnelSessionsUpdate struct {
	ID string `json:"id,omitempty"`
}

func (*TunnelSessionsUpdate) GoString

func (x *TunnelSessionsUpdate) GoString() string

func (*TunnelSessionsUpdate) String

func (x *TunnelSessionsUpdate) String() string

type UserAgent

type UserAgent struct {
	// raw User-Agent request header
	Raw string `json:"raw,omitempty"`
	// browser name (e.g. Chrome)
	BrowserName string `json:"browser_name,omitempty"`
	// browser version (e.g. 102)
	BrowserVersion string `json:"browser_version,omitempty"`
	// type of device (e.g. Desktop)
	DeviceType string `json:"device_type,omitempty"`
	// operating system name (e.g. MacOS)
	OSName string `json:"os_name,omitempty"`
	// operating system version (e.g. 10.15.7)
	OSVersion string `json:"os_version,omitempty"`
}

func (*UserAgent) GoString

func (x *UserAgent) GoString() string

func (*UserAgent) String

func (x *UserAgent) String() string

type WeightedBackend

type WeightedBackend struct {
	// unique identifier for this Weighted backend
	ID string `json:"id,omitempty"`
	// URI of the WeightedBackend API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the backend was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of this backend. Optional
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata string `json:"metadata,omitempty"`
	// the ids of the child backends to their weights [0-10000]
	Backends map[string]int64 `json:"backends,omitempty"`
}

func (*WeightedBackend) GoString

func (x *WeightedBackend) GoString() string

func (*WeightedBackend) String

func (x *WeightedBackend) String() string

type WeightedBackendCreate

type WeightedBackendCreate struct {
	// human-readable description of this backend. Optional
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata string `json:"metadata,omitempty"`
	// the ids of the child backends to their weights [0-10000]
	Backends map[string]int64 `json:"backends,omitempty"`
}

func (*WeightedBackendCreate) GoString

func (x *WeightedBackendCreate) GoString() string

func (*WeightedBackendCreate) String

func (x *WeightedBackendCreate) String() string

type WeightedBackendList

type WeightedBackendList struct {
	// the list of all Weighted backends on this account
	Backends []WeightedBackend `json:"backends,omitempty"`
	// URI of the Weighted backends list API resource
	URI string `json:"uri,omitempty"`
	// URI of the next page, or null if there is no next page
	NextPageURI *string `json:"next_page_uri,omitempty"`
}

func (*WeightedBackendList) GoString

func (x *WeightedBackendList) GoString() string

func (*WeightedBackendList) String

func (x *WeightedBackendList) String() string

type WeightedBackendUpdate

type WeightedBackendUpdate struct {
	ID string `json:"id,omitempty"`
	// human-readable description of this backend. Optional
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this backend. Optional
	Metadata *string `json:"metadata,omitempty"`
	// the ids of the child backends to their weights [0-10000]
	Backends map[string]int64 `json:"backends,omitempty"`
}

func (*WeightedBackendUpdate) GoString

func (x *WeightedBackendUpdate) GoString() string

func (*WeightedBackendUpdate) String

func (x *WeightedBackendUpdate) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL