types

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AllTypes represents all types defined in the package.

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
}

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"
)

Jump to

Keyboard shortcuts

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