konnect

package
v1.28.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package konnect supplies API fixtures for KongCTL ownership and payload tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthServer

func AuthServer(name, namespace string, protected bool) kkComps.AuthServer

func BasicAuth

func BasicAuth(username, namespace string, protected bool) helpers.IdentityBasicAuth

func Directory

func Directory(name, namespace string, protected bool) kkComps.KongDirectory

func Group

func Group(name, namespace string, protected bool) helpers.IdentityGroup

Types

type APIKeyHTTP

type APIKeyHTTP struct {
	Keys     map[string][]helpers.IdentityAPIKey
	Writes   []APIKeyWrite
	PageSize int
	Failure  string
	Before   func(*http.Request)
}

APIKeyHTTP exercises the native SDK while keeping key fixtures scoped by the complete directory/parent route. No request reaches a network transport.

func (*APIKeyHTTP) Do

func (a *APIKeyHTTP) Do(request *http.Request) (*http.Response, error)

func (*APIKeyHTTP) SDK

func (a *APIKeyHTTP) SDK() *helpers.KonnectSDK

type APIKeyWrite

type APIKeyWrite struct {
	Method, Path string
	Body         map[string]any
}

type AuthServerAPI

type AuthServerAPI struct {
	Servers          []kkComps.AuthServer
	Writes           []kkComps.UpdateAuthServer
	Creates, Deletes int
	Force            *kkOps.Force
	List             func(kkOps.ListAuthServersRequest) (*kkOps.ListAuthServersResponse, error)
}

func (*AuthServerAPI) CreateAuthServer

func (*AuthServerAPI) DeleteAuthServer

func (a *AuthServerAPI) DeleteAuthServer(
	_ context.Context, id string, force *kkOps.Force, _ ...kkOps.Option,
) (*kkOps.DeleteAuthServerResponse, error)

func (*AuthServerAPI) GetAuthServer

func (a *AuthServerAPI) GetAuthServer(
	_ context.Context, id string, _ ...kkOps.Option,
) (*kkOps.GetAuthServerResponse, error)

func (*AuthServerAPI) ListAuthServers

func (*AuthServerAPI) UpdateAuthServer

func (a *AuthServerAPI) UpdateAuthServer(
	_ context.Context, id string, request kkComps.UpdateAuthServer, _ ...kkOps.Option,
) (*kkOps.UpdateAuthServerResponse, error)

type AuthServerChildrenAPI

type AuthServerChildrenAPI struct {
	helpers.IdentityAuthServerClientsAPI
	Scopes        map[string][]kkComps.Scope
	Claims        map[string][]kkComps.Claim
	Clients       map[string][]kkComps.Client
	ScopeUpdates  []kkOps.UpdateAuthServerScopeRequest
	ClaimUpdates  []kkOps.UpdateAuthServerClaimRequest
	ClientUpdates []kkOps.UpdateAuthServerClientRequest
	Deleted       []string
	Writes        int
	// contains filtered or unexported fields
}

func (*AuthServerChildrenAPI) CreateAuthServerClaim

func (a *AuthServerChildrenAPI) CreateAuthServerClaim(_ context.Context, parent string,
	request kkComps.CreateClaim, _ ...kkOps.Option,
) (*kkOps.CreateAuthServerClaimResponse, error)

func (*AuthServerChildrenAPI) CreateAuthServerClient

func (a *AuthServerChildrenAPI) CreateAuthServerClient(
	_ context.Context,
	parent string,
	request kkComps.CreateClient,
	_ ...kkOps.Option,
) (*kkOps.CreateAuthServerClientResponse, error)

func (*AuthServerChildrenAPI) CreateAuthServerScope

func (a *AuthServerChildrenAPI) CreateAuthServerScope(_ context.Context, parent string,
	request kkComps.CreateScope, _ ...kkOps.Option,
) (*kkOps.CreateAuthServerScopeResponse, error)

func (*AuthServerChildrenAPI) DeleteAuthServerClaim

func (a *AuthServerChildrenAPI) DeleteAuthServerClaim(_ context.Context, parent, id string, _ ...kkOps.Option) (
	*kkOps.DeleteAuthServerClaimResponse, error,
)

func (*AuthServerChildrenAPI) DeleteAuthServerClient

func (a *AuthServerChildrenAPI) DeleteAuthServerClient(
	_ context.Context,
	parent, id string,
	_ ...kkOps.Option,
) (*kkOps.DeleteAuthServerClientResponse, error)

func (*AuthServerChildrenAPI) DeleteAuthServerScope

func (a *AuthServerChildrenAPI) DeleteAuthServerScope(_ context.Context, parent, id string, _ ...kkOps.Option) (
	*kkOps.DeleteAuthServerScopeResponse, error,
)

func (*AuthServerChildrenAPI) GetAuthServerClaim

func (a *AuthServerChildrenAPI) GetAuthServerClaim(_ context.Context, parent, id string, _ ...kkOps.Option) (
	*kkOps.GetAuthServerClaimResponse, error,
)

