Update generated files

This commit is contained in:
ngrok release bot
2023-08-24 20:57:29 +00:00
parent da8b5e25f3
commit e356156ef2
63 changed files with 343 additions and 162 deletions
+10
View File
@@ -1,3 +1,12 @@
<!-- Code generated for API Clients. DO NOT EDIT. -->
## v5.1.0
ENHANCEMENTS:
* Added `owner_id` field to the `api_key`, `credential`, and `ssh_credential` resources. If supplied at credential creation, ownership will be assigned to the specified User or Bot. Only admins may specify an owner other than themselves. Defaults to the authenticated User or Bot.
* Added `failover_backend`, `http_response_backend`, and `tunnel_group_backend` resources. A Failover backend defines failover behavior within a list of referenced backends. Traffic is sent to the first backend in the list. If that backend is offline or no connection can be established, ngrok attempts to connect to the next backend in the list until one is successful.
## v5.0.0
### Breaking Changes
@@ -18,3 +27,4 @@ Hostports: []string `json:"hostports,omitempty"`
### Additions
New clients have been generated for `ApplicationSessions` and `ApplicationUsers`.
+8
View File
@@ -1,3 +1,5 @@
<!-- Code generated for API Clients. DO NOT EDIT. -->
# ngrok API client library for Golang
[![CI](https://github.com/ngrok/ngrok-api-go/actions/workflows/ci.yml/badge.svg)](https://github.com/ngrok/ngrok-api-go/actions/workflows/ci.yml)
[![Go Reference](https://pkg.go.dev/badge/github.com/ngrok/ngrok-api-go.svg)](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v5)
@@ -5,12 +7,18 @@
This library wraps the [ngrok HTTP API](https://ngrok.com/docs/api) to make it
easier to consume in Go.
For creating ngrok tunnels directly from your Go application, check out the [ngrok Go Agent SDK](https://github.com/ngrok/ngrok-go) instead.
## Installation
Installation is as simple as using `go get`.
go get github.com/ngrok/ngrok-api-go/v5
## Support
The best place to get support using this library is through the [ngrok Slack Community](https://ngrok.com/slack). If you find any bugs, please contribute by opening a [new GitHub issue](https://github.com/ngrok/ngrok-api-go/issues/new/choose).
## Documentation
A quickstart guide and a full API reference are included in the [ngrok go API documentation on pkg.go.dev](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v5)
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package abuse_reports
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package agent_ingresses
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package api_keys
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package application_sessions
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package application_users
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package failover
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package http_response
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package tunnel_group
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package weighted
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package certificate_authorities
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ngrok
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package credentials
+260 -107
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ngrok
@@ -206,6 +206,9 @@ type AgentIngressCreate struct {
// the domain that you own to be used as the base domain name to generate regional
// agent ingress domains.
Domain string `json:"domain,omitempty"`
// configuration for automatic management of TLS certificates for this domain, or
// null if automatic management is disabled. Optional.
CertificateManagementPolicy *AgentIngressCertPolicy `json:"certificate_management_policy,omitempty"`
}
func (x *AgentIngressCreate) String() string {
@@ -219,6 +222,7 @@ func (x *AgentIngressCreate) GoString() string {
fmt.Fprintf(tw, "\tDescription\t%v\n", x.Description)
fmt.Fprintf(tw, "\tMetadata\t%v\n", x.Metadata)
fmt.Fprintf(tw, "\tDomain\t%v\n", x.Domain)
fmt.Fprintf(tw, "\tCertificateManagementPolicy\t%v\n", x.CertificateManagementPolicy)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
@@ -232,6 +236,9 @@ type AgentIngressUpdate struct {
// arbitrary user-defined machine-readable data of this Agent Ingress. optional,
// max 4096 bytes
Metadata *string `json:"metadata,omitempty"`
// configuration for automatic management of TLS certificates for this domain, or
// null if automatic management is disabled. Optional.
CertificateManagementPolicy *AgentIngressCertPolicy `json:"certificate_management_policy,omitempty"`
}
func (x *AgentIngressUpdate) String() string {
@@ -246,6 +253,7 @@ func (x *AgentIngressUpdate) GoString() string {
fmt.Fprintf(tw, "\tID\t%v\n", x.ID)
fmt.Fprintf(tw, "\tDescription\t%v\n", x.Description)
fmt.Fprintf(tw, "\tMetadata\t%v\n", x.Metadata)
fmt.Fprintf(tw, "\tCertificateManagementPolicy\t%v\n", x.CertificateManagementPolicy)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
@@ -273,6 +281,12 @@ type AgentIngress struct {
RegionDomains []string `json:"region_domains,omitempty"`
// timestamp when the Agent Ingress was created, RFC 3339 format
CreatedAt string `json:"created_at,omitempty"`
// configuration for automatic management of TLS certificates for this domain, or
// null if automatic management is disabled
CertificateManagementPolicy *AgentIngressCertPolicy `json:"certificate_management_policy,omitempty"`
// status of the automatic certificate management for this domain, or null if
// automatic management is disabled
CertificateManagementStatus *AgentIngressCertStatus `json:"certificate_management_status,omitempty"`
}
func (x *AgentIngress) String() string {
@@ -292,6 +306,8 @@ func (x *AgentIngress) GoString() string {
fmt.Fprintf(tw, "\tNSTargets\t%v\n", x.NSTargets)
fmt.Fprintf(tw, "\tRegionDomains\t%v\n", x.RegionDomains)
fmt.Fprintf(tw, "\tCreatedAt\t%v\n", x.CreatedAt)
fmt.Fprintf(tw, "\tCertificateManagementPolicy\t%v\n", x.CertificateManagementPolicy)
fmt.Fprintf(tw, "\tCertificateManagementStatus\t%v\n", x.CertificateManagementStatus)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
@@ -322,12 +338,93 @@ func (x *AgentIngressList) GoString() string {
return b.String()
}
type AgentIngressCertPolicy struct {
// certificate authority to request certificates from. The only supported value is
// letsencrypt.
Authority string `json:"authority,omitempty"`
// type of private key to use when requesting certificates. Defaults to rsa, can be
// either rsa or ecdsa.
PrivateKeyType string `json:"private_key_type,omitempty"`
}
func (x *AgentIngressCertPolicy) String() string {
return x.GoString()
}
func (x *AgentIngressCertPolicy) GoString() string {
var b bytes.Buffer
fmt.Fprintf(&b, "AgentIngressCertPolicy {\n")
tw := tabwriter.NewWriter(&b, 0, 4, 0, ' ', 0)
fmt.Fprintf(tw, "\tAuthority\t%v\n", x.Authority)
fmt.Fprintf(tw, "\tPrivateKeyType\t%v\n", x.PrivateKeyType)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
}
type AgentIngressCertStatus struct {
// timestamp when the next renewal will be requested, RFC 3339 format
RenewsAt *string `json:"renews_at,omitempty"`
// status of the certificate provisioning job, or null if the certificiate isn't
// being provisioned or renewed
ProvisioningJob *AgentIngressCertJob `json:"provisioning_job,omitempty"`
}
func (x *AgentIngressCertStatus) String() string {
return x.GoString()
}
func (x *AgentIngressCertStatus) GoString() string {
var b bytes.Buffer
fmt.Fprintf(&b, "AgentIngressCertStatus {\n")
tw := tabwriter.NewWriter(&b, 0, 4, 0, ' ', 0)
fmt.Fprintf(tw, "\tRenewsAt\t%v\n", x.RenewsAt)
fmt.Fprintf(tw, "\tProvisioningJob\t%v\n", x.ProvisioningJob)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
}
type AgentIngressCertJob struct {
// if present, an error code indicating why provisioning is failing. It may be
// either a temporary condition (INTERNAL_ERROR), or a permanent one the user must
// correct (DNS_ERROR).
ErrorCode *string `json:"error_code,omitempty"`
// a message describing the current status or error
Msg string `json:"msg,omitempty"`
// timestamp when the provisioning job started, RFC 3339 format
StartedAt string `json:"started_at,omitempty"`
// timestamp when the provisioning job will be retried
RetriesAt *string `json:"retries_at,omitempty"`
}
func (x *AgentIngressCertJob) String() string {
return x.GoString()
}
func (x *AgentIngressCertJob) GoString() string {
var b bytes.Buffer
fmt.Fprintf(&b, "AgentIngressCertJob {\n")
tw := tabwriter.NewWriter(&b, 0, 4, 0, ' ', 0)
fmt.Fprintf(tw, "\tErrorCode\t%v\n", x.ErrorCode)
fmt.Fprintf(tw, "\tMsg\t%v\n", x.Msg)
fmt.Fprintf(tw, "\tStartedAt\t%v\n", x.StartedAt)
fmt.Fprintf(tw, "\tRetriesAt\t%v\n", x.RetriesAt)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
}
type APIKeyCreate struct {
// human-readable description of what uses the API key to authenticate. optional,
// max 255 bytes.
Description string `json:"description,omitempty"`
// arbitrary user-defined data of this API key. optional, max 4096 bytes
Metadata string `json:"metadata,omitempty"`
// If supplied at credential creation, ownership will be assigned to the specified
// User or Bot. Only admins may specify an owner other than themselves. Defaults to
// the authenticated User or Bot.
OwnerID *string `json:"owner_id,omitempty"`
}
func (x *APIKeyCreate) String() string {
@@ -340,6 +437,7 @@ func (x *APIKeyCreate) GoString() string {
tw := tabwriter.NewWriter(&b, 0, 4, 0, ' ', 0)
fmt.Fprintf(tw, "\tDescription\t%v\n", x.Description)
fmt.Fprintf(tw, "\tMetadata\t%v\n", x.Metadata)
fmt.Fprintf(tw, "\tOwnerID\t%v\n", x.OwnerID)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
@@ -387,6 +485,10 @@ type APIKey struct {
// authenticate request to the ngrok API. This value is only available one time, on
// the API response from key creation. Otherwise it is null.
Token *string `json:"token,omitempty"`
// If supplied at credential creation, ownership will be assigned to the specified
// User or Bot. Only admins may specify an owner other than themselves. Defaults to
// the authenticated User or Bot.
OwnerID *string `json:"owner_id,omitempty"`
}
func (x *APIKey) String() string {
@@ -404,6 +506,7 @@ func (x *APIKey) GoString() string {
fmt.Fprintf(tw, "\tMetadata\t%v\n", x.Metadata)
fmt.Fprintf(tw, "\tCreatedAt\t%v\n", x.CreatedAt)
fmt.Fprintf(tw, "\tToken\t%v\n", x.Token)
fmt.Fprintf(tw, "\tOwnerID\t%v\n", x.OwnerID)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
@@ -691,6 +794,99 @@ func (x *IdentityProvider) GoString() string {
return b.String()
}
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 (x *TunnelSession) String() string {
return fmt.Sprintf("TunnelSession{ID: %v}", x.ID)
}
func (x *TunnelSession) GoString() string {
var b bytes.Buffer
fmt.Fprintf(&b, "TunnelSession {\n")
tw := tabwriter.NewWriter(&b, 0, 4, 0, ' ', 0)
fmt.Fprintf(tw, "\tAgentVersion\t%v\n", x.AgentVersion)
fmt.Fprintf(tw, "\tCredential\t%v\n", x.Credential)
fmt.Fprintf(tw, "\tID\t%v\n", x.ID)
fmt.Fprintf(tw, "\tIP\t%v\n", x.IP)
fmt.Fprintf(tw, "\tMetadata\t%v\n", x.Metadata)
fmt.Fprintf(tw, "\tOS\t%v\n", x.OS)
fmt.Fprintf(tw, "\tRegion\t%v\n", x.Region)
fmt.Fprintf(tw, "\tStartedAt\t%v\n", x.StartedAt)
fmt.Fprintf(tw, "\tTransport\t%v\n", x.Transport)
fmt.Fprintf(tw, "\tURI\t%v\n", x.URI)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
}
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 (x *TunnelSessionList) String() string {
return x.GoString()
}
func (x *TunnelSessionList) GoString() string {
var b bytes.Buffer
fmt.Fprintf(&b, "TunnelSessionList {\n")
tw := tabwriter.NewWriter(&b, 0, 4, 0, ' ', 0)
fmt.Fprintf(tw, "\tTunnelSessions\t%v\n", x.TunnelSessions)
fmt.Fprintf(tw, "\tURI\t%v\n", x.URI)
fmt.Fprintf(tw, "\tNextPageURI\t%v\n", x.NextPageURI)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
}
type TunnelSessionsUpdate struct {
ID string `json:"id,omitempty"`
}
func (x *TunnelSessionsUpdate) String() string {
return fmt.Sprintf("TunnelSessionsUpdate{ID: %v}", x.ID)
}
func (x *TunnelSessionsUpdate) GoString() string {
var b bytes.Buffer
fmt.Fprintf(&b, "TunnelSessionsUpdate {\n")
tw := tabwriter.NewWriter(&b, 0, 4, 0, ' ', 0)
fmt.Fprintf(tw, "\tID\t%v\n", x.ID)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
}
type FailoverBackend struct {
// unique identifier for this Failover backend
ID string `json:"id,omitempty"`
@@ -1312,6 +1508,10 @@ type CredentialCreate struct {
// y=example, etc. A rule of '*' is equivalent to no acl at all and will explicitly
// permit all actions.
ACL []string `json:"acl,omitempty"`
// If supplied at credential creation, ownership will be assigned to the specified
// User or Bot. Only admins may specify an owner other than themselves. Defaults to
// the authenticated User or Bot.
OwnerID *string `json:"owner_id,omitempty"`
}
func (x *CredentialCreate) String() string {
@@ -1325,6 +1525,7 @@ func (x *CredentialCreate) GoString() string {
fmt.Fprintf(tw, "\tDescription\t%v\n", x.Description)
fmt.Fprintf(tw, "\tMetadata\t%v\n", x.Metadata)
fmt.Fprintf(tw, "\tACL\t%v\n", x.ACL)
fmt.Fprintf(tw, "\tOwnerID\t%v\n", x.OwnerID)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
@@ -1401,6 +1602,10 @@ type Credential struct {
// y=example, etc. A rule of '*' is equivalent to no acl at all and will explicitly
// permit all actions.
ACL []string `json:"acl,omitempty"`
// If supplied at credential creation, ownership will be assigned to the specified
// User or Bot. Only admins may specify an owner other than themselves. Defaults to
// the authenticated User or Bot.
OwnerID *string `json:"owner_id,omitempty"`
}
func (x *Credential) String() string {
@@ -1419,6 +1624,7 @@ func (x *Credential) GoString() string {
fmt.Fprintf(tw, "\tMetadata\t%v\n", x.Metadata)
fmt.Fprintf(tw, "\tToken\t%v\n", x.Token)
fmt.Fprintf(tw, "\tACL\t%v\n", x.ACL)
fmt.Fprintf(tw, "\tOwnerID\t%v\n", x.OwnerID)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
@@ -1455,8 +1661,8 @@ type EndpointWebhookValidation struct {
Enabled *bool `json:"enabled,omitempty"`
// a string indicating which webhook provider will be sending webhooks to this
// endpoint. Value must be one of the supported providers defined at
// https://ngrok.com/docs/cloud-edge#webhook-verification
// (https://ngrok.com/docs/cloud-edge#webhook-verification)
// https://ngrok.com/docs/cloud-edge/modules/webhook
// (https://ngrok.com/docs/cloud-edge/modules/webhook)
Provider string `json:"provider,omitempty"`
// a string secret used to validate requests from the given provider. All providers
// except AWS SNS require a secret
@@ -1662,7 +1868,9 @@ func (x *EndpointResponseHeaders) GoString() string {
type EndpointIPPolicy struct {
// true if the module will be applied to traffic, false to disable. default true if
// unspecified
Enabled *bool `json:"enabled,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
// list of all IP policies that will be used to check if a source IP is allowed
// access to the endpoint
IPPolicies []Ref `json:"ip_policies,omitempty"`
}
@@ -3613,6 +3821,8 @@ type EventTarget struct {
Kinesis *EventTargetKinesis `json:"kinesis,omitempty"`
// Configuration used to send events to Amazon CloudWatch Logs.
CloudwatchLogs *EventTargetCloudwatchLogs `json:"cloudwatch_logs,omitempty"`
// Configuration used to send events to Datadog.
Datadog *EventTargetDatadog `json:"datadog,omitempty"`
}
func (x *EventTarget) String() string {
@@ -3626,6 +3836,7 @@ func (x *EventTarget) GoString() string {
fmt.Fprintf(tw, "\tFirehose\t%v\n", x.Firehose)
fmt.Fprintf(tw, "\tKinesis\t%v\n", x.Kinesis)
fmt.Fprintf(tw, "\tCloudwatchLogs\t%v\n", x.CloudwatchLogs)
fmt.Fprintf(tw, "\tDatadog\t%v\n", x.Datadog)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
@@ -3702,6 +3913,34 @@ func (x *EventTargetCloudwatchLogs) GoString() string {
return b.String()
}
type EventTargetDatadog struct {
// Datadog API key to use.
ApiKey *string `json:"api_key,omitempty"`
// Tags to send with the event.
Ddtags *string `json:"ddtags,omitempty"`
// Service name to send with the event.
Service *string `json:"service,omitempty"`
// Datadog site to send event to.
Ddsite *string `json:"ddsite,omitempty"`
}
func (x *EventTargetDatadog) String() string {
return x.GoString()
}
func (x *EventTargetDatadog) GoString() string {
var b bytes.Buffer
fmt.Fprintf(&b, "EventTargetDatadog {\n")
tw := tabwriter.NewWriter(&b, 0, 4, 0, ' ', 0)
fmt.Fprintf(tw, "\tApiKey\t%v\n", x.ApiKey)
fmt.Fprintf(tw, "\tDdtags\t%v\n", x.Ddtags)
fmt.Fprintf(tw, "\tService\t%v\n", x.Service)
fmt.Fprintf(tw, "\tDdsite\t%v\n", x.Ddsite)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
}
type AWSAuth struct {
// A role for ngrok to assume on your behalf to deposit events into your AWS
// account.
@@ -4551,9 +4790,6 @@ func (x *ReservedAddrList) GoString() string {
}
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"`
// hostname of the reserved domain
Domain string `json:"domain,omitempty"`
// reserve the domain in this geographic ngrok datacenter. Optional, default is us.
@@ -4581,7 +4817,6 @@ func (x *ReservedDomainCreate) GoString() string {
var b bytes.Buffer
fmt.Fprintf(&b, "ReservedDomainCreate {\n")
tw := tabwriter.NewWriter(&b, 0, 4, 0, ' ', 0)
fmt.Fprintf(tw, "\tName\t%v\n", x.Name)
fmt.Fprintf(tw, "\tDomain\t%v\n", x.Domain)
fmt.Fprintf(tw, "\tRegion\t%v\n", x.Region)
fmt.Fprintf(tw, "\tDescription\t%v\n", x.Description)
@@ -4941,6 +5176,10 @@ type SSHCredentialCreate struct {
ACL []string `json:"acl,omitempty"`
// the PEM-encoded public key of the SSH keypair that will be used to authenticate
PublicKey string `json:"public_key,omitempty"`
// If supplied at credential creation, ownership will be assigned to the specified
// User or Bot. Only admins may specify an owner other than themselves. Defaults to
// the authenticated User or Bot.
OwnerID *string `json:"owner_id,omitempty"`
}
func (x *SSHCredentialCreate) String() string {
@@ -4955,6 +5194,7 @@ func (x *SSHCredentialCreate) GoString() string {
fmt.Fprintf(tw, "\tMetadata\t%v\n", x.Metadata)
fmt.Fprintf(tw, "\tACL\t%v\n", x.ACL)
fmt.Fprintf(tw, "\tPublicKey\t%v\n", x.PublicKey)
fmt.Fprintf(tw, "\tOwnerID\t%v\n", x.OwnerID)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
@@ -5029,6 +5269,10 @@ type SSHCredential struct {
// y=example, etc. A rule of '*' is equivalent to no acl at all and will explicitly
// permit all actions.
ACL []string `json:"acl,omitempty"`
// If supplied at credential creation, ownership will be assigned to the specified
// User or Bot. Only admins may specify an owner other than themselves. Defaults to
// the authenticated User or Bot.
OwnerID *string `json:"owner_id,omitempty"`
}
func (x *SSHCredential) String() string {
@@ -5047,6 +5291,7 @@ func (x *SSHCredential) GoString() string {
fmt.Fprintf(tw, "\tMetadata\t%v\n", x.Metadata)
fmt.Fprintf(tw, "\tPublicKey\t%v\n", x.PublicKey)
fmt.Fprintf(tw, "\tACL\t%v\n", x.ACL)
fmt.Fprintf(tw, "\tOwnerID\t%v\n", x.OwnerID)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
@@ -5438,10 +5683,10 @@ type TLSCertificateCreate struct {
// max 4096 bytes.
Metadata string `json:"metadata,omitempty"`
// chain of PEM-encoded certificates, leaf first. See Certificate Bundles
// (https://ngrok.com/docs/api#tls-certificates-pem).
// (https://ngrok.com/docs/cloud-edge/endpoints#certificate-chains).
CertificatePEM string `json:"certificate_pem,omitempty"`
// private key for the TLS certificate, PEM-encoded. See Private Keys
// (https://ngrok.com/docs/ngrok-link#tls-certificates-key).
// (https://ngrok.com/docs/cloud-edge/endpoints#private-keys).
PrivateKeyPEM string `json:"private_key_pem,omitempty"`
}
@@ -5501,7 +5746,7 @@ type TLSCertificate struct {
// max 4096 bytes.
Metadata string `json:"metadata,omitempty"`
// chain of PEM-encoded certificates, leaf first. See Certificate Bundles
// (https://ngrok.com/docs/api#tls-certificates-pem).
// (https://ngrok.com/docs/cloud-edge/endpoints#certificate-chains).
CertificatePEM string `json:"certificate_pem,omitempty"`
// subject common name from the leaf of this TLS certificate
SubjectCommonName string `json:"subject_common_name,omitempty"`
@@ -5619,99 +5864,6 @@ func (x *TLSCertificateSANs) GoString() string {
return b.String()
}
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 (x *TunnelSession) String() string {
return fmt.Sprintf("TunnelSession{ID: %v}", x.ID)
}
func (x *TunnelSession) GoString() string {
var b bytes.Buffer
fmt.Fprintf(&b, "TunnelSession {\n")
tw := tabwriter.NewWriter(&b, 0, 4, 0, ' ', 0)
fmt.Fprintf(tw, "\tAgentVersion\t%v\n", x.AgentVersion)
fmt.Fprintf(tw, "\tCredential\t%v\n", x.Credential)
fmt.Fprintf(tw, "\tID\t%v\n", x.ID)
fmt.Fprintf(tw, "\tIP\t%v\n", x.IP)
fmt.Fprintf(tw, "\tMetadata\t%v\n", x.Metadata)
fmt.Fprintf(tw, "\tOS\t%v\n", x.OS)
fmt.Fprintf(tw, "\tRegion\t%v\n", x.Region)
fmt.Fprintf(tw, "\tStartedAt\t%v\n", x.StartedAt)
fmt.Fprintf(tw, "\tTransport\t%v\n", x.Transport)
fmt.Fprintf(tw, "\tURI\t%v\n", x.URI)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
}
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 (x *TunnelSessionList) String() string {
return x.GoString()
}
func (x *TunnelSessionList) GoString() string {
var b bytes.Buffer
fmt.Fprintf(&b, "TunnelSessionList {\n")
tw := tabwriter.NewWriter(&b, 0, 4, 0, ' ', 0)
fmt.Fprintf(tw, "\tTunnelSessions\t%v\n", x.TunnelSessions)
fmt.Fprintf(tw, "\tURI\t%v\n", x.URI)
fmt.Fprintf(tw, "\tNextPageURI\t%v\n", x.NextPageURI)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
}
type TunnelSessionsUpdate struct {
ID string `json:"id,omitempty"`
}
func (x *TunnelSessionsUpdate) String() string {
return fmt.Sprintf("TunnelSessionsUpdate{ID: %v}", x.ID)
}
func (x *TunnelSessionsUpdate) GoString() string {
var b bytes.Buffer
fmt.Fprintf(&b, "TunnelSessionsUpdate {\n")
tw := tabwriter.NewWriter(&b, 0, 4, 0, ' ', 0)
fmt.Fprintf(tw, "\tID\t%v\n", x.ID)
tw.Flush()
fmt.Fprintf(&b, "}\n")
return b.String()
}
type Tunnel struct {
// unique tunnel resource identifier
ID string `json:"id,omitempty"`
@@ -5721,9 +5873,10 @@ type Tunnel struct {
StartedAt string `json:"started_at,omitempty"`
// user-supplied metadata for the tunnel defined in the ngrok configuration file.
// See the tunnel metadata configuration option
// (https://ngrok.com/docs#tunnel-definitions-metadata) In API version 0, this
// value was instead pulled from the top-level metadata configuration option
// (https://ngrok.com/docs#config_metadata).
// (https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config#common-tunnel-configuration-properties)
// In API version 0, this value was instead pulled from the top-level metadata
// configuration option
// (https://ngrok.com/docs/secure-tunnels/ngrok-agent/reference/config#metadata).
Metadata string `json:"metadata,omitempty"`
// tunnel protocol for ephemeral tunnels. one of http, https, tcp or tls
Proto string `json:"proto,omitempty"`
+2
View File
@@ -1,3 +1,5 @@
// Code generated for API Clients. DO NOT EDIT.
// 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.
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_mutual_tls
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_route_backend
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_route_circuit_breaker
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_route_compression
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_route_ip_restriction
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_route_oauth
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_route_oidc
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_route_request_headers
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_route_response_headers
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_route_saml
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_route_webhook_verification
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_route_websocket_tcp_converter
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_edge_tls_termination
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package tcp_edge_backend
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package tcp_edge_ip_restriction
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package tls_edge_backend
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package tls_edge_ip_restriction
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package tls_edge_mutual_tls
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package tls_edge_tls_termination
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package https_routes
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package tcp
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package tls
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package endpoints
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ngrok
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package event_destinations
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package event_sources
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package event_subscriptions
+2
View File
@@ -1,3 +1,5 @@
// Code generated for API Clients. DO NOT EDIT.
module github.com/ngrok/ngrok-api-go/v5
go 1.18
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ngrok_test
+2
View File
@@ -1,3 +1,5 @@
// Code generated for API Clients. DO NOT EDIT.
package api
import (
+2
View File
@@ -1,3 +1,5 @@
// Code generated for API Clients. DO NOT EDIT.
package api
import (
+2
View File
@@ -1,3 +1,5 @@
// Code generated for API Clients. DO NOT EDIT.
package api
import "runtime/debug"
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ip_policies
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ip_policy_rules
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ip_restrictions
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package reserved_addrs
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package reserved_domains
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ssh_certificate_authorities
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ssh_credentials
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ssh_host_certificates
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ssh_user_certificates
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package tls_certificates
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ngrok_test
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package tunnel_sessions
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package tunnels
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated by apic. DO NOT EDIT.
// Code generated for API Clients. DO NOT EDIT.
package ngrok