ngrok

package module
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: MIT Imports: 9 Imported by: 0

README

ngrok API client library for Golang

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

Installation

Installation is as simple as using go get.

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

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/v2"
        "github.com/ngrok/ngrok-api-go/v2/ip_policies"
        "github.com/ngrok/ngrok-api-go/v2/ip_policy_rules"
)

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

func example(ctx context.Context) error {
        // create clients to api resources
        apiClient, err := ngrok.NewClient(os.Getenv("NGROK_API_KEY"))
        if err != nil {
                return err
        }
        policies := ip_policies.NewClient(apiClient)
        policyRules := ip_policy_rules.NewClient(apiClient)

        // create the ip policy
        policy, err := policies.Create(ctx, &ngrok.IPPolicyCreate{
                Action: "allow",
        })
        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,
                })
                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/v2"
        "github.com/ngrok/ngrok-api-go/v2/tunnels"
)

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

func example(ctx context.Context) error {
        // construct the api client
        apiClient, err := ngrok.NewClient(os.Getenv("NGROK_API_KEY"))
        if err != nil {
                return err
        }

        // list all online tunnels
        tunnels := tunnels.NewClient(apiClient)
        iter := tunnels.List(ctx, nil)
        for iter.Next() {
                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/v2"
    "github.com/ngrok/ngrok-api-go/v2/reserved_domains"
)

func example(ctx context.Context) error {
        ngrokAPI := ngrok.NewClient("<API KEY>")
        domains := reserved_domains.NewClient(ngrokAPI)
        d, err := domains.Create(context.Background(), &ngrok.ReservedDomainsCreate{
                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

The root API client and all of the datatypes exchanged by the API are defined in this base package. There are subpackages for every API service and a separate 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 base Client and the service-specific clients once at initialization time.

import (
    "github.com/ngrok/ngrok-api-go/v2"
    "github.com/ngrok/ngrok-api-go/v2/ip_policies"
    "github.com/ngrok/ngrok-api-go/v2/ip_policy_rules"
)

// Construct the root api Client object
ngrokAPI := ngrok.NewClient("<API KEY>")

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

Functional Option Configuration

The Client 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.NewClient("<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:

ngrokAPI := ngrok.NewClient("<API KEY>")
creds := credentials.NewClient(ngrokAPI)
c, err := creds.Update(ctx, &ngrok.IPPolicyUpdate{
        ID:          "cr_1kYzunEyn6XHHlqyMBLrj5nxkoz",
        Description: ngrok.String("this optional description is a pointer to a string"),
})

Transparent 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.

ngrokAPI := ngrok.NewClient("<API KEY>")
certs := tls_certificates.NewClient(ngrokAPI)
certsIter := certs.List(ctx, nil)
for certsIter.Next() {
        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:

ngrokAPI := ngrok.NewClient("<API KEY>")
domains := reserved_domains.NewClient(ngrokAPI)
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:

ngrokAPI := ngrok.NewClient("<API KEY>")
domains := reserved_domains.NewClient(ngrokAPI)
d, err := domains.Create(ctx, &ngrok.ReservedDomainsCreate{
        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"`
}

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"`
}

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 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 Client

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

func NewClient

func NewClient(apiKey string, opts ...ClientOption) (*Client, error)

func (*Client) Do

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

type ClientOption

type ClientOption func(cc *clientConfig)

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) ClientOption

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 client.
	// 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 and addresses 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 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. A rule of '*' is
	// equivalent to no acl at all and will explicitly permit all actions.
	ACL []string `json:"acl,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 and addresses 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 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. A rule of '*' is
	// equivalent to no acl at all and will explicitly permit all actions.
	ACL []string `json:"acl,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 and addresses 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 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. 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 Empty

type Empty struct {
}

func (*Empty) GoString

func (x *Empty) GoString() string

func (*Empty) String

func (x *Empty) 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 EndpointCircuitBreakerReplace

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

func (*EndpointCircuitBreakerReplace) GoString

func (x *EndpointCircuitBreakerReplace) GoString() string

func (*EndpointCircuitBreakerReplace) 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 EndpointCompressionReplace

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

func (*EndpointCompressionReplace) GoString

func (x *EndpointCompressionReplace) GoString() string

func (*EndpointCompressionReplace) String

func (x *EndpointCompressionReplace) String() string

type EndpointConfiguration

type EndpointConfiguration struct {
	// unique identifier of this endpoint configuration
	ID string `json:"id,omitempty"`
	// they type of traffic this endpoint configuration can be applied to. one of:
	// http, https, tcp
	Type string `json:"type,omitempty"`
	// human-readable description of what this endpoint configuration will be do when
	// applied or what traffic it will be applied to. Optional, max 255 bytes
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this endpoint configuration.
	// Optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// timestamp when the endpoint configuration was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// URI of the endpoint configuration API resource
	URI string `json:"uri,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"`
	// ip policy module configuration or null
	IPPolicy *EndpointIPPolicy `json:"ip_policy,omitempty"`
	// mutual TLS module configuration or null
	MutualTLS *EndpointMutualTLS `json:"mutual_tls,omitempty"`
	// TLS termination module configuration or null
	TLSTermination *EndpointTLSTermination `json:"tls_termination,omitempty"`
	// webhook validation module configuration or null
	WebhookValidation *EndpointWebhookValidation `json:"webhook_validation,omitempty"`
	// oauth module configuration or null
	OAuth *EndpointOAuth `json:"oauth,omitempty"`
	// logging module configuration or null
	Logging *EndpointLogging `json:"logging,omitempty"`
	// saml module configuration or null
	SAML *EndpointSAML `json:"saml,omitempty"`
	// oidc module configuration or null
	OIDC *EndpointOIDC `json:"oidc,omitempty"`
}

func (*EndpointConfiguration) GoString

func (x *EndpointConfiguration) GoString() string

func (*EndpointConfiguration) String

func (x *EndpointConfiguration) String() string

type EndpointConfigurationCreate

type EndpointConfigurationCreate struct {
	// they type of traffic this endpoint configuration can be applied to. one of:
	// http, https, tcp
	Type string `json:"type,omitempty"`
	// human-readable description of what this endpoint configuration will be do when
	// applied or what traffic it will be applied to. Optional, max 255 bytes
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this endpoint configuration.
	// Optional, max 4096 bytes.
	Metadata string `json:"metadata,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"`
	// ip policy module configuration or null
	IPPolicy *EndpointIPPolicyMutate `json:"ip_policy,omitempty"`
	// mutual TLS module configuration or null
	MutualTLS *EndpointMutualTLSMutate `json:"mutual_tls,omitempty"`
	// TLS termination module configuration or null
	TLSTermination *EndpointTLSTermination `json:"tls_termination,omitempty"`
	// webhook validation module configuration or null
	WebhookValidation *EndpointWebhookValidation `json:"webhook_validation,omitempty"`
	// oauth module configuration or null
	OAuth *EndpointOAuth `json:"oauth,omitempty"`
	// logging module configuration or null
	Logging *EndpointLoggingMutate `json:"logging,omitempty"`
	// saml module configuration or null
	SAML *EndpointSAMLMutate `json:"saml,omitempty"`
	// oidc module configuration or null
	OIDC *EndpointOIDC `json:"oidc,omitempty"`
}

func (*EndpointConfigurationCreate) GoString

func (x *EndpointConfigurationCreate) GoString() string

func (*EndpointConfigurationCreate) String

func (x *EndpointConfigurationCreate) String() string

type EndpointConfigurationList

type EndpointConfigurationList struct {
	// the list of all endpoint configurations on this account
	EndpointConfigurations []EndpointConfiguration `json:"endpoint_configurations,omitempty"`
	// URI of the endpoint configurations 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 (*EndpointConfigurationList) GoString

func (x *EndpointConfigurationList) GoString() string

func (*EndpointConfigurationList) String

func (x *EndpointConfigurationList) String() string

type EndpointConfigurationUpdate

type EndpointConfigurationUpdate struct {
	// unique identifier of this endpoint configuration
	ID string `json:"id,omitempty"`
	// human-readable description of what this endpoint configuration will be do when
	// applied or what traffic it will be applied to. Optional, max 255 bytes
	Description *string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this endpoint configuration.
	// Optional, max 4096 bytes.
	Metadata *string `json:"metadata,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"`
	// ip policy module configuration or null
	IPPolicy *EndpointIPPolicyMutate `json:"ip_policy,omitempty"`
	// mutual TLS module configuration or null
	MutualTLS *EndpointMutualTLSMutate `json:"mutual_tls,omitempty"`
	// TLS termination module configuration or null
	TLSTermination *EndpointTLSTermination `json:"tls_termination,omitempty"`
	// webhook validation module configuration or null
	WebhookValidation *EndpointWebhookValidation `json:"webhook_validation,omitempty"`
	// oauth module configuration or null
	OAuth *EndpointOAuth `json:"oauth,omitempty"`
	// logging module configuration or null
	Logging *EndpointLoggingMutate `json:"logging,omitempty"`
	// saml module configuration or null
	SAML *EndpointSAMLMutate `json:"saml,omitempty"`
	// oidc module configuration or null
	OIDC *EndpointOIDC `json:"oidc,omitempty"`
}

func (*EndpointConfigurationUpdate) GoString

func (x *EndpointConfigurationUpdate) GoString() string

func (*EndpointConfigurationUpdate) String

func (x *EndpointConfigurationUpdate) 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"`
	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 EndpointIPPolicyReplace

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

func (*EndpointIPPolicyReplace) GoString

func (x *EndpointIPPolicyReplace) GoString() string

func (*EndpointIPPolicyReplace) String

func (x *EndpointIPPolicyReplace) String() string

type EndpointLogging

type EndpointLogging 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 EventStreams that will be used to configure and export this
	// endpoint's logs
	EventStreams []Ref `json:"event_streams,omitempty"`
}

func (*EndpointLogging) GoString

func (x *EndpointLogging) GoString() string

func (*EndpointLogging) String

func (x *EndpointLogging) String() string

type EndpointLoggingMutate

type EndpointLoggingMutate 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 EventStreams that will be used to configure and export this
	// endpoint's logs
	EventStreamIDs []string `json:"event_stream_ids,omitempty"`
}

func (*EndpointLoggingMutate) GoString

func (x *EndpointLoggingMutate) GoString() string

func (*EndpointLoggingMutate) String

func (x *EndpointLoggingMutate) String() string

type EndpointLoggingReplace

type EndpointLoggingReplace struct {
	ID     string                `json:"id,omitempty"`
	Module EndpointLoggingMutate `json:"module,omitempty"`
}

func (*EndpointLoggingReplace) GoString

func (x *EndpointLoggingReplace) GoString() string

func (*EndpointLoggingReplace) String

func (x *EndpointLoggingReplace) 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 presnted by the initiatiator 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 EndpointMutualTLSReplace

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

func (*EndpointMutualTLSReplace) GoString

func (x *EndpointMutualTLSReplace) GoString() string

func (*EndpointMutualTLSReplace) String

func (x *EndpointMutualTLSReplace) 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 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 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 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"`
}

func (*EndpointOAuthProvider) GoString

func (x *EndpointOAuthProvider) GoString() string

func (*EndpointOAuthProvider) String

func (x *EndpointOAuthProvider) String() string

type EndpointOAuthReplace

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

func (*EndpointOAuthReplace) GoString

func (x *EndpointOAuthReplace) GoString() string

func (*EndpointOAuthReplace) String

func (x *EndpointOAuthReplace) 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 EndpointOIDCReplace

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

func (*EndpointOIDCReplace) GoString

func (x *EndpointOIDCReplace) GoString() string

func (*EndpointOIDCReplace) String

func (x *EndpointOIDCReplace) 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 EndpointRequestHeadersReplace

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

func (*EndpointRequestHeadersReplace) GoString

func (x *EndpointRequestHeadersReplace) GoString() string

func (*EndpointRequestHeadersReplace) 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 EndpointResponseHeadersReplace

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

func (*EndpointResponseHeadersReplace) GoString

func (x *EndpointResponseHeadersReplace) GoString() string

func (*EndpointResponseHeadersReplace) 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"`
}

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"`
}

func (*EndpointSAMLMutate) GoString

func (x *EndpointSAMLMutate) GoString() string

func (*EndpointSAMLMutate) String

func (x *EndpointSAMLMutate) String() string

type EndpointSAMLReplace

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

func (*EndpointSAMLReplace) GoString

func (x *EndpointSAMLReplace) GoString() string

func (*EndpointSAMLReplace) String

func (x *EndpointSAMLReplace) 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 EndpointTLSTerminationReplace

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

func (*EndpointTLSTerminationReplace) GoString

func (x *EndpointTLSTerminationReplace) GoString() string

func (*EndpointTLSTerminationReplace) 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: SLACK, SNS, STRIPE,
	// GITHUB, TWILIO, SHOPIFY, GITLAB, INTERCOM.
	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 EndpointWebhookValidationReplace

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

func (*EndpointWebhookValidationReplace) GoString

func (*EndpointWebhookValidationReplace) 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) 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 EventStream