func (*AuthServerChildrenAPI) GetAuthServerClient

func (a *AuthServerChildrenAPI) GetAuthServerClient(
	_ context.Context,
	parent, id string,
	_ ...kkOps.Option,
) (*kkOps.GetAuthServerClientResponse, error)

func (*AuthServerChildrenAPI) GetAuthServerScope

func (a *AuthServerChildrenAPI) GetAuthServerScope(_ context.Context, parent, id string, _ ...kkOps.Option) (
	*kkOps.GetAuthServerScopeResponse, error,
)

func (*AuthServerChildrenAPI) ListAuthServerClaims

func (*AuthServerChildrenAPI) ListAuthServerClients

func (*AuthServerChildrenAPI) ListAuthServerScopes

func (*AuthServerChildrenAPI) UpdateAuthServerClaim

func (*AuthServerChildrenAPI) UpdateAuthServerClient

func (*AuthServerChildrenAPI) UpdateAuthServerScope

type BasicAuthAPI

type BasicAuthAPI struct {
	helpers.IdentityPrincipalKeysReader
	Parents          map[string][]helpers.IdentityBasicAuth
	Passwords        map[string][]helpers.IdentityPassword
	Keys             map[string][]string
	Writes           []kkComps.ReplaceBasicAuthBody
	Creates, Deletes int
	Failure          string
}

func (*BasicAuthAPI) ListPasswords

func (*BasicAuthAPI) ListPrincipalKeys

type DirectoryAPI

type DirectoryAPI struct {
	Lifecycle bool
	helpers.IdentityDirectoriesAPI
	Directories                             []kkComps.KongDirectory
	Current                                 kkComps.KongDirectory
	Created                                 kkComps.CreateDirectoryBody
	Replaced                                kkComps.ReplaceDirectoryBody
	Creates, Replaces, Deletes, Gets, Lists int
	Force                                   *kkOps.DeleteDirectoryQueryParamForce
	List                                    func(*kkComps.CursorPageParameters) (*kkOps.ListKongDirectoriesResponse, error)
}

func (*DirectoryAPI) CreateDirectory

func (*DirectoryAPI) DeleteDirectory

func (*DirectoryAPI) GetDirectory

func (*DirectoryAPI) ListKongDirectories

func (*DirectoryAPI) ReplaceDirectory

type DirectoryDependenciesAPI

type DirectoryDependenciesAPI struct {
	Attached string
	Calls    []string
}

DirectoryDependenciesAPI supplies explicitly empty Vault observations by default. Individual tests can attach one collection without a parent cascade.

func (*DirectoryDependenciesAPI) ListTrustedIdps

func (*DirectoryDependenciesAPI) ListVaultKeys

func (*DirectoryDependenciesAPI) ListVaultProviders

type GroupAPI

type GroupAPI struct {
	Directories                          map[string][]helpers.IdentityGroup
	Memberships                          map[string][]kkComps.KongGroupMembershipEntry
	Keys                                 map[string][]string
	Writes                               []kkComps.ReplaceGroupBody
	Creates, Deletes                     int
	MembershipCreates, MembershipDeletes int
	Failure                              string
}

func (*GroupAPI) CreateGroup

func (a *GroupAPI) CreateGroup(_ context.Context, directoryID string, request kkComps.CreateGroupBody,
	_ ...kkOps.Option,
) (*kkOps.CreateGroupResponse, error)

func (*GroupAPI) DeleteGroup

func (a *GroupAPI) DeleteGroup(
	_ context.Context,
	directoryID, id string,
	_ ...kkOps.Option,
) (*kkOps.DeleteGroupResponse, error)

func (*GroupAPI) GetGroup

func (a *GroupAPI) GetGroup(
	_ context.Context,
	directoryID, id string,
	_ ...kkOps.Option,
) (*kkOps.GetGroupResponse, error)

func (*GroupAPI) ListGroupKeys

func (*GroupAPI) ListGroupMembership

func (*GroupAPI) ListGroups

func (a *GroupAPI) ListGroups(
	_ context.Context,
	request kkOps.ListGroupsRequest,
	_ ...kkOps.Option,
) (*kkOps.ListGroupsResponse, error)

func (*GroupAPI) ReplaceGroup

func (a *GroupAPI) ReplaceGroup(_ context.Context, request kkOps.ReplaceGroupRequest,
	_ ...kkOps.Option,
) (*kkOps.ReplaceGroupResponse, error)

type PrincipalAPI

type PrincipalAPI struct {
	Directories  map[string][]kkComps.KongPrincipal
	Writes       []kkComps.ReplacePrincipalBody
	Creates      int
	Deletes      int
	ExposeActive bool
}

PrincipalAPI keeps parent-scoped fixtures and captures full replacement writes.

func (*PrincipalAPI) CreatePrincipal

func (a *PrincipalAPI) CreatePrincipal(
	_ context.Context,
	directoryID string,
	request kkComps.CreatePrincipalBody,
	_ ...kkOps.Option,
) (*kkOps.CreatePrincipalResponse, error)

