sdkkonnectgo

package module
v0.2.16 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 12 Imported by: 4

README

sdk-konnect-go

This is a prototype and should not be used. See CONTRIBUTING.md for information on how this SDK is generated.

Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both.

By Default, an API error will return sdkerrors.SDKError. When custom error responses are specified for an operation, the SDK may also return their associated error. You can refer to respective Errors tables in SDK docs for more details on possible error types for each operation.

For example, the ListUserConfigurations function may return the following errors:

Error Type Status Code Content Type
sdkerrors.BadRequestError 400 application/problem+json
sdkerrors.UnauthorizedError 401 application/problem+json
sdkerrors.ForbiddenError 403 application/problem+json
sdkerrors.NotFoundError 404 application/problem+json
sdkerrors.SDKError 4XX, 5XX */*
Example
package main

import (
	"context"
	"errors"
	sdkkonnectgo "github.com/Kong/sdk-konnect-go"
	"github.com/Kong/sdk-konnect-go/models/components"
	"github.com/Kong/sdk-konnect-go/models/sdkerrors"
	"log"
)

func main() {
	ctx := context.Background()

	s := sdkkonnectgo.New(
		sdkkonnectgo.WithSecurity(components.Security{
			PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
		}),
	)

	res, err := s.Notifications.ListUserConfigurations(ctx, nil)
	if err != nil {

		var e *sdkerrors.BadRequestError
		if errors.As(err, &e) {
			// handle error
			log.Fatal(e.Error())
		}

		var e *sdkerrors.UnauthorizedError
		if errors.As(err, &e) {
			// handle error
			log.Fatal(e.Error())
		}

		var e *sdkerrors.ForbiddenError
		if errors.As(err, &e) {
			// handle error
			log.Fatal(e.Error())
		}

		var e *sdkerrors.NotFoundError
		if errors.As(err, &e) {
			// handle error
			log.Fatal(e.Error())
		}

		var e *sdkerrors.SDKError
		if errors.As(err, &e) {
			// handle error
			log.Fatal(e.Error())
		}
	}
}

Server Selection

Select Server by Index

You can override the default server globally using the WithServerIndex(serverIndex int) option when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

# Server Description
0 https://global.api.konghq.com
1 https://us.api.konghq.com
2 https://eu.api.konghq.com
3 https://au.api.konghq.com
Example
package main

import (
	"context"
	sdkkonnectgo "github.com/Kong/sdk-konnect-go"
	"github.com/Kong/sdk-konnect-go/models/components"
	"log"
)

func main() {
	ctx := context.Background()

	s := sdkkonnectgo.New(
		sdkkonnectgo.WithServerIndex(3),
		sdkkonnectgo.WithSecurity(components.Security{
			PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
		}),
	)

	res, err := s.Notifications.ListUserConfigurations(ctx, nil)
	if err != nil {
		log.Fatal(err)
	}
	if res.UserConfigurationListResponse != nil {
		// handle response
	}
}

Override Server URL Per-Client

The default server can also be overridden globally using the WithServerURL(serverURL string) option when initializing the SDK client instance. For example:

package main

import (
	"context"
	sdkkonnectgo "github.com/Kong/sdk-konnect-go"
	"github.com/Kong/sdk-konnect-go/models/components"
	"log"
)

func main() {
	ctx := context.Background()

	s := sdkkonnectgo.New(
		sdkkonnectgo.WithServerURL("https://global.api.konghq.com"),
		sdkkonnectgo.WithSecurity(components.Security{
			PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
		}),
	)

	res, err := s.Notifications.ListUserConfigurations(ctx, nil)
	if err != nil {
		log.Fatal(err)
	}
	if res.UserConfigurationListResponse != nil {
		// handle response
	}
}

Override Server URL Per-Operation

The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:

package main

import (
	"context"
	sdkkonnectgo "github.com/Kong/sdk-konnect-go"
	"github.com/Kong/sdk-konnect-go/models/operations"
	"log"
)

func main() {
	ctx := context.Background()

	s := sdkkonnectgo.New()

	res, err := s.CloudGateways.GetAvailabilityJSON(ctx, operations.WithServerURL("https://global.api.konghq.com/"))
	if err != nil {
		log.Fatal(err)
	}
	if res.AvailabilityDocument != nil {
		// handle response
	}
}

Custom HTTP Client

The Go SDK makes API calls that wrap an internal HTTP client. The requirements for the HTTP client are very simple. It must match this interface:

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

The built-in net/http client satisfies this interface and a default client based on the built-in is provided by default. To replace this default with a client of your own, you can implement this interface yourself or provide your own client configured as desired. Here's a simple example, which adds a client with a 30 second timeout.

import (
	"net/http"
	"time"
	"github.com/myorg/your-go-sdk"
)

var (
	httpClient = &http.Client{Timeout: 30 * time.Second}
	sdkClient  = sdk.New(sdk.WithClient(httpClient))
)

This can be a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration.

Authentication

Per-Client Security Schemes

This SDK supports the following security schemes globally:

Name Type Scheme
PersonalAccessToken http HTTP Bearer
SystemAccountAccessToken http HTTP Bearer
KonnectAccessToken http HTTP Bearer

You can set the security parameters through the WithSecurity option when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:

package main

import (
	"context"
	sdkkonnectgo "github.com/Kong/sdk-konnect-go"
	"github.com/Kong/sdk-konnect-go/models/components"
	"log"
)

func main() {
	ctx := context.Background()

	s := sdkkonnectgo.New(
		sdkkonnectgo.WithSecurity(components.Security{
			PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
		}),
	)

	res, err := s.Notifications.ListUserConfigurations(ctx, nil)
	if err != nil {
		log.Fatal(err)
	}
	if res.UserConfigurationListResponse != nil {
		// handle response
	}
}

Summary

Konnect API - Go SDK: The Konnect platform API

For more information about the API: Documentation for Kong Gateway and its APIs

Table of Contents

Retries

Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

To change the default retry strategy for a single API call, simply provide a retry.Config object to the call by using the WithRetries option:

package main

import (
	"context"
	sdkkonnectgo "github.com/Kong/sdk-konnect-go"
	"github.com/Kong/sdk-konnect-go/models/components"
	"github.com/Kong/sdk-konnect-go/retry"
	"log"
	"models/operations"
)

func main() {
	ctx := context.Background()

	s := sdkkonnectgo.New(
		sdkkonnectgo.WithSecurity(components.Security{
			PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
		}),
	)

	res, err := s.Notifications.ListUserConfigurations(ctx, nil, operations.WithRetries(
		retry.Config{
			Strategy: "backoff",
			Backoff: &retry.BackoffStrategy{
				InitialInterval: 1,
				MaxInterval:     50,
				Exponent:        1.1,
				MaxElapsedTime:  100,
			},
			RetryConnectionErrors: false,
		}))
	if err != nil {
		log.Fatal(err)
	}
	if res.UserConfigurationListResponse != nil {
		// handle response
	}
}

If you'd like to override the default retry strategy for all operations that support retries, you can use the WithRetryConfig option at SDK initialization:

package main

import (
	"context"
	sdkkonnectgo "github.com/Kong/sdk-konnect-go"
	"github.com/Kong/sdk-konnect-go/models/components"
	"github.com/Kong/sdk-konnect-go/retry"
	"log"
)

func main() {
	ctx := context.Background()

	s := sdkkonnectgo.New(
		sdkkonnectgo.WithRetryConfig(
			retry.Config{
				Strategy: "backoff",
				Backoff: &retry.BackoffStrategy{
					InitialInterval: 1,
					MaxInterval:     50,
					Exponent:        1.1,
					MaxElapsedTime:  100,
				},
				RetryConnectionErrors: false,
			}),
		sdkkonnectgo.WithSecurity(components.Security{
			PersonalAccessToken: sdkkonnectgo.String("<YOUR_BEARER_TOKEN_HERE>"),
		}),
	)

	res, err := s.Notifications.ListUserConfigurations(ctx, nil)
	if err != nil {
		log.Fatal(err)
	}
	if res.UserConfigurationListResponse != nil {
		// handle response
	}
}

d

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerList = []string{
	"https://global.api.konghq.com",
	"https://us.api.konghq.com",
	"https://eu.api.konghq.com",
	"https://au.api.konghq.com",
}

ServerList contains the list of servers available to the SDK

Functions

func Bool

func Bool(b bool) *bool

Bool provides a helper function to return a pointer to a bool

func Float32

func Float32(f float32) *float32

Float32 provides a helper function to return a pointer to a float32

func Float64

func Float64(f float64) *float64

Float64 provides a helper function to return a pointer to a float64

func Int

func Int(i int) *int

Int provides a helper function to return a pointer to an int

func Int64

func Int64(i int64) *int64

Int64 provides a helper function to return a pointer to an int64

func Pointer

func Pointer[T any](v T) *T

Pointer provides a helper function to return a pointer to a type

func String

func String(s string) *string

String provides a helper function to return a pointer to a string

Types

type ACLs

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

func (*ACLs) CreateACLWithConsumer

CreateACLWithConsumer - Create a new ACL associated with a Consumer Create a new ACL associated with a Consumer

func (*ACLs) DeleteACLWithConsumer

DeleteACLWithConsumer - Delete a an ACL associated with a Consumer Delete a an ACL associated with a Consumer using ID.

func (*ACLs) GetACL

func (s *ACLs) GetACL(ctx context.Context, aclID string, controlPlaneID string, opts ...operations.Option) (*operations.GetACLResponse, error)

GetACL - Fetch an ACL Get an ACL using ID.

func (*ACLs) GetACLWithConsumer

GetACLWithConsumer - Fetch an ACL associated with a Consumer Get an ACL associated with a Consumer using ID.

func (*ACLs) ListACL

ListACL - List all ACLs List all ACLs

func (*ACLs) ListACLWithConsumer

ListACLWithConsumer - List all ACLs associated with a Consumer List all ACLs associated with a Consumer

func (*ACLs) UpsertACLWithConsumer

UpsertACLWithConsumer - Upsert an ACL associated with a Consumer Create or Update an ACL associated with a Consumer using ID.

type APIKeys

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

func (*APIKeys) CreateKeyAuthWithConsumer

CreateKeyAuthWithConsumer - Create a new API-key associated with a Consumer Create a new API-key associated with a Consumer

func (*APIKeys) DeleteKeyAuthWithConsumer

DeleteKeyAuthWithConsumer - Delete a an API-key associated with a Consumer Delete a an API-key associated with a Consumer using ID.

func (*APIKeys) GetKeyAuth

func (s *APIKeys) GetKeyAuth(ctx context.Context, keyAuthID string, controlPlaneID string, opts ...operations.Option) (*operations.GetKeyAuthResponse, error)

GetKeyAuth - Fetch an API-key Get an API-key using ID.

func (*APIKeys) GetKeyAuthWithConsumer

GetKeyAuthWithConsumer - Fetch an API-key associated with a Consumer Get an API-key associated with a Consumer using ID.

func (*APIKeys) ListKeyAuth

ListKeyAuth - List all API-keys List all API-keys

func (*APIKeys) ListKeyAuthWithConsumer

ListKeyAuthWithConsumer - List all API-keys associated with a Consumer List all API-keys associated with a Consumer

func (*APIKeys) UpsertKeyAuthWithConsumer

UpsertKeyAuthWithConsumer - Upsert an API-key associated with a Consumer Create or Update an API-key associated with a Consumer using ID.

type AuthSettings

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

func (*AuthSettings) CreateIdentityProvider added in v0.1.29

CreateIdentityProvider - Create Identity Provider Creates a new identity provider. This operation allows the creation of a new identity provider for authentication purposes.

func (*AuthSettings) DeleteIdentityProvider added in v0.1.29

func (s *AuthSettings) DeleteIdentityProvider(ctx context.Context, id string, opts ...operations.Option) (*operations.DeleteIdentityProviderResponse, error)

DeleteIdentityProvider - Delete Identity Provider Deletes an existing identity provider configuration. This operation removes a specific identity provider from the organization.

func (*AuthSettings) GetAuthenticationSettings

func (s *AuthSettings) GetAuthenticationSettings(ctx context.Context, opts ...operations.Option) (*operations.GetAuthenticationSettingsResponse, error)

GetAuthenticationSettings - Get Auth Settings Returns authentication configuration, which determines how users can log in and how they are assigned to teams.

func (*AuthSettings) GetIdentityProvider added in v0.1.29

func (s *AuthSettings) GetIdentityProvider(ctx context.Context, id string, opts ...operations.Option) (*operations.GetIdentityProviderResponse, error)

GetIdentityProvider - Get Identity Provider Retrieves the configuration of a single identity provider. This operation returns information about a specific identity provider's settings and authentication integration details.

func (*AuthSettings) GetIdentityProviders added in v0.1.29

func (s *AuthSettings) GetIdentityProviders(ctx context.Context, filter *operations.Filter, opts ...operations.Option) (*operations.GetIdentityProvidersResponse, error)

GetIdentityProviders - Retrieve Identity Providers Retrieves the identity providers available within the organization. This operation provides information about various identity providers for SAML or OIDC authentication integrations.

func (*AuthSettings) GetIdpConfiguration

func (s *AuthSettings) GetIdpConfiguration(ctx context.Context, opts ...operations.Option) (*operations.GetIdpConfigurationResponse, error)

GetIdpConfiguration - Fetch IdP Configuration Fetch the IdP configuration.

func (*AuthSettings) GetIdpTeamMappings

func (s *AuthSettings) GetIdpTeamMappings(ctx context.Context, pageSize *int64, pageNumber *int64, opts ...operations.Option) (*operations.GetIdpTeamMappingsResponse, error)

GetIdpTeamMappings - Fetch Team Mapping Fetch the IdP group to Konnect team mapping.

func (*AuthSettings) GetTeamGroupMappings

func (s *AuthSettings) GetTeamGroupMappings(ctx context.Context, pageSize *int64, pageNumber *int64, opts ...operations.Option) (*operations.GetTeamGroupMappingsResponse, error)

GetTeamGroupMappings - Fetch Team Group Mappings Retrieves the mappings between Konnect Teams and Identity Provider Groups. Returns a 400 error if an Identity Provider has not yet been configured.

func (*AuthSettings) PatchTeamGroupMappings

PatchTeamGroupMappings - Patch Mappings by Team ID Allows partial updates to the mappings between Konnect Teams and Identity Provider Groups. The request body must be keyed on team ID. For a given team ID, the given group list is a complete replacement. To remove all mappings for a given team, provide an empty group list.

Returns a 400 error if an Identity Provider has not yet been configured, or if a team ID in the request body is not found or is not a UUID.

func (*AuthSettings) UpdateAuthenticationSettings

UpdateAuthenticationSettings - Update Auth Settings Updates authentication configuration.

func (*AuthSettings) UpdateIdentityProvider added in v0.1.29

func (s *AuthSettings) UpdateIdentityProvider(ctx context.Context, id string, updateIdentityProvider components.UpdateIdentityProvider, opts ...operations.Option) (*operations.UpdateIdentityProviderResponse, error)

UpdateIdentityProvider - Update Identity Provider Updates the configuration of an existing identity provider. This operation allows modifications to be made to an existing identity provider's configuration.

func (*AuthSettings) UpdateIdpConfiguration

UpdateIdpConfiguration - Update IdP Configuration Update the IdP configuration.

func (*AuthSettings) UpdateIdpTeamMappings

UpdateIdpTeamMappings - Update Team Mappings Updates the IdP group to Konnect team mapping.

type Authentication

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

func (*Authentication) AuthenticateSso

func (s *Authentication) AuthenticateSso(ctx context.Context, organizationLoginPath string, returnTo *string, opts ...operations.Option) (*operations.AuthenticateSsoResponse, error)

AuthenticateSso - SSO Callback Callback for authenticating via an organization's IdP

type BasicAuthCredentials

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

func (*BasicAuthCredentials) CreateBasicAuthWithConsumer

CreateBasicAuthWithConsumer - Create a new Basic-auth credential associated with a Consumer Create a new Basic-auth credential associated with a Consumer

func (*BasicAuthCredentials) DeleteBasicAuthWithConsumer

DeleteBasicAuthWithConsumer - Delete a a Basic-auth credential associated with a Consumer Delete a a Basic-auth credential associated with a Consumer using ID.

func (*BasicAuthCredentials) GetBasicAuth

func (s *BasicAuthCredentials) GetBasicAuth(ctx context.Context, basicAuthID string, controlPlaneID string, opts ...operations.Option) (*operations.GetBasicAuthResponse, error)

GetBasicAuth - Fetch a Basic-auth credential Get a Basic-auth credential using ID.

func (*BasicAuthCredentials) GetBasicAuthWithConsumer

GetBasicAuthWithConsumer - Fetch a Basic-auth credential associated with a Consumer Get a Basic-auth credential associated with a Consumer using ID.

func (*BasicAuthCredentials) ListBasicAuth

ListBasicAuth - List all Basic-auth credentials List all Basic-auth credentials

func (*BasicAuthCredentials) ListBasicAuthWithConsumer

ListBasicAuthWithConsumer - List all Basic-auth credentials associated with a Consumer List all Basic-auth credentials associated with a Consumer

func (*BasicAuthCredentials) UpsertBasicAuthWithConsumer

UpsertBasicAuthWithConsumer - Upsert a Basic-auth credential associated with a Consumer Create or Update a Basic-auth credential associated with a Consumer using ID.

type CACertificates

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

CACertificates - A CA certificate object represents a trusted certificate authority. These objects are used by Kong Gateway to verify the validity of a client or server certificate.

func (*CACertificates) CreateCaCertificate

func (s *CACertificates) CreateCaCertificate(ctx context.Context, controlPlaneID string, caCertificate components.CACertificateInput, opts ...operations.Option) (*operations.CreateCaCertificateResponse, error)

CreateCaCertificate - Create a new CA Certificate Create a new CA Certificate

func (*CACertificates) DeleteCaCertificate

func (s *CACertificates) DeleteCaCertificate(ctx context.Context, controlPlaneID string, caCertificateID string, opts ...operations.Option) (*operations.DeleteCaCertificateResponse, error)

DeleteCaCertificate - Delete a CA Certificate Delete a CA Certificate

func (*CACertificates) GetCaCertificate

func (s *CACertificates) GetCaCertificate(ctx context.Context, caCertificateID string, controlPlaneID string, opts ...operations.Option) (*operations.GetCaCertificateResponse, error)

GetCaCertificate - Fetch a CA Certificate Get a CA Certificate using ID.

func (*CACertificates) ListCaCertificate

ListCaCertificate - List all CA Certificates List all CA Certificates

func (*CACertificates) UpsertCaCertificate

UpsertCaCertificate - Upsert a CA Certificate Create or Update CA Certificate using ID.

type Certificates

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

Certificates - A certificate object represents a public certificate, and can be optionally paired with the corresponding private key. These objects are used by Kong Gateway to handle SSL/TLS termination for encrypted requests, or for use as a trusted CA store when validating peer certificate of client/service. <br><br> Certificates are optionally associated with SNI objects to tie a cert/key pair to one or more hostnames. <br><br> If intermediate certificates are required in addition to the main certificate, they should be concatenated together into one string.

func (*Certificates) CreateCertificate

func (s *Certificates) CreateCertificate(ctx context.Context, controlPlaneID string, certificate components.CertificateInput, opts ...operations.Option) (*operations.CreateCertificateResponse, error)

CreateCertificate - Create a new Certificate Create a new Certificate

func (*Certificates) DeleteCertificate

func (s *Certificates) DeleteCertificate(ctx context.Context, controlPlaneID string, certificateID string, opts ...operations.Option) (*operations.DeleteCertificateResponse, error)

DeleteCertificate - Delete a Certificate Delete a Certificate

func (*Certificates) GetCertificate

func (s *Certificates) GetCertificate(ctx context.Context, certificateID string, controlPlaneID string, opts ...operations.Option) (*operations.GetCertificateResponse, error)

GetCertificate - Fetch a Certificate Get a Certificate using ID.

func (*Certificates) ListCertificate

ListCertificate - List all Certificates List all Certificates

func (*Certificates) UpsertCertificate

UpsertCertificate - Upsert a Certificate Create or Update Certificate using ID.

type CloudGateways added in v0.2.0

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

func (*CloudGateways) CreateConfiguration added in v0.2.0

CreateConfiguration - Create Configuration Creates a new configuration for a control-plane (restricted by permitted control-plane permissions for configurations). This request will replace any existing configuration for the requested control_plane_id and control_plane_geo by performing a diff. From this diff, new resources detected in the requested configuration will be added, resources not found in the request configuration but in the previous will be deleted, and resources found in both will be updated to the requested configuration. Networks referenced in this request that are in an offline state will automatically initialize (i.e. move to an initializing state).

func (*CloudGateways) CreateCustomDomains added in v0.2.0

CreateCustomDomains - Create Custom Domain Creates a new custom domain for a control-plane (restricted by permitted control-plane associate-custom-domain action).

func (*CloudGateways) CreateNetwork added in v0.2.0

CreateNetwork - Create Network Creates a new network for a given provider account.

func (*CloudGateways) CreateTransitGateway added in v0.2.0

func (s *CloudGateways) CreateTransitGateway(ctx context.Context, networkID string, createTransitGatewayRequest components.CreateTransitGatewayRequest, opts ...operations.Option) (*operations.CreateTransitGatewayResponse, error)

CreateTransitGateway - Create Transit Gateway Creates a new transit gateway for a given network.

func (*CloudGateways) DeleteCustomDomain added in v0.2.0

func (s *CloudGateways) DeleteCustomDomain(ctx context.Context, customDomainID string, opts ...operations.Option) (*operations.DeleteCustomDomainResponse, error)

DeleteCustomDomain - Delete Custom Domain Deletes a custom domain by ID (restricted by permitted control-plane reads).

func (*CloudGateways) DeleteNetwork added in v0.2.0

func (s *CloudGateways) DeleteNetwork(ctx context.Context, networkID string, opts ...operations.Option) (*operations.DeleteNetworkResponse, error)

DeleteNetwork - Delete Network Deletes a network by ID.

func (*CloudGateways) DeleteTransitGateway added in v0.2.0

func (s *CloudGateways) DeleteTransitGateway(ctx context.Context, networkID string, transitGatewayID string, opts ...operations.Option) (*operations.DeleteTransitGatewayResponse, error)

DeleteTransitGateway - Delete Transit Gateway Deletes a transit gateway by ID for a given network.

func (*CloudGateways) GetAvailabilityJSON added in v0.2.0

func (s *CloudGateways) GetAvailabilityJSON(ctx context.Context, opts ...operations.Option) (*operations.GetAvailabilityJSONResponse, error)

GetAvailabilityJSON - Get Resource Availability JSON Get Cloud Gateways Availability JSON document for describing cloud provider and region availability, pricing, gateway version availability, and instance type information.

func (*CloudGateways) GetConfiguration added in v0.2.0

func (s *CloudGateways) GetConfiguration(ctx context.Context, configurationID string, opts ...operations.Option) (*operations.GetConfigurationResponse, error)

GetConfiguration - Get Configuration Retrieves a configuration by ID (restricted by permitted control-plane read).

func (*CloudGateways) GetCustomDomain added in v0.2.0

func (s *CloudGateways) GetCustomDomain(ctx context.Context, customDomainID string, opts ...operations.Option) (*operations.GetCustomDomainResponse, error)

GetCustomDomain - Get Custom Domain Retrieves a custom domain by ID (restricted by permitted control-plane reads).

func (*CloudGateways) GetCustomDomainOnlineStatus added in v0.2.0

func (s *CloudGateways) GetCustomDomainOnlineStatus(ctx context.Context, customDomainID string, opts ...operations.Option) (*operations.GetCustomDomainOnlineStatusResponse, error)

GetCustomDomainOnlineStatus - Get Custom Domain Online Status Retrieves the CNAME and SSL status of a custom domain.

func (*CloudGateways) GetNetwork added in v0.2.0

func (s *CloudGateways) GetNetwork(ctx context.Context, networkID string, opts ...operations.Option) (*operations.GetNetworkResponse, error)

GetNetwork - Get Network Retrieves a network by ID.

func (*CloudGateways) GetProviderAccount added in v0.2.0

func (s *CloudGateways) GetProviderAccount(ctx context.Context, providerAccountID string, opts ...operations.Option) (*operations.GetProviderAccountResponse, error)

GetProviderAccount - Get Provider Account Retrieves a provider account by ID.

func (*CloudGateways) GetResourceConfiguration added in v0.2.0

func (s *CloudGateways) GetResourceConfiguration(ctx context.Context, resourceConfigurationID string, opts ...operations.Option) (*operations.GetResourceConfigurationResponse, error)

GetResourceConfiguration - Get Resource Configuration Retrieves a resource configuration by ID.

func (*CloudGateways) GetResourceQuota added in v0.2.0

func (s *CloudGateways) GetResourceQuota(ctx context.Context, resourceQuotaID string, opts ...operations.Option) (*operations.GetResourceQuotaResponse, error)

GetResourceQuota - Get Resource Quota Retrieves a resource quota by ID.

func (*CloudGateways) GetTransitGateway added in v0.2.0

func (s *CloudGateways) GetTransitGateway(ctx context.Context, networkID string, transitGatewayID string, opts ...operations.Option) (*operations.GetTransitGatewayResponse, error)

GetTransitGateway - Get Transit Gateway Retrieves a transit gateway by ID for a given network.

func (*CloudGateways) ListConfigurations added in v0.2.0

ListConfigurations - List Configurations Returns a paginated collection of configurations across control-planes for an organization (restricted by permitted control-plane reads).

func (*CloudGateways) ListCustomDomains added in v0.2.0

ListCustomDomains - List Custom Domains Returns a paginated collection of custom domains across control-planes for an organization (restricted by permitted control-plane reads).

func (*CloudGateways) ListDefaultResourceConfigurations added in v0.2.0

func (s *CloudGateways) ListDefaultResourceConfigurations(ctx context.Context, pageSize *int64, pageNumber *int64, opts ...operations.Option) (*operations.ListDefaultResourceConfigurationsResponse, error)

ListDefaultResourceConfigurations - List Default Resource Configurations Returns a paginated collection of default resource configurations for cloud-gateways, along with organizationally-defined overrides for those resource configurations. Resource configurations are settings that are applied to all cloud gateway resources in an organization. For example, the "data-plane-group-idle-timeout-minutes" resource configuration sets the idle timeout for all data plane groups in an organization.

func (*CloudGateways) ListDefaultResourceQuotas added in v0.2.0

func (s *CloudGateways) ListDefaultResourceQuotas(ctx context.Context, pageSize *int64, pageNumber *int64, opts ...operations.Option) (*operations.ListDefaultResourceQuotasResponse, error)

ListDefaultResourceQuotas - List Default Resource Quotas Returns a paginated collection of default resource quotas for cloud-gateways, along with organizationally-defined overrides for those resource quotas.

func (*CloudGateways) ListNetworkConfigurations added in v0.2.0

ListNetworkConfigurations - Returns a paginated collection of configurations that reference a network.

List Network Configuration References

func (*CloudGateways) ListNetworks added in v0.2.0

ListNetworks - List Networks Returns a paginated list of networks.

func (*CloudGateways) ListProviderAccounts added in v0.2.0

ListProviderAccounts - List Provider Accounts Returns a a paginated collection of provider accounts for an organization.

func (*CloudGateways) ListResourceConfigurations added in v0.2.0

func (s *CloudGateways) ListResourceConfigurations(ctx context.Context, pageSize *int64, pageNumber *int64, opts ...operations.Option) (*operations.ListResourceConfigurationsResponse, error)

ListResourceConfigurations - List Resource Configurations Returns a paginated collection of resource configurations for an organization. Resource configurations are settings that are applied to all cloud gateway resources in an organization. For example, the "data-plane-group-idle-timeout-minutes" resource configuration sets the idle timeout for all data plane groups in an organization.

func (*CloudGateways) ListResourceQuotas added in v0.2.0

func (s *CloudGateways) ListResourceQuotas(ctx context.Context, pageSize *int64, pageNumber *int64, opts ...operations.Option) (*operations.ListResourceQuotasResponse, error)

ListResourceQuotas - List Resource Quotas Returns a paginated collection of resource quotas for an organization.

func (*CloudGateways) ListTransitGateways added in v0.2.0

ListTransitGateways - List Transit Gateways Returns a paginated collection of transit gateways for a given network.

func (*CloudGateways) UpdateNetwork added in v0.2.1

func (s *CloudGateways) UpdateNetwork(ctx context.Context, networkID string, patchNetworkRequest components.PatchNetworkRequest, opts ...operations.Option) (*operations.UpdateNetworkResponse, error)

UpdateNetwork - Update Network Updates a network by ID.

type ConfigStoreSecrets added in v0.1.28

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

ConfigStoreSecrets - Config Store Secrets

func (*ConfigStoreSecrets) CreateConfigStoreSecret added in v0.1.28

CreateConfigStoreSecret - Create Config Store Secret Creates a secret for a Config Store.

func (*ConfigStoreSecrets) DeleteConfigStoreSecret added in v0.1.28

DeleteConfigStoreSecret - Delete Config Store Secret Removes a secret from a Config Store.

func (*ConfigStoreSecrets) GetConfigStoreSecret added in v0.1.28

GetConfigStoreSecret - Fetch Config Store Secret Returns a secret for the Config Store.

func (*ConfigStoreSecrets) ListConfigStoreSecrets added in v0.1.28

ListConfigStoreSecrets - List Config Store Secrets Returns a collection of all secrets for a Config Store.

func (*ConfigStoreSecrets) UpdateConfigStoreSecret added in v0.1.28

UpdateConfigStoreSecret - Update Config Store Secret Updates a secret for a Config Store.

type ConfigStores added in v0.1.28

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

ConfigStores - Config Stores

func (*ConfigStores) CreateConfigStore added in v0.1.28

func (s *ConfigStores) CreateConfigStore(ctx context.Context, controlPlaneID string, createConfigStore components.CreateConfigStore, opts ...operations.Option) (*operations.CreateConfigStoreResponse, error)

CreateConfigStore - Create Config Store Create a Config Store

func (*ConfigStores) DeleteConfigStore added in v0.1.28

DeleteConfigStore - Delete Config Store Removes a config store

func (*ConfigStores) GetConfigStore added in v0.1.28

func (s *ConfigStores) GetConfigStore(ctx context.Context, controlPlaneID string, configStoreID string, opts ...operations.Option) (*operations.GetConfigStoreResponse, error)

GetConfigStore - Fetch Config Store Returns a Config Store

func (*ConfigStores) ListConfigStores added in v0.1.28

ListConfigStores - List all config stores for a control plane

func (*ConfigStores) UpdateConfigStore added in v0.1.28

UpdateConfigStore - Update an individual Config Store Updates a Config Store

type ConsumerGroups

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

ConsumerGroups - Consumer groups enable the organization and categorization of consumers (users or applications) within an API ecosystem. By grouping consumers together, you eliminate the need to manage them individually, providing a scalable, efficient approach to managing configurations.

func (*ConsumerGroups) AddConsumerToGroup

AddConsumerToGroup - Add consumer to consumer group Add a consumer to a consumer group

func (*ConsumerGroups) AddConsumerToSpecificConsumerGroup

AddConsumerToSpecificConsumerGroup - Add consumer to a specific consumer group Add a consumer to a consumer group

func (*ConsumerGroups) CreateConsumerGroup

func (s *ConsumerGroups) CreateConsumerGroup(ctx context.Context, controlPlaneID string, consumerGroup components.ConsumerGroupInput, opts ...operations.Option) (*operations.CreateConsumerGroupResponse, error)

CreateConsumerGroup - Create a new Consumer Group Create a new Consumer Group

func (*ConsumerGroups) DeleteConsumerGroup

func (s *ConsumerGroups) DeleteConsumerGroup(ctx context.Context, controlPlaneID string, consumerGroupID string, opts ...operations.Option) (*operations.DeleteConsumerGroupResponse, error)

DeleteConsumerGroup - Delete a Consumer Group Delete a Consumer Group

func (*ConsumerGroups) GetConsumerGroup

func (s *ConsumerGroups) GetConsumerGroup(ctx context.Context, consumerGroupID string, controlPlaneID string, opts ...operations.Option) (*operations.GetConsumerGroupResponse, error)

GetConsumerGroup - Fetch a Consumer Group Get a Consumer Group using ID.

func (*ConsumerGroups) ListConsumerGroup

ListConsumerGroup - List all Consumer Groups List all Consumer Groups

func (*ConsumerGroups) ListConsumerGroupsForConsumer

ListConsumerGroupsForConsumer - List all Consumer Groups a Consumer belongs to List all Consumer Groups a Consumer belongs to

func (*ConsumerGroups) ListConsumersForConsumerGroup

ListConsumersForConsumerGroup - List all Consumers in a Consumer Group List all consumers in a consumer group

func (*ConsumerGroups) RemoveAllConsumersFromConsumerGroup

func (s *ConsumerGroups) RemoveAllConsumersFromConsumerGroup(ctx context.Context, consumerGroupID string, controlPlaneID string, opts ...operations.Option) (*operations.RemoveAllConsumersFromConsumerGroupResponse, error)

RemoveAllConsumersFromConsumerGroup - Remove consumers from consumer group Removes all consumers from a consumer groups. This operation does not delete the consumer group.

func (*ConsumerGroups) RemoveConsumerFromAllConsumerGroups

func (s *ConsumerGroups) RemoveConsumerFromAllConsumerGroups(ctx context.Context, controlPlaneID string, consumerID string, opts ...operations.Option) (*operations.RemoveConsumerFromAllConsumerGroupsResponse, error)

RemoveConsumerFromAllConsumerGroups - Remove consumer from consumer group Removes a consumer from all consumer groups. This operation does not delete the consumer group.

func (*ConsumerGroups) RemoveConsumerFromConsumerGroup

RemoveConsumerFromConsumerGroup - Remove consumer from consumer group Removes a consumer from a consumer group. This operation does not delete the consumer group.

func (*ConsumerGroups) RemoveConsumerFromGroup

RemoveConsumerFromGroup - Remove consumer from consumer group Remove a consumer from a consumer group

func (*ConsumerGroups) UpsertConsumerGroup

UpsertConsumerGroup - Upsert a Consumer Group Create or Update Consumer Group using ID.

type Consumers

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

Consumers - The consumer object represents a consumer - or a user - of a service. You can either rely on Kong Gateway as the primary datastore, or you can map the consumer list with your database to keep consistency between Kong Gateway and your existing primary datastore.

func (*Consumers) CreateConsumer

func (s *Consumers) CreateConsumer(ctx context.Context, controlPlaneID string, consumer components.ConsumerInput, opts ...operations.Option) (*operations.CreateConsumerResponse, error)

CreateConsumer - Create a new Consumer Create a new Consumer

func (*Consumers) DeleteConsumer

func (s *Consumers) DeleteConsumer(ctx context.Context, controlPlaneID string, consumerID string, opts ...operations.Option) (*operations.DeleteConsumerResponse, error)

DeleteConsumer - Delete a Consumer Delete a Consumer

func (*Consumers) GetConsumer

func (s *Consumers) GetConsumer(ctx context.Context, consumerID string, controlPlaneID string, opts ...operations.Option) (*operations.GetConsumerResponse, error)

GetConsumer - Fetch a Consumer Get a Consumer using ID or username.

func (*Consumers) ListConsumer

ListConsumer - List all Consumers List all Consumers

func (*Consumers) UpsertConsumer

UpsertConsumer - Upsert a Consumer Create or Update Consumer using ID or username.

type ControlPlaneGroups

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

func (*ControlPlaneGroups) GetControlPlanesIDGroupMemberStatus

func (s *ControlPlaneGroups) GetControlPlanesIDGroupMemberStatus(ctx context.Context, id string, opts ...operations.Option) (*operations.GetControlPlanesIDGroupMemberStatusResponse, error)

GetControlPlanesIDGroupMemberStatus - Control Plane Group Member Status Determines the group membership status of a control plane.

func (*ControlPlaneGroups) GetControlPlanesIDGroupMemberships

GetControlPlanesIDGroupMemberships - List Control Plane Group Memberships Returns an array of control planes that are a member of this control plane group.

func (*ControlPlaneGroups) GetControlPlanesIDGroupStatus

func (s *ControlPlaneGroups) GetControlPlanesIDGroupStatus(ctx context.Context, id string, opts ...operations.Option) (*operations.GetControlPlanesIDGroupStatusResponse, error)

GetControlPlanesIDGroupStatus - Get Control Plane Group Status Returns the status of a control plane group, including existing conflicts.

func (*ControlPlaneGroups) PostControlPlanesIDGroupMembershipsAdd

func (s *ControlPlaneGroups) PostControlPlanesIDGroupMembershipsAdd(ctx context.Context, id string, groupMembership *components.GroupMembership, opts ...operations.Option) (*operations.PostControlPlanesIDGroupMembershipsAddResponse, error)

PostControlPlanesIDGroupMembershipsAdd - Add Control Plane Group Members Adds one or more control planes as a member of a control plane group.

func (*ControlPlaneGroups) PostControlPlanesIDGroupMembershipsRemove

func (s *ControlPlaneGroups) PostControlPlanesIDGroupMembershipsRemove(ctx context.Context, id string, groupMembership *components.GroupMembership, opts ...operations.Option) (*operations.PostControlPlanesIDGroupMembershipsRemoveResponse, error)

PostControlPlanesIDGroupMembershipsRemove - Remove Control Plane Group Members Removes one or more control planes from the members of a control plane group.

func (*ControlPlaneGroups) PutControlPlanesIDGroupMemberships

func (s *ControlPlaneGroups) PutControlPlanesIDGroupMemberships(ctx context.Context, id string, groupMembership *components.GroupMembership, opts ...operations.Option) (*operations.PutControlPlanesIDGroupMembershipsResponse, error)

PutControlPlanesIDGroupMemberships - Upsert Control Plane Group Members Adds one or more control planes as a member of a control plane group.

type ControlPlanes

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

func (*ControlPlanes) CreateControlPlane

CreateControlPlane - Create Control Plane Create a control plane in the Konnect Organization.

func (*ControlPlanes) DeleteControlPlane

func (s *ControlPlanes) DeleteControlPlane(ctx context.Context, id string, opts ...operations.Option) (*operations.DeleteControlPlaneResponse, error)

DeleteControlPlane - Delete Control Plane Delete an individual control plane.

func (*ControlPlanes) GetControlPlane

func (s *ControlPlanes) GetControlPlane(ctx context.Context, id string, opts ...operations.Option) (*operations.GetControlPlaneResponse, error)

GetControlPlane - Fetch Control Plane Returns information about an individual control plane.

func (*ControlPlanes) ListControlPlanes

ListControlPlanes - List Control Planes Returns an array of control plane objects containing information about the Konnect Control Planes.

func (*ControlPlanes) UpdateControlPlane

func (s *ControlPlanes) UpdateControlPlane(ctx context.Context, id string, updateControlPlaneRequest components.UpdateControlPlaneRequest, opts ...operations.Option) (*operations.UpdateControlPlaneResponse, error)

UpdateControlPlane - Update Control Plane Update an individual control plane.

type CustomPluginSchemas

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

CustomPluginSchemas - Custom Plugin Schemas

func (*CustomPluginSchemas) CreatePluginSchemas

func (s *CustomPluginSchemas) CreatePluginSchemas(ctx context.Context, controlPlaneID string, createPluginSchemas *components.CreatePluginSchemas, opts ...operations.Option) (*operations.CreatePluginSchemasResponse, error)

CreatePluginSchemas - Upload custom plugin schema Upload a custom plugin schema associated with a control plane.

func (*CustomPluginSchemas) DeletePluginSchemas

func (s *CustomPluginSchemas) DeletePluginSchemas(ctx context.Context, controlPlaneID string, name string, opts ...operations.Option) (*operations.DeletePluginSchemasResponse, error)

DeletePluginSchemas - Delete custom plugin schema Delete an individual custom plugin schema.

func (*CustomPluginSchemas) GetPluginSchema

func (s *CustomPluginSchemas) GetPluginSchema(ctx context.Context, controlPlaneID string, name string, opts ...operations.Option) (*operations.GetPluginSchemaResponse, error)

GetPluginSchema - Fetch custom plugin schema Returns information about a custom plugin from a given name.

func (*CustomPluginSchemas) ListPluginSchemas

ListPluginSchemas - List custom plugin schemas associated with a control plane Returns an array of custom plugins schemas associated with a control plane.

func (*CustomPluginSchemas) UpdatePluginSchemas

UpdatePluginSchemas - Create or update a custom plugin schema Create or update an individual custom plugin schema.

type DPCertificates

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

DPCertificates - DP Certificates

func (*DPCertificates) CreateDataplaneCertificate

func (s *DPCertificates) CreateDataplaneCertificate(ctx context.Context, controlPlaneID string, dataPlaneClientCertificateRequest *components.DataPlaneClientCertificateRequest, opts ...operations.Option) (*operations.CreateDataplaneCertificateResponse, error)

CreateDataplaneCertificate - Pin New DP Client Certificate Pin a new DP Client Certificate to this control plane. A pinned dataplane certificate allows dataplanes configured with the certificate and corresponding private key to establish connection with this control plane.

func (*DPCertificates) DeleteDataplaneCertificate

func (s *DPCertificates) DeleteDataplaneCertificate(ctx context.Context, controlPlaneID string, certificateID string, opts ...operations.Option) (*operations.DeleteDataplaneCertificateResponse, error)

DeleteDataplaneCertificate - Delete DP Client Certificate Remove a pinned dataplane client certificate associated to this control plane. Removing a pinned dataplane certificate would invalidate any dataplanes currently connected to this control plane using this certificate.

func (*DPCertificates) GetDataplaneCertificate

func (s *DPCertificates) GetDataplaneCertificate(ctx context.Context, controlPlaneID string, certificateID string, opts ...operations.Option) (*operations.GetDataplaneCertificateResponse, error)

GetDataplaneCertificate - Fetch DP Client Certificate Retrieve a pinned dataplane client certificate associated to this control plane. A pinned dataplane certificate allows dataplanes configured with the certificate and corresponding private key to establish connection with this control plane.

func (*DPCertificates) ListDpClientCertificates

func (s *DPCertificates) ListDpClientCertificates(ctx context.Context, controlPlaneID string, opts ...operations.Option) (*operations.ListDpClientCertificatesResponse, error)

ListDpClientCertificates - List DP Client Certificates Returns a list of pinned dataplane client certificates that are associated to this control plane. A pinned dataplane certificate allows dataplanes configured with the certificate and corresponding private key to establish connection with this control plane.

type DPNodes

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

DPNodes - DP Nodes

func (*DPNodes) DeleteNodesNodeID

func (s *DPNodes) DeleteNodesNodeID(ctx context.Context, nodeID string, controlPlaneID string, opts ...operations.Option) (*operations.DeleteNodesNodeIDResponse, error)

DeleteNodesNodeID - Delete Data Plane Node Record Remove a specific data plane node record associated to this control plane. Deleting this record does not prevent the data plane node from re-connecting to the control plane.

func (*DPNodes) GetExpectedConfigHash

func (s *DPNodes) GetExpectedConfigHash(ctx context.Context, controlPlaneID string, opts ...operations.Option) (*operations.GetExpectedConfigHashResponse, error)

GetExpectedConfigHash - Fetch Expected Config Hash Retrieve the expected config hash for this control plane. The expected config hash can be used to verify if the config hash of a data plane node is up to date with the control plane. The config hash will be the same if they are in sync.

func (*DPNodes) GetNodesEol

GetNodesEol - List End-of-Life Data Plane Node Records Returns a list of records of data plane nodes, whose versions are approaching End of Full Support/End of Life, that are associated with this control plane. Each record contains a data plane node's id, version, and corresponding resolution message to upgrade to the closest Long Term Support version.

func (*DPNodes) GetNodesNodeID

GetNodesNodeID - Fetch Data Plane Node Record Retrieve a specific data plane node record associated to this control plane. A data plane node record contains all the metadata information of the Kong Gateway dataplane.

func (*DPNodes) ListDataplaneNodes

ListDataplaneNodes - List Data Plane Node Records Returns a list of data plane node records that are associated to this control plane. A data plane node record contains metadata information for the data plane running Kong Gateway.

type HMACAuthCredentials

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

func (*HMACAuthCredentials) CreateHmacAuthWithConsumer

CreateHmacAuthWithConsumer - Create a new HMAC-auth credential associated with a Consumer Create a new HMAC-auth credential associated with a Consumer

func (*HMACAuthCredentials) DeleteHmacAuthWithConsumer

DeleteHmacAuthWithConsumer - Delete a a HMAC-auth credential associated with a Consumer Delete a a HMAC-auth credential associated with a Consumer using ID.

func (*HMACAuthCredentials) GetHmacAuth

func (s *HMACAuthCredentials) GetHmacAuth(ctx context.Context, hmacAuthID string, controlPlaneID string, opts ...operations.Option) (*operations.GetHmacAuthResponse, error)

GetHmacAuth - Fetch a HMAC-auth credential Get a HMAC-auth credential using ID.

func (*HMACAuthCredentials) GetHmacAuthWithConsumer

GetHmacAuthWithConsumer - Fetch a HMAC-auth credential associated with a Consumer Get a HMAC-auth credential associated with a Consumer using ID.

func (*HMACAuthCredentials) ListHmacAuth

ListHmacAuth - List all HMAC-auth credentials List all HMAC-auth credentials

func (*HMACAuthCredentials) ListHmacAuthWithConsumer

ListHmacAuthWithConsumer - List all HMAC-auth credentials associated with a Consumer List all HMAC-auth credentials associated with a Consumer

func (*HMACAuthCredentials) UpsertHmacAuthWithConsumer

UpsertHmacAuthWithConsumer - Upsert a HMAC-auth credential associated with a Consumer Create or Update a HMAC-auth credential associated with a Consumer using ID.

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient provides an interface for suplying the SDK with a custom HTTP client

type ImpersonationSettings

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

func (*ImpersonationSettings) GetImpersonationSettings

GetImpersonationSettings - Get Impersonation Settings Returns Impersonation Settings, which determines if user impersonation is allowed for an organization.

func (*ImpersonationSettings) UpdateImpersonationSettings

UpdateImpersonationSettings - Update Impersonation Settings Updates Impersonation Settings.

type Invites

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

func (*Invites) InviteUser

func (s *Invites) InviteUser(ctx context.Context, request *components.InviteUser, opts ...operations.Option) (*operations.InviteUserResponse, error)

InviteUser - Invite User Sends an invitation email to invite a user to the Konnect organization. The email contains a link with a one time token to accept the invitation. Upon accepting the invitation, the user is directed to https://cloud.konghq.com/login to complete registration.

type JWTs

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

func (*JWTs) CreateJwtWithConsumer

CreateJwtWithConsumer - Create a new JWT associated with a Consumer Create a new JWT associated with a Consumer

func (*JWTs) DeleteJwtWithConsumer

DeleteJwtWithConsumer - Delete a a JWT associated with a Consumer Delete a a JWT associated with a Consumer using ID.

func (*JWTs) GetJwt

func (s *JWTs) GetJwt(ctx context.Context, jwtID string, controlPlaneID string, opts ...operations.Option) (*operations.GetJwtResponse, error)

GetJwt - Fetch a JWT Get a JWT using ID.

func (*JWTs) GetJwtWithConsumer

GetJwtWithConsumer - Fetch a JWT associated with a Consumer Get a JWT associated with a Consumer using ID.

func (*JWTs) ListJwt

ListJwt - List all JWTs List all JWTs

func (*JWTs) ListJwtWithConsumer

ListJwtWithConsumer - List all JWTs associated with a Consumer List all JWTs associated with a Consumer

func (*JWTs) UpsertJwtWithConsumer

UpsertJwtWithConsumer - Upsert a JWT associated with a Consumer Create or Update a JWT associated with a Consumer using ID.

type KeySets

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

KeySets - A JSON Web key set. Key sets are the preferred way to expose keys to plugins because they tell the plugin where to look for keys or have a scoping mechanism to restrict plugins to specific keys.

func (*KeySets) CreateKeySet

func (s *KeySets) CreateKeySet(ctx context.Context, controlPlaneID string, keySet components.KeySetInput, opts ...operations.Option) (*operations.CreateKeySetResponse, error)

CreateKeySet - Create a new KeySet Create a new KeySet

func (*KeySets) DeleteKeySet

func (s *KeySets) DeleteKeySet(ctx context.Context, controlPlaneID string, keySetID string, opts ...operations.Option) (*operations.DeleteKeySetResponse, error)

DeleteKeySet - Delete a KeySet Delete a KeySet

func (*KeySets) GetKeySet

func (s *KeySets) GetKeySet(ctx context.Context, keySetID string, controlPlaneID string, opts ...operations.Option) (*operations.GetKeySetResponse, error)

GetKeySet - Fetch a KeySet Get a KeySet using ID or name.

func (*KeySets) ListKeySet

ListKeySet - List all KeySets List all KeySets

func (*KeySets) UpsertKeySet

UpsertKeySet - Upsert a KeySet Create or Update KeySet using ID or name.

type Keys

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

Keys - A key object holds a representation of asymmetric keys in various formats. When Kong Gateway or a Kong plugin requires a specific public or private key to perform certain operations, it can use this entity.

func (*Keys) CreateKey

func (s *Keys) CreateKey(ctx context.Context, controlPlaneID string, key components.KeyInput, opts ...operations.Option) (*operations.CreateKeyResponse, error)

CreateKey - Create a new Key Create a new Key

func (*Keys) CreateKeyWithKeySet

CreateKeyWithKeySet - Create a new Key associated with a KeySet Create a new Key associated with a KeySet

func (*Keys) DeleteKey

func (s *Keys) DeleteKey(ctx context.Context, controlPlaneID string, keyID string, opts ...operations.Option) (*operations.DeleteKeyResponse, error)

DeleteKey - Delete a Key Delete a Key

func (*Keys) DeleteKeyWithKeySet

DeleteKeyWithKeySet - Delete a a Key associated with a KeySet Delete a a Key associated with a KeySet using ID or name.

func (*Keys) GetKey

func (s *Keys) GetKey(ctx context.Context, keyID string, controlPlaneID string, opts ...operations.Option) (*operations.GetKeyResponse, error)

GetKey - Fetch a Key Get a Key using ID or name.

func (*Keys) GetKeyWithKeySet

GetKeyWithKeySet - Fetch a Key associated with a KeySet Get a Key associated with a KeySet using ID or name.

func (*Keys) ListKey

ListKey - List all Keys List all Keys

func (*Keys) ListKeyWithKeySet

ListKeyWithKeySet - List all Keys associated with a KeySet List all Keys associated with a KeySet

func (*Keys) UpsertKey

UpsertKey - Upsert a Key Create or Update Key using ID or name.

func (*Keys) UpsertKeyWithKeySet

UpsertKeyWithKeySet - Upsert a Key associated with a KeySet Create or Update a Key associated with a KeySet using ID or name.

type MTLSAuthCredentials

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

func (*MTLSAuthCredentials) CreateMtlsAuthWithConsumer

CreateMtlsAuthWithConsumer - Create a new MTLS-auth credential associated with a Consumer Create a new MTLS-auth credential associated with a Consumer

func (*MTLSAuthCredentials) DeleteMtlsAuthWithConsumer

DeleteMtlsAuthWithConsumer - Delete a a MTLS-auth credential associated with a Consumer Delete a a MTLS-auth credential associated with a Consumer using ID.

func (*MTLSAuthCredentials) GetMtlsAuth

func (s *MTLSAuthCredentials) GetMtlsAuth(ctx context.Context, mtlsAuthID string, controlPlaneID string, opts ...operations.Option) (*operations.GetMtlsAuthResponse, error)

GetMtlsAuth - Fetch a MTLS-auth credential Get a MTLS-auth credential using ID.

func (*MTLSAuthCredentials) GetMtlsAuthWithConsumer

GetMtlsAuthWithConsumer - Fetch a MTLS-auth credential associated with a Consumer Get a MTLS-auth credential associated with a Consumer using ID.

func (*MTLSAuthCredentials) ListMtlsAuth

ListMtlsAuth - List all MTLS-auth credentials List all MTLS-auth credentials

func (*MTLSAuthCredentials) ListMtlsAuthWithConsumer

ListMtlsAuthWithConsumer - List all MTLS-auth credentials associated with a Consumer List all MTLS-auth credentials associated with a Consumer

func (*MTLSAuthCredentials) UpsertMtlsAuthWithConsumer

UpsertMtlsAuthWithConsumer - Upsert a MTLS-auth credential associated with a Consumer Create or Update a MTLS-auth credential associated with a Consumer using ID.

type Me

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

func (*Me) GetOrganizationsMe

func (s *Me) GetOrganizationsMe(ctx context.Context, opts ...operations.Option) (*operations.GetOrganizationsMeResponse, error)

GetOrganizationsMe - Retrieve My Organization Returns the organization of the user identified in the token of the request.

func (*Me) GetUsersMe

func (s *Me) GetUsersMe(ctx context.Context, opts ...operations.Option) (*operations.GetUsersMeResponse, error)

GetUsersMe - Retrieve My User Account Returns the user account for the user identified in the token of the request.

type Notifications added in v0.2.15

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

Notifications - Operations related to notifications

func (*Notifications) BulkNotifications added in v0.2.15

BulkNotifications - Mark a list of notifications to a status. Mark a list of notifications to a status.

func (*Notifications) CreateEventSubscription added in v0.2.15

func (s *Notifications) CreateEventSubscription(ctx context.Context, eventID string, eventSubscription *components.EventSubscription, opts ...operations.Option) (*operations.CreateEventSubscriptionResponse, error)

CreateEventSubscription - Create a new subscription for an event. Create a new subscription for an event.

func (*Notifications) DeleteEventSubscription added in v0.2.15

func (s *Notifications) DeleteEventSubscription(ctx context.Context, eventID string, subscriptionID string, opts ...operations.Option) (*operations.DeleteEventSubscriptionResponse, error)

DeleteEventSubscription - Delete subscription associated with event. Delete subscription associated with event.

func (*Notifications) DeleteNotification added in v0.2.15

func (s *Notifications) DeleteNotification(ctx context.Context, notificationID string, opts ...operations.Option) (*operations.DeleteNotificationResponse, error)

DeleteNotification - Delete notification. Delete notification.

func (*Notifications) GetEventSubscription added in v0.2.15

func (s *Notifications) GetEventSubscription(ctx context.Context, eventID string, subscriptionID string, opts ...operations.Option) (*operations.GetEventSubscriptionResponse, error)

GetEventSubscription - Get subscription for an event. Get subscription for an event.

func (*Notifications) GetNotificationDetails added in v0.2.15

func (s *Notifications) GetNotificationDetails(ctx context.Context, notificationID string, opts ...operations.Option) (*operations.GetNotificationDetailsResponse, error)

GetNotificationDetails - Get notification details. Get notification details.

func (*Notifications) ListEventSubscriptions added in v0.2.15

func (s *Notifications) ListEventSubscriptions(ctx context.Context, eventID string, opts ...operations.Option) (*operations.ListEventSubscriptionsResponse, error)

ListEventSubscriptions - List event subscriptions. List event subscriptions.

func (*Notifications) ListNotifications added in v0.2.15

ListNotifications - List available notifications. List available notifications.

func (*Notifications) ListUserConfigurations added in v0.2.15

ListUserConfigurations - List available user configurations. List available user configurations.

func (*Notifications) UpdateEventSubscription added in v0.2.15

UpdateEventSubscription - Update subscription for an event. Update subscription for an event.

func (*Notifications) UpdateNotification added in v0.2.15

func (s *Notifications) UpdateNotification(ctx context.Context, notificationID string, notificationUpdatePayload *components.NotificationUpdatePayload, opts ...operations.Option) (*operations.UpdateNotificationResponse, error)

UpdateNotification - Update notification. Update notification.

type Plugins

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

Plugins - A plugin entity represents a plugin configuration that will be executed during the HTTP request/response lifecycle. Plugins let you add functionality to services that run behind a Kong Gateway instance, like authentication or rate limiting. You can find more information about available plugins and which values each plugin accepts at the [Plugin Hub](https://docs.konghq.com/hub/). <br><br> When adding a plugin configuration to a service, the plugin will run on every request made by a client to that service. If a plugin needs to be tuned to different values for some specific consumers, you can do so by creating a separate plugin instance that specifies both the service and the consumer, through the service and consumer fields. <br><br> Plugins can be both [tagged and filtered by tags](https://docs.konghq.com/gateway/latest/admin-api/#tags).

func (*Plugins) CreatePlugin

func (s *Plugins) CreatePlugin(ctx context.Context, controlPlaneID string, plugin components.PluginInput, opts ...operations.Option) (*operations.CreatePluginResponse, error)

CreatePlugin - Create a new Plugin Create a new Plugin

func (*Plugins) CreatePluginWithConsumer

CreatePluginWithConsumer - Create a new Plugin associated with a Consumer Create a new Plugin associated with a Consumer

func (*Plugins) CreatePluginWithConsumerGroup

CreatePluginWithConsumerGroup - Create a new Plugin associated with a Consumer Group Create a new Plugin associated with a Consumer Group

func (*Plugins) CreatePluginWithRoute

CreatePluginWithRoute - Create a new Plugin associated with a Route Create a new Plugin associated with a Route

func (*Plugins) CreatePluginWithService

CreatePluginWithService - Create a new Plugin associated with a Service Create a new Plugin associated with a Service

func (*Plugins) DeletePlugin

func (s *Plugins) DeletePlugin(ctx context.Context, controlPlaneID string, pluginID string, opts ...operations.Option) (*operations.DeletePluginResponse, error)

DeletePlugin - Delete a Plugin Delete a Plugin

func (*Plugins) DeletePluginWithConsumer

DeletePluginWithConsumer - Delete a a Plugin associated with a Consumer Delete a a Plugin associated with a Consumer using ID.

func (*Plugins) DeletePluginWithConsumerGroup

DeletePluginWithConsumerGroup - Delete a a Plugin associated with a Consumer Group Delete a a Plugin associated with a Consumer Group using ID.

func (*Plugins) DeletePluginWithRoute

DeletePluginWithRoute - Delete a a Plugin associated with a Route Delete a a Plugin associated with a Route using ID.

func (*Plugins) DeletePluginWithService

DeletePluginWithService - Delete a a Plugin associated with a Service Delete a a Plugin associated with a Service using ID.

func (*Plugins) FetchPluginSchema

func (s *Plugins) FetchPluginSchema(ctx context.Context, pluginName string, controlPlaneID string, opts ...operations.Option) (*operations.FetchPluginSchemaResponse, error)

FetchPluginSchema - Fetch plugin schema Get the schema for a plugin

func (*Plugins) GetPlugin

func (s *Plugins) GetPlugin(ctx context.Context, pluginID string, controlPlaneID string, opts ...operations.Option) (*operations.GetPluginResponse, error)

GetPlugin - Fetch a Plugin Get a Plugin using ID.

func (*Plugins) GetPluginWithConsumer

GetPluginWithConsumer - Fetch a Plugin associated with a Consumer Get a Plugin associated with a Consumer using ID.

func (*Plugins) GetPluginWithConsumerGroup

GetPluginWithConsumerGroup - Fetch a Plugin associated with a Consumer Group Get a Plugin associated with a Consumer Group using ID.

func (*Plugins) GetPluginWithRoute

GetPluginWithRoute - Fetch a Plugin associated with a Route Get a Plugin associated with a Route using ID.

func (*Plugins) GetPluginWithService

GetPluginWithService - Fetch a Plugin associated with a Service Get a Plugin associated with a Service using ID.

func (*Plugins) ListPlugin

ListPlugin - List all Plugins List all Plugins

func (*Plugins) ListPluginWithConsumer

ListPluginWithConsumer - List all Plugins associated with a Consumer List all Plugins associated with a Consumer

func (*Plugins) ListPluginWithConsumerGroup

ListPluginWithConsumerGroup - List all Plugins associated with a Consumer Group List all Plugins associated with a Consumer Group

func (*Plugins) ListPluginWithRoute

ListPluginWithRoute - List all Plugins associated with a Route List all Plugins associated with a Route

func (*Plugins) ListPluginWithService

ListPluginWithService - List all Plugins associated with a Service List all Plugins associated with a Service

func (*Plugins) UpsertPlugin

UpsertPlugin - Upsert a Plugin Create or Update Plugin using ID.

func (*Plugins) UpsertPluginWithConsumer

UpsertPluginWithConsumer - Upsert a Plugin associated with a Consumer Create or Update a Plugin associated with a Consumer using ID.

func (*Plugins) UpsertPluginWithConsumerGroup

UpsertPluginWithConsumerGroup - Upsert a Plugin associated with a Consumer Group Create or Update a Plugin associated with a Consumer Group using ID.

func (*Plugins) UpsertPluginWithRoute

UpsertPluginWithRoute - Upsert a Plugin associated with a Route Create or Update a Plugin associated with a Route using ID.

func (*Plugins) UpsertPluginWithService

UpsertPluginWithService - Upsert a Plugin associated with a Service Create or Update a Plugin associated with a Service using ID.

type Roles

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

func (*Roles) GetPredefinedRoles

func (s *Roles) GetPredefinedRoles(ctx context.Context, opts ...operations.Option) (*operations.GetPredefinedRolesResponse, error)

GetPredefinedRoles - Get Predefined Roles Retrieves the predefined, or system managed, roles.

func (*Roles) ListTeamRoles

ListTeamRoles - List Team Roles Lists the roles belonging to a team. Returns 400 if any filter parameters are invalid.

func (*Roles) ListUserRoles

ListUserRoles - List User Roles Lists the roles assigned to a user. Returns 400 if any filter parameters are invalid.

func (*Roles) TeamsAssignRole

func (s *Roles) TeamsAssignRole(ctx context.Context, teamID string, assignRole *components.AssignRole, opts ...operations.Option) (*operations.TeamsAssignRoleResponse, error)

TeamsAssignRole - Assign Team Role Assigns a role to a team. Returns 409 if role is already assigned.

func (*Roles) TeamsRemoveRole

func (s *Roles) TeamsRemoveRole(ctx context.Context, teamID string, roleID string, opts ...operations.Option) (*operations.TeamsRemoveRoleResponse, error)

TeamsRemoveRole - Remove Team Role Removes an assigned role from a team. Returns 404 if the requested team or assigned role were not found.

func (*Roles) UsersAssignRole

func (s *Roles) UsersAssignRole(ctx context.Context, userID string, assignRole *components.AssignRole, opts ...operations.Option) (*operations.UsersAssignRoleResponse, error)

UsersAssignRole - Assign Role Assigns a role to a user. Returns 409 if role is already assigned.

func (*Roles) UsersRemoveRole

func (s *Roles) UsersRemoveRole(ctx context.Context, userID string, roleID string, opts ...operations.Option) (*operations.UsersRemoveRoleResponse, error)

UsersRemoveRole - Remove Role Removes an assigned role from a user. Returns 404 if the requested user or assigned role were not found.

type Routes

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

Routes - Route entities define rules to match client requests. Each route is associated with a service, and a service may have multiple routes associated to it. Every request matching a given route will be proxied to the associated service. You need at least one matching rule that applies to the protocol being matched by the route. <br><br> The combination of routes and services, and the separation of concerns between them, offers a powerful routing mechanism with which it is possible to define fine-grained entrypoints in Kong Gateway leading to different upstream services of your infrastructure. <br><br> Depending on the protocol, one of the following attributes must be set: <br>

- `http`: At least one of `methods`, `hosts`, `headers`, or `paths` - `https`: At least one of `methods`, `hosts`, `headers`, `paths`, or `snis` - `tcp`: At least one of `sources` or `destinations` - `tls`: at least one of `sources`, `destinations`, or `snis` - `tls_passthrough`: set `snis` - `grpc`: At least one of `hosts`, `headers`, or `paths` - `grpcs`: At least one of `hosts`, `headers`, `paths`, or `snis` - `ws`: At least one of `hosts`, `headers`, or `paths` - `wss`: At least one of `hosts`, `headers`, `paths`, or `snis`

<br>
A route can't have both `tls` and `tls_passthrough` protocols at same time.
<br><br>
Learn more about the router:

- [Configure routes using expressions](https://docs.konghq.com/gateway/latest/key-concepts/routes/expressions) - [Router Expressions language reference](https://docs.konghq.com/gateway/latest/reference/router-expressions-language/)

func (*Routes) CreateRoute

func (s *Routes) CreateRoute(ctx context.Context, controlPlaneID string, route components.RouteInput, opts ...operations.Option) (*operations.CreateRouteResponse, error)

CreateRoute - Create a new Route Create a new Route

func (*Routes) CreateRouteWithService

CreateRouteWithService - Create a new Route associated with a Service Create a new Route associated with a Service

func (*Routes) DeleteRoute

func (s *Routes) DeleteRoute(ctx context.Context, controlPlaneID string, routeID string, opts ...operations.Option) (*operations.DeleteRouteResponse, error)

DeleteRoute - Delete a Route Delete a Route

func (*Routes) DeleteRouteWithService

DeleteRouteWithService - Delete a a Route associated with a Service Delete a a Route associated with a Service using ID or name.

func (*Routes) GetRoute

func (s *Routes) GetRoute(ctx context.Context, routeID string, controlPlaneID string, opts ...operations.Option) (*operations.GetRouteResponse, error)

GetRoute - Fetch a Route Get a Route using ID or name.

func (*Routes) GetRouteWithService

GetRouteWithService - Fetch a Route associated with a Service Get a Route associated with a Service using ID or name.

func (*Routes) ListRoute

ListRoute - List all Routes List all Routes

func (*Routes) ListRouteWithService

ListRouteWithService - List all Routes associated with a Service List all Routes associated with a Service

func (*Routes) UpsertRoute

UpsertRoute - Upsert a Route Create or Update Route using ID or name.

func (*Routes) UpsertRouteWithService

UpsertRouteWithService - Upsert a Route associated with a Service Create or Update a Route associated with a Service using ID or name.

type SDK

type SDK struct {
	// Operations related to notifications
	Notifications *Notifications
	CloudGateways *CloudGateways
	ControlPlanes *ControlPlanes
	// Config Stores
	ConfigStores *ConfigStores
	// Config Store Secrets
	ConfigStoreSecrets   *ConfigStoreSecrets
	ACLs                 *ACLs
	BasicAuthCredentials *BasicAuthCredentials
	// A CA certificate object represents a trusted certificate authority.
	// These objects are used by Kong Gateway to verify the validity of a client or server certificate.
	CACertificates *CACertificates
	// A certificate object represents a public certificate, and can be optionally paired with the corresponding private key. These objects are used by Kong Gateway to handle SSL/TLS termination for encrypted requests, or for use as a trusted CA store when validating peer certificate of client/service.
	// <br><br>
	// Certificates are optionally associated with SNI objects to tie a cert/key pair to one or more hostnames.
	// <br><br>
	// If intermediate certificates are required in addition to the main certificate, they should be concatenated together into one string.
	//
	Certificates *Certificates
	// An SNI object represents a many-to-one mapping of hostnames to a certificate.
	// <br><br>
	// A certificate object can have many hostnames associated with it. When Kong Gateway receives an SSL request, it uses the SNI field in the Client Hello to look up the certificate object based on the SNI associated with the certificate.
	SNIs *SNIs
	// Consumer groups enable the organization and categorization of consumers (users or applications) within an API ecosystem.
	// By grouping consumers together, you eliminate the need to manage them individually, providing a scalable, efficient approach to managing configurations.
	ConsumerGroups *ConsumerGroups
	// A plugin entity represents a plugin configuration that will be executed during the HTTP request/response lifecycle. Plugins let you add functionality to services that run behind a Kong Gateway instance, like authentication or rate limiting.
	// You can find more information about available plugins and which values each plugin accepts at the [Plugin Hub](https://docs.konghq.com/hub/).
	// <br><br>
	// When adding a plugin configuration to a service, the plugin will run on every request made by a client to that service. If a plugin needs to be tuned to different values for some specific consumers, you can do so by creating a separate plugin instance that specifies both the service and the consumer, through the service and consumer fields.
	// <br><br>
	// Plugins can be both [tagged and filtered by tags](https://docs.konghq.com/gateway/latest/admin-api/#tags).
	//
	Plugins *Plugins
	// The consumer object represents a consumer - or a user - of a service.
	// You can either rely on Kong Gateway as the primary datastore, or you can map the consumer list with your database to keep consistency between Kong Gateway and your existing primary datastore.
	//
	Consumers           *Consumers
	HMACAuthCredentials *HMACAuthCredentials
	JWTs                *JWTs
	APIKeys             *APIKeys
	MTLSAuthCredentials *MTLSAuthCredentials
	// A JSON Web key set. Key sets are the preferred way to expose keys to plugins because they tell the plugin where to look for keys or have a scoping mechanism to restrict plugins to specific keys.
	//
	KeySets *KeySets
	// A key object holds a representation of asymmetric keys in various formats. When Kong Gateway or a Kong plugin requires a specific public or private key to perform certain operations, it can use this entity.
	//
	Keys *Keys
	// Custom Plugin Schemas
	CustomPluginSchemas *CustomPluginSchemas
	// Route entities define rules to match client requests. Each route is associated with a service, and a service may have multiple routes associated to it. Every request matching a given route will be proxied to the associated service. You need at least one matching rule that applies to the protocol being matched by the route.
	// <br><br>
	// The combination of routes and services, and the separation of concerns between them, offers a powerful routing mechanism with which it is possible to define fine-grained entrypoints in Kong Gateway leading to different upstream services of your infrastructure.
	// <br><br>
	// Depending on the protocol, one of the following attributes must be set:
	// <br>
	//
	// - `http`: At least one of `methods`, `hosts`, `headers`, or `paths`
	// - `https`: At least one of `methods`, `hosts`, `headers`, `paths`, or `snis`
	// - `tcp`: At least one of `sources` or `destinations`
	// - `tls`: at least one of `sources`, `destinations`, or `snis`
	// - `tls_passthrough`: set `snis`
	// - `grpc`: At least one of `hosts`, `headers`, or `paths`
	// - `grpcs`: At least one of `hosts`, `headers`, `paths`, or `snis`
	// - `ws`: At least one of `hosts`, `headers`, or `paths`
	// - `wss`: At least one of `hosts`, `headers`, `paths`, or `snis`
	//
	//
	//
	//   <br>
	//   A route can't have both `tls` and `tls_passthrough` protocols at same time.
	//   <br><br>
	//   Learn more about the router:
	// - [Configure routes using expressions](https://docs.konghq.com/gateway/latest/key-concepts/routes/expressions)
	// - [Router Expressions language reference](https://docs.konghq.com/gateway/latest/reference/router-expressions-language/)
	//
	Routes *Routes
	// Service entities are abstractions of your microservice interfaces or formal APIs. For example, a service could be a data transformation microservice or a billing API.
	// <br><br>
	// The main attribute of a service is the destination URL for proxying traffic. This URL can be set as a single string or by specifying its protocol, host, port and path individually.
	// <br><br>
	// Services are associated to routes, and a single service can have many routes associated with it. Routes are entrypoints in Kong Gateway which define rules to match client requests. Once a route is matched, Kong Gateway proxies the request to its associated service. See the [Proxy Reference](https://docs.konghq.com/gateway/latest/how-kong-works/routing-traffic/) for a detailed explanation of how Kong proxies traffic.
	// <br><br>
	// Services can be both [tagged and filtered by tags](https://docs.konghq.com/gateway/latest/admin-api/#tags).
	//
	Services *Services
	// The upstream object represents a virtual hostname and can be used to load balance incoming requests over multiple services (targets).
	// <br><br>
	// An upstream also includes a [health checker](https://docs.konghq.com/gateway/latest/how-kong-works/health-checks/), which can enable and disable targets based on their ability or inability to serve requests.
	// The configuration for the health checker is stored in the upstream object, and applies to all of its targets.
	Upstreams *Upstreams
	Targets   *Targets
	// Vault objects are used to configure different vault connectors for [managing secrets](https://docs.konghq.com/gateway/latest/kong-enterprise/secrets-management/).
	// Configuring a vault lets you reference secrets from other entities.
	// This allows for a proper separation of secrets and configuration and prevents secret sprawl.
	// <br><br>
	// For example, you could store a certificate and a key in a vault, then reference them from a certificate entity. This way, the certificate and key are not stored in the entity directly and are more secure.
	// <br><br>
	// Secrets rotation can be managed using [TTLs](https://docs.konghq.com/gateway/latest/kong-enterprise/secrets-management/advanced-usage/).
	//
	Vaults *Vaults
	// DP Certificates
	DPCertificates *DPCertificates
	// DP Nodes
	DPNodes                      *DPNodes
	ControlPlaneGroups           *ControlPlaneGroups
	Authentication               *Authentication
	AuthSettings                 *AuthSettings
	Invites                      *Invites
	ImpersonationSettings        *ImpersonationSettings
	Me                           *Me
	Roles                        *Roles
	SystemAccounts               *SystemAccounts
	SystemAccountsAccessTokens   *SystemAccountsAccessTokens
	SystemAccountsRoles          *SystemAccountsRoles
	SystemAccountsTeamMembership *SystemAccountsTeamMembership
	Teams                        *Teams
	TeamMembership               *TeamMembership
	Users                        *Users
	// contains filtered or unexported fields
}

SDK - Konnect API - Go SDK: The Konnect platform API

https://docs.konghq.com - Documentation for Kong Gateway and its APIs

func New

func New(opts ...SDKOption) *SDK

New creates a new instance of the SDK with the provided options

type SDKOption

type SDKOption func(*SDK)

func WithClient

func WithClient(client HTTPClient) SDKOption

WithClient allows the overriding of the default HTTP client used by the SDK

func WithRetryConfig

func WithRetryConfig(retryConfig retry.Config) SDKOption

func WithSecurity

func WithSecurity(security components.Security) SDKOption

WithSecurity configures the SDK to use the provided security details

func WithSecuritySource

func WithSecuritySource(security func(context.Context) (components.Security, error)) SDKOption

WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication

func WithServerIndex

func WithServerIndex(serverIndex int) SDKOption

WithServerIndex allows the overriding of the default server by index

func WithServerURL

func WithServerURL(serverURL string) SDKOption

WithServerURL allows the overriding of the default server URL

func WithTemplatedServerURL

func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption

WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters

func WithTimeout

func WithTimeout(timeout time.Duration) SDKOption

WithTimeout Optional request timeout applied to each operation

type SNIs

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

SNIs - An SNI object represents a many-to-one mapping of hostnames to a certificate. <br><br> A certificate object can have many hostnames associated with it. When Kong Gateway receives an SSL request, it uses the SNI field in the Client Hello to look up the certificate object based on the SNI associated with the certificate.

func (*SNIs) CreateSni

func (s *SNIs) CreateSni(ctx context.Context, controlPlaneID string, sni components.SNIInput, opts ...operations.Option) (*operations.CreateSniResponse, error)

CreateSni - Create a new SNI Create a new SNI

func (*SNIs) CreateSniWithCertificate

CreateSniWithCertificate - Create a new SNI associated with a Certificate Create a new SNI associated with a Certificate

func (*SNIs) DeleteSni

func (s *SNIs) DeleteSni(ctx context.Context, controlPlaneID string, sniID string, opts ...operations.Option) (*operations.DeleteSniResponse, error)

DeleteSni - Delete an SNI Delete an SNI

func (*SNIs) DeleteSniWithCertificate

DeleteSniWithCertificate - Delete a an SNI associated with a Certificate Delete a an SNI associated with a Certificate using ID or name.

func (*SNIs) GetSni

func (s *SNIs) GetSni(ctx context.Context, sniID string, controlPlaneID string, opts ...operations.Option) (*operations.GetSniResponse, error)

GetSni - Fetch an SNI Get an SNI using ID or name.

func (*SNIs) GetSniWithCertificate

GetSniWithCertificate - Fetch an SNI associated with a Certificate Get an SNI associated with a Certificate using ID or name.

func (*SNIs) ListSni

ListSni - List all SNIs List all SNIs

func (*SNIs) ListSniWithCertificate

ListSniWithCertificate - List all SNIs associated with a Certificate List all SNIs associated with a Certificate

func (*SNIs) UpsertSni

UpsertSni - Upsert a SNI Create or Update SNI using ID or name.

func (*SNIs) UpsertSniWithCertificate

UpsertSniWithCertificate - Upsert an SNI associated with a Certificate Create or Update an SNI associated with a Certificate using ID or name.

type Services

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

Services - Service entities are abstractions of your microservice interfaces or formal APIs. For example, a service could be a data transformation microservice or a billing API. <br><br> The main attribute of a service is the destination URL for proxying traffic. This URL can be set as a single string or by specifying its protocol, host, port and path individually. <br><br> Services are associated to routes, and a single service can have many routes associated with it. Routes are entrypoints in Kong Gateway which define rules to match client requests. Once a route is matched, Kong Gateway proxies the request to its associated service. See the [Proxy Reference](https://docs.konghq.com/gateway/latest/how-kong-works/routing-traffic/) for a detailed explanation of how Kong proxies traffic. <br><br> Services can be both [tagged and filtered by tags](https://docs.konghq.com/gateway/latest/admin-api/#tags).

func (*Services) CreateService

func (s *Services) CreateService(ctx context.Context, controlPlaneID string, service components.ServiceInput, opts ...operations.Option) (*operations.CreateServiceResponse, error)

CreateService - Create a new Service Create a new Service

func (*Services) DeleteService

func (s *Services) DeleteService(ctx context.Context, controlPlaneID string, serviceID string, opts ...operations.Option) (*operations.DeleteServiceResponse, error)

DeleteService - Delete a Service Delete a Service

func (*Services) GetService

func (s *Services) GetService(ctx context.Context, serviceID string, controlPlaneID string, opts ...operations.Option) (*operations.GetServiceResponse, error)

GetService - Fetch a Service Get a Service using ID or name.

func (*Services) ListService

ListService - List all Services List all Services

func (*Services) UpsertService

UpsertService - Upsert a Service Create or Update Service using ID or name.

type SystemAccounts

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

func (*SystemAccounts) DeleteSystemAccountsID

func (s *SystemAccounts) DeleteSystemAccountsID(ctx context.Context, accountID string, opts ...operations.Option) (*operations.DeleteSystemAccountsIDResponse, error)

DeleteSystemAccountsID - Delete System Account Deletes the specified system account. Returns 404 if the requested account was not found.

func (*SystemAccounts) GetSystemAccounts

GetSystemAccounts - List System Accounts Returns an array of system accounts (SA) in the organization. Returns 400 if any filter parameters are invalid.

func (*SystemAccounts) GetSystemAccountsID

func (s *SystemAccounts) GetSystemAccountsID(ctx context.Context, accountID string, opts ...operations.Option) (*operations.GetSystemAccountsIDResponse, error)

GetSystemAccountsID - Fetch System Account Returns the system account (SA) for the SA ID specified as a path parameter.

func (*SystemAccounts) PatchSystemAccountsID

func (s *SystemAccounts) PatchSystemAccountsID(ctx context.Context, accountID string, updateSystemAccount *components.UpdateSystemAccount, opts ...operations.Option) (*operations.PatchSystemAccountsIDResponse, error)

PatchSystemAccountsID - Update System Account Updates the specified system account. Returns a 409 if the updated name is the same as another system account in the organization.

func (*SystemAccounts) PostSystemAccounts

PostSystemAccounts - Create System Account Creates a system account. Returns a 409 if a system account with the same name already exists.

type SystemAccountsAccessTokens

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

func (*SystemAccountsAccessTokens) DeleteSystemAccountsIDAccessTokensID

func (s *SystemAccountsAccessTokens) DeleteSystemAccountsIDAccessTokensID(ctx context.Context, accountID string, tokenID string, opts ...operations.Option) (*operations.DeleteSystemAccountsIDAccessTokensIDResponse, error)

DeleteSystemAccountsIDAccessTokensID - Delete System Account Access Token Deletes the specified token. Returns 404 if the token was not found.

func (*SystemAccountsAccessTokens) GetSystemAccountIDAccessTokens

GetSystemAccountIDAccessTokens - List System Account Access Tokens Returns the access tokens for the specified system account. Returns 400 if any filter parameters are invalid.

func (*SystemAccountsAccessTokens) GetSystemAccountsIDAccessTokensID

func (s *SystemAccountsAccessTokens) GetSystemAccountsIDAccessTokensID(ctx context.Context, accountID string, tokenID string, opts ...operations.Option) (*operations.GetSystemAccountsIDAccessTokensIDResponse, error)

GetSystemAccountsIDAccessTokensID - Fetch System Account Access Token Returns the system account (SA) access token for the SA Access Token ID specified as a path parameter.

func (*SystemAccountsAccessTokens) PatchSystemAccountsIDAccessTokensID

PatchSystemAccountsIDAccessTokensID - Update System Account Access Token Updates the specified access token. Returns a 409 if the updated name is the same as another token belonging to the specified system user.

func (*SystemAccountsAccessTokens) PostSystemAccountsIDAccessTokens

func (s *SystemAccountsAccessTokens) PostSystemAccountsIDAccessTokens(ctx context.Context, accountID string, createSystemAccountAccessToken *components.CreateSystemAccountAccessToken, opts ...operations.Option) (*operations.PostSystemAccountsIDAccessTokensResponse, error)

PostSystemAccountsIDAccessTokens - Create System Account Access Token Creates an access token for the specified system account (SA). The access token can be used for authenticating API and CLI requests. The token will only be displayed once on creation. Returns a 409 if the system account already has a token with the same name.

type SystemAccountsRoles

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

func (*SystemAccountsRoles) DeleteSystemAccountsAccountIDAssignedRolesRoleID

func (s *SystemAccountsRoles) DeleteSystemAccountsAccountIDAssignedRolesRoleID(ctx context.Context, accountID string, roleID string, opts ...operations.Option) (*operations.DeleteSystemAccountsAccountIDAssignedRolesRoleIDResponse, error)

DeleteSystemAccountsAccountIDAssignedRolesRoleID - Delete Assigned Role from System Account Removes an assigned role from a system account. Returns 404 if the system account or assigned role were not found.

func (*SystemAccountsRoles) GetSystemAccountsAccountIDAssignedRoles

GetSystemAccountsAccountIDAssignedRoles - Fetch Assigned Roles for System Account Lists the roles belonging to a system account. Returns 400 if any filter parameters are invalid.

func (*SystemAccountsRoles) PostSystemAccountsAccountIDAssignedRoles

func (s *SystemAccountsRoles) PostSystemAccountsAccountIDAssignedRoles(ctx context.Context, accountID string, assignRole *components.AssignRole, opts ...operations.Option) (*operations.PostSystemAccountsAccountIDAssignedRolesResponse, error)

PostSystemAccountsAccountIDAssignedRoles - Create Assigned Role for System Account Assigns a role to a system account. Returns 409 if role is already assigned.

type SystemAccountsTeamMembership

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

func (*SystemAccountsTeamMembership) DeleteTeamsTeamIDSystemAccountsAccountID

func (s *SystemAccountsTeamMembership) DeleteTeamsTeamIDSystemAccountsAccountID(ctx context.Context, teamID string, accountID string, opts ...operations.Option) (*operations.DeleteTeamsTeamIDSystemAccountsAccountIDResponse, error)

DeleteTeamsTeamIDSystemAccountsAccountID - Remove System Account From Team Removes a system account from a team. Returns 404 if the team or system account were not found.

func (*SystemAccountsTeamMembership) GetSystemAccountsAccountIDTeams

GetSystemAccountsAccountIDTeams - List Teams for a System Account Returns a paginated list of a teams that the system account belongs to.

func (*SystemAccountsTeamMembership) GetTeamsTeamIDSystemAccounts

GetTeamsTeamIDSystemAccounts - List System Accounts on a Team Returns a paginated list of system accounts that belong to the team specified in the path parameter.

func (*SystemAccountsTeamMembership) PostTeamsTeamIDSystemAccounts

func (s *SystemAccountsTeamMembership) PostTeamsTeamIDSystemAccounts(ctx context.Context, teamID string, addSystemAccountToTeam *components.AddSystemAccountToTeam, opts ...operations.Option) (*operations.PostTeamsTeamIDSystemAccountsResponse, error)

PostTeamsTeamIDSystemAccounts - Add System Account to a Team Adds a system account to a team. Returns a 409 if the system account is already a member of the team.

type Targets

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

func (*Targets) CreateTargetWithUpstream

CreateTargetWithUpstream - Create a new Target associated with an Upstream Create a new Target associated with an Upstream

func (*Targets) DeleteTargetWithUpstream

DeleteTargetWithUpstream - Delete a a Target associated with an Upstream Delete a a Target associated with an Upstream using ID or target.

func (*Targets) GetTargetWithUpstream

GetTargetWithUpstream - Fetch a Target associated with an Upstream Get a Target associated with an Upstream using ID or target.

func (*Targets) ListTargetWithUpstream

ListTargetWithUpstream - List all Targets associated with an Upstream List all Targets associated with an Upstream

func (*Targets) UpsertTargetWithUpstream

UpsertTargetWithUpstream - Upsert a Target associated with an Upstream Create or Update a Target associated with an Upstream using ID or target.

type TeamMembership

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

func (*TeamMembership) AddUserToTeam

func (s *TeamMembership) AddUserToTeam(ctx context.Context, teamID string, addUserToTeam *components.AddUserToTeam, opts ...operations.Option) (*operations.AddUserToTeamResponse, error)

AddUserToTeam - Add User Adds a user to a team.

func (*TeamMembership) ListTeamUsers

ListTeamUsers - List Team Users Returns a paginated list of users that belong to the team specified in the path parameter.

func (*TeamMembership) ListUserTeams

ListUserTeams - List User Teams Returns a paginated list of a teams that the user belongs to.

func (*TeamMembership) RemoveUserFromTeam

func (s *TeamMembership) RemoveUserFromTeam(ctx context.Context, userID string, teamID string, opts ...operations.Option) (*operations.RemoveUserFromTeamResponse, error)

RemoveUserFromTeam - Remove User Removes a user from a team. If the user was removed, returns a 204 empty response. Returns 404 if the user or team were not found.

type Teams

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

func (*Teams) CreateTeam

func (s *Teams) CreateTeam(ctx context.Context, request *components.CreateTeam, opts ...operations.Option) (*operations.CreateTeamResponse, error)

CreateTeam - Create Team Creates a team in the Konnect Organization.

func (*Teams) DeleteTeam

func (s *Teams) DeleteTeam(ctx context.Context, teamID string, opts ...operations.Option) (*operations.DeleteTeamResponse, error)

DeleteTeam - Delete Team Deletes an individual team. Returns 404 if the team is not found.

func (*Teams) GetTeam

func (s *Teams) GetTeam(ctx context.Context, teamID string, opts ...operations.Option) (*operations.GetTeamResponse, error)

GetTeam - Fetch Team Returns information about a team from a given team ID.

func (*Teams) ListTeams

ListTeams - List Teams Returns an array of team objects containing information about the Konnect Teams.

func (*Teams) UpdateTeam

func (s *Teams) UpdateTeam(ctx context.Context, teamID string, updateTeam *components.UpdateTeam, opts ...operations.Option) (*operations.UpdateTeamResponse, error)

UpdateTeam - Update Team Updates an individual team.

type Upstreams

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

Upstreams - The upstream object represents a virtual hostname and can be used to load balance incoming requests over multiple services (targets). <br><br> An upstream also includes a [health checker](https://docs.konghq.com/gateway/latest/how-kong-works/health-checks/), which can enable and disable targets based on their ability or inability to serve requests. The configuration for the health checker is stored in the upstream object, and applies to all of its targets.

func (*Upstreams) CreateUpstream

func (s *Upstreams) CreateUpstream(ctx context.Context, controlPlaneID string, upstream components.UpstreamInput, opts ...operations.Option) (*operations.CreateUpstreamResponse, error)

CreateUpstream - Create a new Upstream Create a new Upstream

func (*Upstreams) DeleteUpstream

func (s *Upstreams) DeleteUpstream(ctx context.Context, controlPlaneID string, upstreamID string, opts ...operations.Option) (*operations.DeleteUpstreamResponse, error)

DeleteUpstream - Delete an Upstream Delete an Upstream

func (*Upstreams) GetUpstream

func (s *Upstreams) GetUpstream(ctx context.Context, upstreamID string, controlPlaneID string, opts ...operations.Option) (*operations.GetUpstreamResponse, error)

GetUpstream - Fetch an Upstream Get an Upstream using ID or name.

func (*Upstreams) ListUpstream

ListUpstream - List all Upstreams List all Upstreams

func (*Upstreams) UpsertUpstream

UpsertUpstream - Upsert a Upstream Create or Update Upstream using ID or name.

type Users

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

func (*Users) DeleteUser

func (s *Users) DeleteUser(ctx context.Context, userID string, opts ...operations.Option) (*operations.DeleteUserResponse, error)

DeleteUser - Delete User Deletes an individual user. Returns 404 if the requested user was not found.

func (*Users) GetUser

func (s *Users) GetUser(ctx context.Context, userID string, opts ...operations.Option) (*operations.GetUserResponse, error)

GetUser - Fetch User Returns the user object for the user ID specified as a path parameter.

func (*Users) ListUsers

ListUsers - List Users Returns a paginated list of user objects.

func (*Users) UpdateUser

func (s *Users) UpdateUser(ctx context.Context, userID string, updateUser *components.UpdateUser, opts ...operations.Option) (*operations.UpdateUserResponse, error)

UpdateUser - Update User Update an individual user.

type Vaults

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

Vaults - Vault objects are used to configure different vault connectors for [managing secrets](https://docs.konghq.com/gateway/latest/kong-enterprise/secrets-management/). Configuring a vault lets you reference secrets from other entities. This allows for a proper separation of secrets and configuration and prevents secret sprawl. <br><br> For example, you could store a certificate and a key in a vault, then reference them from a certificate entity. This way, the certificate and key are not stored in the entity directly and are more secure. <br><br> Secrets rotation can be managed using [TTLs](https://docs.konghq.com/gateway/latest/kong-enterprise/secrets-management/advanced-usage/).

func (*Vaults) CreateVault

func (s *Vaults) CreateVault(ctx context.Context, controlPlaneID string, vault components.VaultInput, opts ...operations.Option) (*operations.CreateVaultResponse, error)

CreateVault - Create a new Vault Create a new Vault

func (*Vaults) DeleteVault

func (s *Vaults) DeleteVault(ctx context.Context, controlPlaneID string, vaultID string, opts ...operations.Option) (*operations.DeleteVaultResponse, error)

DeleteVault - Delete a Vault Delete a Vault

func (*Vaults) GetVault

func (s *Vaults) GetVault(ctx context.Context, vaultID string, controlPlaneID string, opts ...operations.Option) (*operations.GetVaultResponse, error)

GetVault - Fetch a Vault Get a Vault using ID or prefix.

func (*Vaults) ListVault

ListVault - List all Vaults List all Vaults

func (*Vaults) UpsertVault

UpsertVault - Upsert a Vault Create or Update Vault using ID or prefix.

Directories

Path Synopsis
ci
internal
models
pkg
test

Jump to

Keyboard shortcuts

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