type EventStream struct {
	// Unique identifier for this Event Stream.
	ID string `json:"id,omitempty"`
	// URI of the Event Stream API resource.
	URI string `json:"uri,omitempty"`
	// Timestamp when the Event Stream was created, RFC 3339 format.
	CreatedAt string `json:"created_at,omitempty"`
	// Arbitrary user-defined machine-readable data of this Event Stream. Optional, max
	// 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// Human-readable description of the Event Stream. Optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// A list of protocol-specific fields you want to collect on each event.
	Fields []string `json:"fields,omitempty"`
	// The protocol that determines which events will be collected. Supported values
	// are tcp_connection_closed and http_request_complete.
	EventType string `json:"event_type,omitempty"`
	// A list of Event Destination IDs which should be used for this Event Stream.
	// Event Streams are required to have at least one Event Destination.
	DestinationIDs []string `json:"destination_ids,omitempty"`
	// The percentage of all events you would like to capture. Valid values range from
	// 0.01, representing 1% of all events to 1.00, representing 100% of all events.
	SamplingRate float64 `json:"sampling_rate,omitempty"`
}

func (*EventStream) GoString

func (x *EventStream) GoString() string

func (*EventStream) String

func (x *EventStream) String() string

type EventStreamCreate

type EventStreamCreate struct {
	// Arbitrary user-defined machine-readable data of this Event Stream. Optional, max
	// 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// Human-readable description of the Event Stream. Optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// A list of protocol-specific fields you want to collect on each event.
	Fields []string `json:"fields,omitempty"`
	// The protocol that determines which events will be collected. Supported values
	// are tcp_connection_closed and http_request_complete.
	EventType string `json:"event_type,omitempty"`
	// A list of Event Destination IDs which should be used for this Event Stream.
	// Event Streams are required to have at least one Event Destination.
	DestinationIDs []string `json:"destination_ids,omitempty"`
	// The percentage of all events you would like to capture. Valid values range from
	// 0.01, representing 1% of all events to 1.00, representing 100% of all events.
	SamplingRate float64 `json:"sampling_rate,omitempty"`
}