func (*PrincipalAPI) DeletePrincipal

func (a *PrincipalAPI) DeletePrincipal(
	_ context.Context,
	directoryID, id string,
	_ ...kkOps.Option,
) (*kkOps.DeletePrincipalResponse, error)

func (*PrincipalAPI) GetPrincipal

func (a *PrincipalAPI) GetPrincipal(
	_ context.Context,
	directoryID, id string,
	_ ...kkOps.Option,
) (*kkOps.GetPrincipalResponse, error)

func (*PrincipalAPI) ListPrincipals

func (*PrincipalAPI) ReplacePrincipal

type PrincipalIdentitiesAPI

PrincipalIdentitiesAPI supplies complete child observations for parent tests.

func (*PrincipalIdentitiesAPI) CreateIdentity

func (*PrincipalIdentitiesAPI) DeleteIdentity

func (*PrincipalIdentitiesAPI) GetIdentity

func (*PrincipalIdentitiesAPI) ListIdentities

func (*PrincipalIdentitiesAPI) ReplaceIdentity

type TrustedIDPsAPI

type TrustedIDPsAPI struct {
	DirectoryDependenciesAPI
	Records                                           map[string][]helpers.IdentityTrustedIDP
	Associations                                      func(string, string) []helpers.IdentityPrincipal
	Writes, Creates, Updates, Deletes, Lists, Counter int
}

func (*TrustedIDPsAPI) CreateTrustedIdp

func (a *TrustedIDPsAPI) CreateTrustedIdp(_ context.Context, directory string, request kkComps.CreateTrustedIdpPayload,
	_ ...kkOps.Option,
) (*kkOps.CreateTrustedIdpResponse, error)

func (*TrustedIDPsAPI) DeleteTrustedIdp

func (a *TrustedIDPsAPI) DeleteTrustedIdp(
	_ context.Context,
	directory, id string,
	_ ...kkOps.Option,
) (*kkOps.DeleteTrustedIdpResponse, error)

func (*TrustedIDPsAPI) GetTrustedIdp

func (a *TrustedIDPsAPI) GetTrustedIdp(
	_ context.Context,
	directory, id string,
	_ ...kkOps.Option,
) (*kkOps.GetTrustedIdpResponse, error)

func (*TrustedIDPsAPI) ListTrustedIdps

func (*TrustedIDPsAPI) UpdateTrustedIdp

type VaultKeysAPI

type VaultKeysAPI struct {
	DirectoryDependenciesAPI
	Keys                                     []helpers.IdentityVaultKey
	Writes, Creates, Updates, Deletes, Lists int
	Counter                                  int
}

func (*VaultKeysAPI) CreateVaultKey

func (a *VaultKeysAPI) CreateVaultKey(_ context.Context, directory string, request kkComps.CreateVaultKeyBody,
	_ ...kkOps.Option,
) (*kkOps.CreateVaultKeyResponse, error)

func (*VaultKeysAPI) DeleteVaultKey

func (a *VaultKeysAPI) DeleteVaultKey(_ context.Context, directory, id string, _ ...kkOps.Option,
) (*kkOps.DeleteVaultKeyResponse, error)

func (*VaultKeysAPI) GetVaultKey

func (a *VaultKeysAPI) GetVaultKey(_ context.Context, directory, id string, _ ...kkOps.Option,
) (*kkOps.GetVaultKeyResponse, error)

func (*VaultKeysAPI) ListVaultKeys

func (*VaultKeysAPI) UpdateVaultKey

type VaultProvidersAPI

type VaultProvidersAPI struct {
	Credentials      map[string][]helpers.IdentityVaultProviderCredential
	CredentialWrites int
	DirectoryDependenciesAPI
	Providers                                              []helpers.IdentityVaultProvider
	AttachedCredentials                                    map[string]bool
	Writes, Creates, Updates, Deletes, Lists, SecretWrites int
	Counter                                                int
}

func (*VaultProvidersAPI) CreateVaultProvider

func (a *VaultProvidersAPI) CreateVaultProvider(
	_ context.Context,
	directory string,
	request kkComps.CreateVaultProviderBody,
	_ ...kkOps.Option,
) (*kkOps.CreateVaultProviderResponse, error)

func (*VaultProvidersAPI) DeleteVaultProvider

func (a *VaultProvidersAPI) DeleteVaultProvider(
	_ context.Context,
	directory, id string,
	_ ...kkOps.Option,
) (*kkOps.DeleteVaultProviderResponse, error)

func (*VaultProvidersAPI) GetCredentialProviderTemplate

func (*VaultProvidersAPI) GetVaultProvider

func (a *VaultProvidersAPI) GetVaultProvider(
	_ context.Context,
	directory, id string,
	_ ...kkOps.Option,
) (*kkOps.GetVaultProviderResponse, error)

func (*VaultProvidersAPI) ListVaultProviders

func (*VaultProvidersAPI) UpdateVaultProvider

Jump to

Keyboard shortcuts

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