Help us shape the future of Go! Take the 2026 Go Developer Survey

types

package
v1.43.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

AllTypes represents all types defined in the package.

View Source
var ErrEmptyCRUDArgs = errors.New("empty CRUD arguments")
View Source
var NewSchemaCache = schema.NewCache

NewSchemaCache creates a new SchemaCache with the given fetcher. Deprecated: Use schema.NewCache instead.

Functions

This section is empty.

Types

type Differ

type Differ interface {
	Deletes(func(crud.Event) error) error
	CreateAndUpdates(func(crud.Event) error) error
}

type DuplicatesDeleter

type DuplicatesDeleter interface {
	// DuplicatesDeletes returns delete events for entities that have duplicates in the current and target state.
	// A duplicate is defined as an entity with the same name but different ID.
	DuplicatesDeletes() ([]crud.Event, error)
}

type Entity

type Entity interface {
	Type() EntityType
	CRUDActions() crud.Actions
	PostProcessActions() crud.Actions
	Differ() Differ
}

func NewEntity

func NewEntity(t EntityType, opts EntityOpts) (Entity, error)

type EntityOpts

type EntityOpts struct {
	CurrentState  *state.KongState
	TargetState   *state.KongState
	KongClient    *kong.Client
	KonnectClient *konnect.Client

	IsKonnect bool

	// SkipSchemaDefaults prevents schema-based default filling for plugins and partials.
	SkipSchemaDefaults bool
}

type EntityType

type EntityType string

EntityType defines a type of entity that is managed by decK.

const (
	// Service identifies a Service in Kong.
	Service EntityType = "service"
	// Route identifies a Route in Kong.
	Route EntityType = "route"
	// Plugin identifies a Plugin in Kong.
	Plugin EntityType = "plugin"

	// Certificate identifies a Certificate in Kong.
	Certificate EntityType = "certificate"
	// SNI identifies a SNI in Kong.
	SNI EntityType = "sni"
	// CACertificate identifies a CACertificate in Kong.
	CACertificate EntityType = "ca-certificate"

	// Upstream identifies a Upstream in Kong.
	Upstream EntityType = "upstream"
	// Target identifies a Target in Kong.
	Target EntityType = "target"

	// Consumer identifies a Consumer in Kong.
	Consumer EntityType = "consumer"
	// ConsumerGroup identifies a ConsumerGroup in Kong.
	ConsumerGroup EntityType = "consumer-group"
	// ConsumerGroupConsumer identifies a ConsumerGroupConsumer in Kong.
	ConsumerGroupConsumer EntityType = "consumer-group-consumer"
	// ConsumerGroupPlugin identifies a ConsumerGroupPlugin in Kong.
	ConsumerGroupPlugin EntityType = "consumer-group-plugin"
	// ACLGroup identifies a ACLGroup in Kong.
	ACLGroup EntityType = "acl-group"
	// BasicAuth identifies a BasicAuth in Kong.
	BasicAuth EntityType = "basic-auth"
	// HMACAuth identifies a HMACAuth in Kong.
	HMACAuth EntityType = "hmac-auth"
	// JWTAuth identifies a JWTAuth in Kong.
	JWTAuth EntityType = "jwt-auth"
	// MTLSAuth identifies a MTLSAuth in Kong.
	MTLSAuth EntityType = "mtls-auth"
	// KeyAuth identifies aKeyAuth in Kong.
	KeyAuth EntityType = "key-auth"
	// OAuth2Cred identifies a OAuth2Cred in Kong.
	OAuth2Cred EntityType = "oauth2-cred" //nolint:gosec

	// RBACRole identifies a RBACRole in Kong Enterprise.
	RBACRole EntityType = "rbac-role"
	// RBACEndpointPermission identifies a RBACEndpointPermission in Kong Enterprise.
	RBACEndpointPermission EntityType = "rbac-endpoint-permission"

	// ServicePackage identifies a ServicePackage in Konnect.
	ServicePackage EntityType = "service-package"
	// ServiceVersion identifies a ServiceVersion in Konnect.
	ServiceVersion EntityType = "service-version"
	// Document identifies a Document in Konnect.
	Document EntityType = "document"

	// Vault identifies a Vault in Kong.
	Vault EntityType = "vault"
	// License identifies a License in Kong Enterprise.
	License EntityType = "license"

	// FilterChain identifies a FilterChain in Kong.
	FilterChain EntityType = "filter-chain"

	DegraphqlRoute EntityType = "degraphql_routes"

	// GraphqlRateLimitingCostDecoration identifies a GraphqlRateLimitingCostDecoration in Kong.
	GraphqlRateLimitingCostDecoration EntityType = "graphql_ratelimiting_cost_decorations"

	// Partial identifies a Partial in Kong.
	Partial EntityType = "partial"

	// Key identifies a Key in Kong.
	Key EntityType = "key"
	// KeySet identifies a KeySet in Kong.
	KeySet EntityType = "key-set"

	// ClonedPluginDefinition identifies a ClonedPluginDefinition in Kong.
	ClonedPluginDefinition EntityType = "cloned-plugin"

	// CustomPluginDefinition identifies a CustomPluginDefinition in Kong.
	CustomPluginDefinition EntityType = "custom-plugin"

	// AIModel identifies an AIModel in Kong.
	AIModel EntityType = "ai-model"
)

type SchemaCache added in v1.23.0

type SchemaCache = schema.Cache

SchemaCache is a thread-safe cache for schemas keyed by identifier. Deprecated: Use schema.Cache instead.

type SchemaFetcher added in v1.23.0

type SchemaFetcher = schema.Fetcher

SchemaFetcher is the function signature for fetching a schema by identifier. Deprecated: Use schema.Fetcher instead.

Jump to

Keyboard shortcuts

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