func (*EventStreamCreate) GoString

func (x *EventStreamCreate) GoString() string

func (*EventStreamCreate) String

func (x *EventStreamCreate) String() string

type EventStreamList

type EventStreamList struct {
	// The list of all Event Streams on this account.
	EventStreams []EventStream `json:"event_streams,omitempty"`
	// URI of the Event Stream 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 (*EventStreamList) GoString

func (x *EventStreamList) GoString() string

func (*EventStreamList) String

func (x *EventStreamList) String() string

type EventStreamUpdate

type EventStreamUpdate struct {
	// Unique identifier for this Event Stream.
	ID string `json:"id,omitempty"`
	// Arbitrary user-defined machine-readable data of this Event Stream. Optional, max
	// 4096 bytes.
	Metadata *string `json:"metadata,omitempty"`
	// Human-readable description of the Event Stream. Optional, max 255 bytes.
	Description *string `json:"description,omitempty"`
	// A list of protocol-specific fields you want to collect on each event.
	Fields *[]string `json:"fields,omitempty"`
	// A list of Event Destination IDs which should be used for this Event Stream.
	// Event Streams are required to have at least one Event Destination.
	DestinationIDs *[]string `json:"destination_ids,omitempty"`
	// The percentage of all events you would like to capture. Valid values range from
	// 0.01, representing 1% of all events to 1.00, representing 100% of all events.
	SamplingRate *float64 `json:"sampling_rate,omitempty"`
}

func (*EventStreamUpdate) GoString

func (x *EventStreamUpdate) GoString() string

func (*EventStreamUpdate) String

func (x *EventStreamUpdate) 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"`
}

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 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 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"`
	// the IP policy action. Supported values are allow or deny
	Action string `json:"action,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"`
	// the IP policy action. Supported values are allow or deny
	Action string `json:"action,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"`
}

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"`
}

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 enforce. 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 enforce. 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 resrtrictions 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 enforce. 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 IPWhitelistEntry

type IPWhitelistEntry struct {
	// unique identifier for this IP whitelist entry
	ID string `json:"id,omitempty"`
	// URI of the IP whitelist entry API resource
	URI string `json:"uri,omitempty"`
	// timestamp when the IP whitelist entry was created, RFC 3339 format
	CreatedAt string `json:"created_at,omitempty"`
	// human-readable description of the source IPs for this IP whitelist entry.
	// optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this IP whitelist entry.
	// optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// an IP address or IP network range in CIDR notation (e.g. 10.1.1.1 or
	// 10.1.0.0/16) of addresses that will be whitelisted to communicate with your
	// tunnel endpoints
	IPNet string `json:"ip_net,omitempty"`
}

func (*IPWhitelistEntry) GoString

func (x *IPWhitelistEntry) GoString() string

func (*IPWhitelistEntry) String

func (x *IPWhitelistEntry) String() string

type IPWhitelistEntryCreate

type IPWhitelistEntryCreate struct {
	// human-readable description of the source IPs for this IP whitelist entry.
	// optional, max 255 bytes.
	Description string `json:"description,omitempty"`
	// arbitrary user-defined machine-readable data of this IP whitelist entry.
	// optional, max 4096 bytes.
	Metadata string `json:"metadata,omitempty"`
	// an IP address or IP network range in CIDR notation (e.g. 10.1.1.1 or
	// 10.1.0.0/16) of addresses that will be whitelisted to communicate with your
	// tunnel endpoints
	IPNet string `json:"ip_net,omitempty"`
}

func (*IPWhitelistEntryCreate) GoString

func (x *IPWhitelistEntryCreate) GoString() string

func (*IPWhitelistEntryCreate) String

func (x *IPWhitelistEntryCreate) String() string

type IPWhitelistEntryList

type IPWhitelistEntryList struct {
	// the list of all IP whitelist entries on this account
	Whitelist []IPWhitelistEntry `json:"whitelist,omitempty"`
	// URI of the IP whitelist 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 (*IPWhitelistEntryList) GoString

func (x *IPWhitelistEntryList) GoString() string

func (*IPWhitelistEntryList) String

func (x *IPWhitelistEntryList) String() string

type IPWhitelistEntryUpdate

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

func (*IPWhitelistEntryUpdate) GoString

func (x *IPWhitelistEntryUpdate) GoString() string

func (*IPWhitelistEntryUpdate) String

func (x *IPWhitelistEntryUpdate) 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 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"`
	// object reference to the endpoint configuration that will be applied to traffic
	// to this address
	EndpointConfiguration *Ref `json:"endpoint_configuration,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"`
	// ID of an endpoint configuration of type tcp that will be used to handle inbound
	// traffic to this address
	EndpointConfigurationID string `json:"endpoint_configuration_id,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"`
	// ID of an endpoint configuration of type tcp that will be used to handle inbound
	// traffic to this address
	EndpointConfigurationID *string `json:"endpoint_configuration_id,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"`
	// reserve the domain in this geographic ngrok datacenter. Optional, default is us.
	// (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 *.ngrok.io
	CNAMETarget *string `json:"cname_target,omitempty"`
	// object referencing the endpoint configuration applied to http traffic on this
	// domain
	HTTPEndpointConfiguration *Ref `json:"http_endpoint_configuration,omitempty"`
	// object referencing the endpoint configuration applied to https traffic on this
	// domain
	HTTPSEndpointConfiguration *Ref `json:"https_endpoint_configuration,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"`
}

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"`
	// if present, indicates the dns nameservers that the user must configure to
	// complete the provisioning process of a wildcard certificate
	NSTargets []ReservedDomainCertNSTarget `json:"ns_targets,omitempty"`
}

func (*ReservedDomainCertJob) GoString

func (x *ReservedDomainCertJob) GoString() string

func (*ReservedDomainCertJob) String

func (x *ReservedDomainCertJob) String() string

type ReservedDomainCertNSTarget

type ReservedDomainCertNSTarget struct {
	// the zone that the nameservers need to be applied to
	Zone string `json:"zone,omitempty"`
	// the nameservers the user must add
	Nameservers []string `json:"nameservers,omitempty"`
}

func (*ReservedDomainCertNSTarget) GoString

func (x *ReservedDomainCertNSTarget) GoString() string

func (*ReservedDomainCertNSTarget) String

func (x *ReservedDomainCertNSTarget) 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 {
	// the domain name to reserve. It may be a full domain name like app.example.com.
	// If the name does not contain a '.' it will reserve that subdomain on ngrok.io.
	Name string `json:"name,omitempty"`
	// reserve the domain in this geographic ngrok datacenter. Optional, default is us.
	// (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 an endpoint configuration of type http that will be used to handle inbound
	// http traffic to this domain
	HTTPEndpointConfigurationID string `json:"http_endpoint_configuration_id,omitempty"`
	// ID of an endpoint configuration of type https that will be used to handle
	// inbound https traffic to this domain
	HTTPSEndpointConfigurationID string `json:"https_endpoint_configuration_id,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 an endpoint configuration of type http that will be used to handle inbound
	// http traffic to this domain
	HTTPEndpointConfigurationID *string `json:"http_endpoint_configuration_id,omitempty"`
	// ID of an endpoint configuration of type https that will be used to handle
	// inbound https traffic to this domain
	HTTPSEndpointConfigurationID *string `json:"https_endpoint_configuration_id,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 and addresses 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 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. A rule of '*' is
	// equivalent to no acl at all and will explicitly permit all actions.
	ACL []string `json:"acl,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 and addresses 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 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. 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"`
}

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 and addresses 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 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. 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 authorizinig
	// 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
	// (https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys)the
	// OpenSSH certificate protocol spec 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
	// (https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys)the
	// OpenSSH certificate protocol spec 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 authorizinig
	// 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
	// (https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys)the
	// OpenSSH certificate protocol spec 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
	// (https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.certkeys)the
	// OpenSSH certificate protocol spec 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 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
	// (https://ngrok.com/docs/api#tls-certificates-pem)Certificate Bundles.
	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
	// (https://ngrok.com/docs/api#tls-certificates-pem)Certificate Bundles.
	CertificatePEM string `json:"certificate_pem,omitempty"`
	// private key for the TLS certificate, PEM-encoded. See
	// (https://ngrok.com/docs/ngrok-link#tls-certificates-key)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 Tunnel

type Tunnel struct {
	// unique tunnel resource identifier
	ID string `json:"id,omitempty"`
	// URL of the 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  (https://ngrok.com/docs#tunnel-definitions-metadata)metadata
	// configuration option In API version 0, this value was instead pulled from the
	// top-level  (https://ngrok.com/docs#config_metadata)metadata configuration
	// option.
	Metadata string `json:"metadata,omitempty"`
	// tunnel protocol. 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"`
}

func (*Tunnel) GoString

func (x *Tunnel) GoString() string

func (*Tunnel) String

func (x *Tunnel) 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

Jump to

Keyboard shortcuts

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