executor

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIAdapter

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

APIAdapter implements ResourceOperations for APIs

func NewAPIAdapter

func NewAPIAdapter(client *state.Client) *APIAdapter

NewAPIAdapter creates a new API adapter

func (*APIAdapter) Create

func (p *APIAdapter) Create(ctx context.Context, req kkComps.CreateAPIRequest,
	namespace string, _ *ExecutionContext,
) (string, error)

Create creates a new API

func (*APIAdapter) Delete

func (p *APIAdapter) Delete(ctx context.Context, id string, _ *ExecutionContext) error

Delete deletes an API

func (*APIAdapter) GetByID

func (p *APIAdapter) GetByID(ctx context.Context, id string, _ *ExecutionContext) (ResourceInfo, error)

GetByID gets an API by ID

func (*APIAdapter) GetByName

func (p *APIAdapter) GetByName(ctx context.Context, name string) (ResourceInfo, error)

GetByName gets an API by name

func (*APIAdapter) MapCreateFields

func (p *APIAdapter) MapCreateFields(_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	create *kkComps.CreateAPIRequest,
) error

MapCreateFields maps fields to CreateAPIRequest

func (*APIAdapter) MapUpdateFields

func (p *APIAdapter) MapUpdateFields(_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	update *kkComps.UpdateAPIRequest, currentLabels map[string]string,
) error

MapUpdateFields maps fields to UpdateAPIRequest

func (*APIAdapter) RequiredFields

func (p *APIAdapter) RequiredFields() []string

RequiredFields returns the required fields for creation

func (*APIAdapter) ResourceType

func (p *APIAdapter) ResourceType() string

ResourceType returns the resource type name

func (*APIAdapter) SupportsUpdate

func (p *APIAdapter) SupportsUpdate() bool

SupportsUpdate returns true as APIs support updates

func (*APIAdapter) Update

func (p *APIAdapter) Update(ctx context.Context, id string, req kkComps.UpdateAPIRequest,
	namespace string, _ *ExecutionContext,
) (string, error)

Update updates an existing API

type APIDocumentAdapter

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

APIDocumentAdapter implements ResourceOperations for API documents

func NewAPIDocumentAdapter

func NewAPIDocumentAdapter(client *state.Client) *APIDocumentAdapter

NewAPIDocumentAdapter creates a new API document adapter

func (*APIDocumentAdapter) Create

Create creates a new API document

func (*APIDocumentAdapter) Delete

func (a *APIDocumentAdapter) Delete(ctx context.Context, id string, execCtx *ExecutionContext) error

Delete deletes an API document

func (*APIDocumentAdapter) GetByID added in v0.1.2

func (a *APIDocumentAdapter) GetByID(ctx context.Context, id string, execCtx *ExecutionContext) (ResourceInfo, error)

GetByID gets an API document by ID using API context

func (*APIDocumentAdapter) GetByName

GetByName gets an API document by slug

func (*APIDocumentAdapter) MapCreateFields

func (a *APIDocumentAdapter) MapCreateFields(
	_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	create *kkComps.CreateAPIDocumentRequest,
) error

MapCreateFields maps fields to CreateAPIDocumentRequest

func (*APIDocumentAdapter) MapUpdateFields

func (a *APIDocumentAdapter) MapUpdateFields(_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	update *kkComps.APIDocument, _ map[string]string,
) error

MapUpdateFields maps fields to APIDocument

func (*APIDocumentAdapter) RequiredFields

func (a *APIDocumentAdapter) RequiredFields() []string

RequiredFields returns the required fields for creation

func (*APIDocumentAdapter) ResourceType

func (a *APIDocumentAdapter) ResourceType() string

ResourceType returns the resource type name

func (*APIDocumentAdapter) SupportsUpdate

func (a *APIDocumentAdapter) SupportsUpdate() bool

SupportsUpdate returns true as documents support updates

func (*APIDocumentAdapter) Update

func (a *APIDocumentAdapter) Update(ctx context.Context, id string, req kkComps.APIDocument,
	_ string, execCtx *ExecutionContext,
) (string, error)

Update updates an existing API document

type APIDocumentResourceInfo

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

APIDocumentResourceInfo implements ResourceInfo for API documents

func (*APIDocumentResourceInfo) GetID

func (a *APIDocumentResourceInfo) GetID() string

func (*APIDocumentResourceInfo) GetLabels

func (a *APIDocumentResourceInfo) GetLabels() map[string]string

func (*APIDocumentResourceInfo) GetName

func (a *APIDocumentResourceInfo) GetName() string

func (*APIDocumentResourceInfo) GetNormalizedLabels

func (a *APIDocumentResourceInfo) GetNormalizedLabels() map[string]string

type APIImplementationAdapter

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

APIImplementationAdapter implements CreateDeleteOperations for API implementations.

func NewAPIImplementationAdapter

func NewAPIImplementationAdapter(client *state.Client) *APIImplementationAdapter

NewAPIImplementationAdapter creates a new API implementation adapter.

func (*APIImplementationAdapter) Create

Create creates a new API implementation via the state client.

func (*APIImplementationAdapter) Delete

Delete removes an API implementation.

func (*APIImplementationAdapter) GetByID added in v0.1.4

GetByID returns nil because API implementations currently do not expose a fetch-by-ID helper.

func (*APIImplementationAdapter) GetByName

GetByName returns nil because API implementations do not expose a name-based lookup.

func (*APIImplementationAdapter) MapCreateFields

func (a *APIImplementationAdapter) MapCreateFields(
	_ context.Context, _ *ExecutionContext, fields map[string]any, create *kkComps.APIImplementation,
) error

MapCreateFields maps planned change fields into an APIImplementation request payload.

func (*APIImplementationAdapter) MapUpdateFields

MapUpdateFields reports that updates are not supported.

func (*APIImplementationAdapter) RequiredFields

func (a *APIImplementationAdapter) RequiredFields() []string

RequiredFields lists the required fields for creation.

func (*APIImplementationAdapter) ResourceType

func (a *APIImplementationAdapter) ResourceType() string

ResourceType identifies the resource handled by this adapter.

func (*APIImplementationAdapter) SupportsUpdate

func (a *APIImplementationAdapter) SupportsUpdate() bool

SupportsUpdate returns false as API implementations don't support updates.

func (*APIImplementationAdapter) Update

Update is not supported for API implementations.

type APIImplementationResourceInfo

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

APIImplementationResourceInfo implements ResourceInfo for API implementations.

func (*APIImplementationResourceInfo) GetID

func (*APIImplementationResourceInfo) GetLabels

func (a *APIImplementationResourceInfo) GetLabels() map[string]string

func (*APIImplementationResourceInfo) GetName

func (*APIImplementationResourceInfo) GetNormalizedLabels

func (a *APIImplementationResourceInfo) GetNormalizedLabels() map[string]string

type APIPublicationAdapter

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

APIPublicationAdapter implements CreateDeleteOperations for API publications API publications only support create and delete operations, not updates

func NewAPIPublicationAdapter

func NewAPIPublicationAdapter(client *state.Client) *APIPublicationAdapter

NewAPIPublicationAdapter creates a new API publication adapter

func (*APIPublicationAdapter) Create

Create creates a new API publication

func (*APIPublicationAdapter) Delete

func (a *APIPublicationAdapter) Delete(ctx context.Context, id string, execCtx *ExecutionContext) error

Delete deletes an API publication

func (*APIPublicationAdapter) GetByID added in v0.1.4

GetByID gets an API publication by ID

func (*APIPublicationAdapter) GetByName

GetByName gets an API publication by name

func (*APIPublicationAdapter) MapCreateFields

func (a *APIPublicationAdapter) MapCreateFields(
	_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	create *kkComps.APIPublication,
) error

MapCreateFields maps fields to APIPublication

func (*APIPublicationAdapter) MapUpdateFields added in v0.1.4

func (a *APIPublicationAdapter) MapUpdateFields(
	_ context.Context, _ *ExecutionContext, _ map[string]any,
	_ *kkComps.APIPublication, _ map[string]string,
) error

MapUpdateFields maps fields for update operations (not supported for API publications)

func (*APIPublicationAdapter) RequiredFields

func (a *APIPublicationAdapter) RequiredFields() []string

RequiredFields returns the required fields for creation

func (*APIPublicationAdapter) ResourceType

func (a *APIPublicationAdapter) ResourceType() string

ResourceType returns the resource type name

func (*APIPublicationAdapter) SupportsUpdate added in v0.1.4

func (a *APIPublicationAdapter) SupportsUpdate() bool

SupportsUpdate returns false as API publications don't support updates

func (*APIPublicationAdapter) Update added in v0.1.4

Update is not supported for API publications

type APIPublicationResourceInfo

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

APIPublicationResourceInfo implements ResourceInfo for API publications

func (*APIPublicationResourceInfo) GetID

func (*APIPublicationResourceInfo) GetLabels

func (a *APIPublicationResourceInfo) GetLabels() map[string]string

func (*APIPublicationResourceInfo) GetName

func (a *APIPublicationResourceInfo) GetName() string

func (*APIPublicationResourceInfo) GetNormalizedLabels

func (a *APIPublicationResourceInfo) GetNormalizedLabels() map[string]string

type APIResourceInfo

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

APIResourceInfo wraps an API to implement ResourceInfo

func (*APIResourceInfo) GetID

func (a *APIResourceInfo) GetID() string

func (*APIResourceInfo) GetLabels

func (a *APIResourceInfo) GetLabels() map[string]string

func (*APIResourceInfo) GetName

func (a *APIResourceInfo) GetName() string

func (*APIResourceInfo) GetNormalizedLabels

func (a *APIResourceInfo) GetNormalizedLabels() map[string]string

type APIVersionAdapter

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

APIVersionAdapter implements CreateDeleteOperations for API versions API versions only support create and delete operations, not updates

func NewAPIVersionAdapter

func NewAPIVersionAdapter(client *state.Client) *APIVersionAdapter

NewAPIVersionAdapter creates a new API version adapter

func (*APIVersionAdapter) Create

Create creates a new API version

func (*APIVersionAdapter) Delete

func (a *APIVersionAdapter) Delete(ctx context.Context, id string, execCtx *ExecutionContext) error

Delete deletes an API version

func (*APIVersionAdapter) GetByID added in v0.1.4

func (a *APIVersionAdapter) GetByID(
	ctx context.Context, versionID string, execCtx *ExecutionContext,
) (ResourceInfo, error)

GetByID gets an API version by ID

func (*APIVersionAdapter) GetByName

func (a *APIVersionAdapter) GetByName(_ context.Context, _ string) (ResourceInfo, error)

GetByName gets an API version by name

func (*APIVersionAdapter) MapCreateFields

func (a *APIVersionAdapter) MapCreateFields(_ context.Context, _ *ExecutionContext, fields map[string]any,
	create *kkComps.CreateAPIVersionRequest,
) error

MapCreateFields maps fields to CreateAPIVersionRequest

func (*APIVersionAdapter) MapUpdateFields added in v0.1.4

func (a *APIVersionAdapter) MapUpdateFields(_ context.Context, _ *ExecutionContext,
	fields map[string]any, update *kkComps.APIVersion, _ map[string]string,
) error

MapUpdateFields maps fields for update operations

func (*APIVersionAdapter) RequiredFields

func (a *APIVersionAdapter) RequiredFields() []string

RequiredFields returns the required fields for creation

func (*APIVersionAdapter) ResourceType

func (a *APIVersionAdapter) ResourceType() string

ResourceType returns the resource type name

func (*APIVersionAdapter) SupportsUpdate added in v0.1.4

func (a *APIVersionAdapter) SupportsUpdate() bool

SupportsUpdate returns true as API versions now support updates

func (*APIVersionAdapter) Update added in v0.1.4

func (a *APIVersionAdapter) Update(ctx context.Context, id string,
	update kkComps.APIVersion, _ string, execCtx *ExecutionContext,
) (string, error)

Update updates an existing API version

type APIVersionResourceInfo

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

APIVersionResourceInfo implements ResourceInfo for API versions

func NewAPIVersionResourceInfo added in v0.1.4

func NewAPIVersionResourceInfo(version *state.APIVersion) *APIVersionResourceInfo

NewAPIVersionResourceInfo creates a new APIVersionResourceInfo from an APIVersion

func (*APIVersionResourceInfo) GetID

func (a *APIVersionResourceInfo) GetID() string

func (*APIVersionResourceInfo) GetLabels

func (a *APIVersionResourceInfo) GetLabels() map[string]string

func (*APIVersionResourceInfo) GetName

func (a *APIVersionResourceInfo) GetName() string

func (*APIVersionResourceInfo) GetNormalizedLabels

func (a *APIVersionResourceInfo) GetNormalizedLabels() map[string]string

type AppliedChange

type AppliedChange struct {
	ChangeID     string `json:"change_id"`
	ResourceType string `json:"resource_type"`
	ResourceName string `json:"resource_name"`
	ResourceRef  string `json:"resource_ref"`
	Action       string `json:"action"`
	ResourceID   string `json:"resource_id,omitempty"` // ID of created/updated resource
}

AppliedChange represents a successfully applied change

type AuthStrategyAdapter

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

AuthStrategyAdapter implements ResourceOperations for application auth strategies This adapter handles the complexity of union types in the SDK

func NewAuthStrategyAdapter

func NewAuthStrategyAdapter(client *state.Client) *AuthStrategyAdapter

NewAuthStrategyAdapter creates a new auth strategy adapter

func (*AuthStrategyAdapter) Create

Create creates a new auth strategy

func (*AuthStrategyAdapter) Delete

Delete deletes an auth strategy

func (*AuthStrategyAdapter) GetByID added in v0.1.4

GetByID gets an auth strategy by ID

func (*AuthStrategyAdapter) GetByName

func (a *AuthStrategyAdapter) GetByName(ctx context.Context, name string) (ResourceInfo, error)

GetByName gets an auth strategy by name

func (*AuthStrategyAdapter) MapCreateFields

func (a *AuthStrategyAdapter) MapCreateFields(
	_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	create *kkComps.CreateAppAuthStrategyRequest,
) error

MapCreateFields maps fields to the appropriate auth strategy request type Note: This returns any because the SDK uses union types

func (*AuthStrategyAdapter) MapUpdateFields

func (a *AuthStrategyAdapter) MapUpdateFields(
	_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	update *kkComps.UpdateAppAuthStrategyRequest, currentLabels map[string]string,
) error

MapUpdateFields maps fields to UpdateAppAuthStrategyRequest

func (*AuthStrategyAdapter) RequiredFields

func (a *AuthStrategyAdapter) RequiredFields() []string

RequiredFields returns the required fields for creation

func (*AuthStrategyAdapter) ResourceType

func (a *AuthStrategyAdapter) ResourceType() string

ResourceType returns the resource type name

func (*AuthStrategyAdapter) SupportsUpdate

func (a *AuthStrategyAdapter) SupportsUpdate() bool

SupportsUpdate returns true as auth strategies support updates

func (*AuthStrategyAdapter) Update

Update updates an existing auth strategy

type AuthStrategyResourceInfo

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

AuthStrategyResourceInfo wraps an ApplicationAuthStrategy to implement ResourceInfo

func (*AuthStrategyResourceInfo) GetID

func (a *AuthStrategyResourceInfo) GetID() string

func (*AuthStrategyResourceInfo) GetLabels

func (a *AuthStrategyResourceInfo) GetLabels() map[string]string

func (*AuthStrategyResourceInfo) GetName

func (a *AuthStrategyResourceInfo) GetName() string

func (*AuthStrategyResourceInfo) GetNormalizedLabels

func (a *AuthStrategyResourceInfo) GetNormalizedLabels() map[string]string

type BaseCreateDeleteExecutor

type BaseCreateDeleteExecutor[TCreate any] struct {
	// contains filtered or unexported fields
}

BaseCreateDeleteExecutor provides common operations for create/delete only resources

func NewBaseCreateDeleteExecutor

func NewBaseCreateDeleteExecutor[TCreate any](
	ops CreateDeleteOperations[TCreate],
	dryRun bool,
) *BaseCreateDeleteExecutor[TCreate]

NewBaseCreateDeleteExecutor creates a new executor for create/delete only resources

func (*BaseCreateDeleteExecutor[TCreate]) Create

func (b *BaseCreateDeleteExecutor[TCreate]) Create(ctx context.Context, change planner.PlannedChange) (string, error)

Create handles CREATE operations

func (*BaseCreateDeleteExecutor[TCreate]) Delete

func (b *BaseCreateDeleteExecutor[TCreate]) Delete(ctx context.Context, change planner.PlannedChange) error

Delete handles DELETE operations

type BaseExecutor

type BaseExecutor[TCreate any, TUpdate any] struct {
	// contains filtered or unexported fields
}

BaseExecutor provides common CRUD operations

func NewBaseExecutor

func NewBaseExecutor[TCreate any, TUpdate any](
	ops ResourceOperations[TCreate, TUpdate],
	client *state.Client,
	dryRun bool,
) *BaseExecutor[TCreate, TUpdate]

NewBaseExecutor creates a new base executor instance

func (*BaseExecutor[TCreate, TUpdate]) Create

func (b *BaseExecutor[TCreate, TUpdate]) Create(ctx context.Context, change planner.PlannedChange) (string, error)

Create handles CREATE operations for any resource type

func (*BaseExecutor[TCreate, TUpdate]) Delete

func (b *BaseExecutor[TCreate, TUpdate]) Delete(ctx context.Context, change planner.PlannedChange) error

Delete handles DELETE operations for any resource type

func (*BaseExecutor[TCreate, TUpdate]) Update

func (b *BaseExecutor[TCreate, TUpdate]) Update(ctx context.Context, change planner.PlannedChange) (string, error)

Update handles UPDATE operations for any resource type

type BaseSingletonExecutor

type BaseSingletonExecutor[TUpdate any] struct {
	// contains filtered or unexported fields
}

BaseSingletonExecutor provides common operations for singleton resources

func NewBaseSingletonExecutor

func NewBaseSingletonExecutor[TUpdate any](
	ops SingletonOperations[TUpdate],
	dryRun bool,
) *BaseSingletonExecutor[TUpdate]

NewBaseSingletonExecutor creates a new executor for singleton resources

func (*BaseSingletonExecutor[TUpdate]) Update

func (b *BaseSingletonExecutor[TUpdate]) Update(ctx context.Context, change planner.PlannedChange,
	parentID string,
) (string, error)

Update handles both CREATE and UPDATE operations for singleton resources

type CatalogServiceAdapter added in v0.3.6

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

CatalogServiceAdapter implements ResourceOperations for catalog services.

func NewCatalogServiceAdapter added in v0.3.6

func NewCatalogServiceAdapter(client *state.Client) *CatalogServiceAdapter

NewCatalogServiceAdapter creates a new catalog service adapter.

func (*CatalogServiceAdapter) Create added in v0.3.6

Create creates a catalog service.

func (*CatalogServiceAdapter) Delete added in v0.3.6

Delete deletes a catalog service.

func (*CatalogServiceAdapter) GetByID added in v0.3.6

GetByID fetches a catalog service by ID.

func (*CatalogServiceAdapter) GetByName added in v0.3.6

func (a *CatalogServiceAdapter) GetByName(ctx context.Context, name string) (ResourceInfo, error)

GetByName fetches a catalog service by name.

func (*CatalogServiceAdapter) MapCreateFields added in v0.3.6

func (a *CatalogServiceAdapter) MapCreateFields(
	_ context.Context,
	execCtx *ExecutionContext,
	fields map[string]any,
	create *kkComps.CreateCatalogService,
) error

MapCreateFields maps planner fields to CreateCatalogService.

func (*CatalogServiceAdapter) MapUpdateFields added in v0.3.6

func (a *CatalogServiceAdapter) MapUpdateFields(
	_ context.Context,
	execCtx *ExecutionContext,
	fields map[string]any,
	update *kkComps.UpdateCatalogService,
	currentLabels map[string]string,
) error

MapUpdateFields maps planner fields to UpdateCatalogService.

func (*CatalogServiceAdapter) RequiredFields added in v0.3.6

func (a *CatalogServiceAdapter) RequiredFields() []string

RequiredFields returns required fields for create.

func (*CatalogServiceAdapter) ResourceType added in v0.3.6

func (a *CatalogServiceAdapter) ResourceType() string

ResourceType returns the resource type.

func (*CatalogServiceAdapter) SupportsUpdate added in v0.3.6

func (a *CatalogServiceAdapter) SupportsUpdate() bool

SupportsUpdate indicates update support.

func (*CatalogServiceAdapter) Update added in v0.3.6

Update updates a catalog service.

type ConsoleReporter

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

ConsoleReporter provides console output for plan execution progress

func NewConsoleReporter

func NewConsoleReporter(w io.Writer) *ConsoleReporter

NewConsoleReporter creates a new console reporter that writes to the provided writer

func NewConsoleReporterWithOptions

func NewConsoleReporterWithOptions(w io.Writer, dryRun bool) *ConsoleReporter

NewConsoleReporterWithOptions creates a new console reporter with options

func (*ConsoleReporter) CompleteChange

func (r *ConsoleReporter) CompleteChange(change planner.PlannedChange, err error)

CompleteChange is called after a change is executed (success or failure)

func (*ConsoleReporter) FinishExecution

func (r *ConsoleReporter) FinishExecution(result *ExecutionResult)

FinishExecution is called at the end of plan execution

func (*ConsoleReporter) SkipChange

func (r *ConsoleReporter) SkipChange(change planner.PlannedChange, reason string)

SkipChange is called when a change is skipped

func (*ConsoleReporter) StartChange

func (r *ConsoleReporter) StartChange(change planner.PlannedChange)

StartChange is called before executing a change

func (*ConsoleReporter) StartExecution

func (r *ConsoleReporter) StartExecution(plan *planner.Plan)

StartExecution is called at the beginning of plan execution

type ControlPlaneAdapter added in v0.1.6

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

ControlPlaneAdapter implements ResourceOperations for control planes

func NewControlPlaneAdapter added in v0.1.6

func NewControlPlaneAdapter(client *state.Client) *ControlPlaneAdapter

NewControlPlaneAdapter creates a new control plane adapter

func (*ControlPlaneAdapter) Create added in v0.1.6

Create issues a create call via the state client

func (*ControlPlaneAdapter) Delete added in v0.1.6

Delete removes a control plane

func (*ControlPlaneAdapter) GetByID added in v0.1.6

GetByID resolves a control plane by ID

func (*ControlPlaneAdapter) GetByName added in v0.1.6

func (a *ControlPlaneAdapter) GetByName(ctx context.Context, name string) (ResourceInfo, error)

GetByName resolves a control plane by name

func (*ControlPlaneAdapter) MapCreateFields added in v0.1.6

func (a *ControlPlaneAdapter) MapCreateFields(_ context.Context, execCtx *ExecutionContext,
	fields map[string]any, create *kkComps.CreateControlPlaneRequest,
) error

MapCreateFields maps planner fields to CreateControlPlaneRequest

func (*ControlPlaneAdapter) MapUpdateFields added in v0.1.6

func (a *ControlPlaneAdapter) MapUpdateFields(_ context.Context, execCtx *ExecutionContext,
	fields map[string]any, update *kkComps.UpdateControlPlaneRequest, currentLabels map[string]string,
) error

MapUpdateFields maps planner fields to UpdateControlPlaneRequest

func (*ControlPlaneAdapter) RequiredFields added in v0.1.6

func (a *ControlPlaneAdapter) RequiredFields() []string

RequiredFields lists required fields for create

func (*ControlPlaneAdapter) ResourceType added in v0.1.6

func (a *ControlPlaneAdapter) ResourceType() string

ResourceType returns the adapter resource type

func (*ControlPlaneAdapter) SupportsUpdate added in v0.1.6

func (a *ControlPlaneAdapter) SupportsUpdate() bool

SupportsUpdate indicates control planes support updates

func (*ControlPlaneAdapter) Update added in v0.1.6

Update issues an update call via the state client

type ControlPlaneResourceInfo added in v0.1.6

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

ControlPlaneResourceInfo implements ResourceInfo for control planes

func (*ControlPlaneResourceInfo) GetID added in v0.1.6

func (c *ControlPlaneResourceInfo) GetID() string

func (*ControlPlaneResourceInfo) GetLabels added in v0.1.6

func (c *ControlPlaneResourceInfo) GetLabels() map[string]string

func (*ControlPlaneResourceInfo) GetName added in v0.1.6

func (c *ControlPlaneResourceInfo) GetName() string

func (*ControlPlaneResourceInfo) GetNormalizedLabels added in v0.1.6

func (c *ControlPlaneResourceInfo) GetNormalizedLabels() map[string]string

type CreateDeleteOperations

type CreateDeleteOperations[TCreate any] interface {
	// Field mapping
	MapCreateFields(ctx context.Context, execCtx *ExecutionContext, fields map[string]any, create *TCreate) error

	// API calls
	Create(ctx context.Context, req TCreate, namespace string, execCtx *ExecutionContext) (string, error)
	Delete(ctx context.Context, id string, execCtx *ExecutionContext) error
	GetByName(ctx context.Context, name string) (ResourceInfo, error)

	// Resource info
	ResourceType() string
	RequiredFields() []string
}

CreateDeleteOperations defines operations for resources that only support create and delete (no update operation), such as API versions and API publications

type DCRProviderAdapter added in v0.8.0

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

func NewDCRProviderAdapter added in v0.8.0

func NewDCRProviderAdapter(client *state.Client) *DCRProviderAdapter

func (*DCRProviderAdapter) Create added in v0.8.0

func (*DCRProviderAdapter) Delete added in v0.8.0

func (*DCRProviderAdapter) GetByID added in v0.8.0

func (*DCRProviderAdapter) GetByName added in v0.8.0

func (a *DCRProviderAdapter) GetByName(ctx context.Context, name string) (ResourceInfo, error)

func (*DCRProviderAdapter) MapCreateFields added in v0.8.0

func (a *DCRProviderAdapter) MapCreateFields(
	_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	create *kkComps.CreateDcrProviderRequest,
) error

func (*DCRProviderAdapter) MapUpdateFields added in v0.8.0

func (a *DCRProviderAdapter) MapUpdateFields(
	_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	update *kkComps.UpdateDcrProviderRequest, currentLabels map[string]string,
) error

func (*DCRProviderAdapter) RequiredFields added in v0.8.0

func (a *DCRProviderAdapter) RequiredFields() []string

func (*DCRProviderAdapter) ResourceType added in v0.8.0

func (a *DCRProviderAdapter) ResourceType() string

func (*DCRProviderAdapter) SupportsUpdate added in v0.8.0

func (a *DCRProviderAdapter) SupportsUpdate() bool

func (*DCRProviderAdapter) Update added in v0.8.0

type DCRProviderResourceInfo added in v0.8.0

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

func (*DCRProviderResourceInfo) GetID added in v0.8.0

func (d *DCRProviderResourceInfo) GetID() string

func (*DCRProviderResourceInfo) GetLabels added in v0.8.0

func (d *DCRProviderResourceInfo) GetLabels() map[string]string

func (*DCRProviderResourceInfo) GetName added in v0.8.0

func (d *DCRProviderResourceInfo) GetName() string

func (*DCRProviderResourceInfo) GetNormalizedLabels added in v0.8.0

func (d *DCRProviderResourceInfo) GetNormalizedLabels() map[string]string

type EventGatewayBackendClusterAdapter added in v0.3.8

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

EventGatewayBackendClusterAdapter implements ResourceOperations for Event Gateway Backend Clusters

func NewEventGatewayBackendClusterAdapter added in v0.3.8

func NewEventGatewayBackendClusterAdapter(client *state.Client) *EventGatewayBackendClusterAdapter

NewEventGatewayBackendClusterAdapter creates a new adapter for Event Gateway Backend Clusters

func (*EventGatewayBackendClusterAdapter) Create added in v0.3.8

Create creates a new backend cluster

func (*EventGatewayBackendClusterAdapter) Delete added in v0.3.8

Delete deletes a backend cluster

func (*EventGatewayBackendClusterAdapter) GetByID added in v0.3.8

GetByID gets a backend cluster by ID

func (*EventGatewayBackendClusterAdapter) GetByName added in v0.3.8

GetByName is not supported for backend clusters (they are looked up by name within a gateway)

func (*EventGatewayBackendClusterAdapter) MapCreateFields added in v0.3.8

MapCreateFields maps fields to CreateBackendClusterRequest

func (*EventGatewayBackendClusterAdapter) MapUpdateFields added in v0.3.8

MapUpdateFields maps fields to UpdateBackendClusterRequest

func (*EventGatewayBackendClusterAdapter) RequiredFields added in v0.3.8

func (a *EventGatewayBackendClusterAdapter) RequiredFields() []string

RequiredFields returns the list of required fields for this resource

func (*EventGatewayBackendClusterAdapter) ResourceType added in v0.3.8

func (a *EventGatewayBackendClusterAdapter) ResourceType() string

ResourceType returns the resource type string

func (*EventGatewayBackendClusterAdapter) SupportsUpdate added in v0.3.8

func (a *EventGatewayBackendClusterAdapter) SupportsUpdate() bool

SupportsUpdate indicates whether this resource supports update operations

func (*EventGatewayBackendClusterAdapter) Update added in v0.3.8

Update updates an existing backend cluster

type EventGatewayBackendClusterResourceInfo added in v0.3.8

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

EventGatewayBackendClusterResourceInfo wraps an Event Gateway Backend Cluster to implement ResourceInfo

func (*EventGatewayBackendClusterResourceInfo) GetID added in v0.3.8

func (*EventGatewayBackendClusterResourceInfo) GetLabels added in v0.3.8

func (*EventGatewayBackendClusterResourceInfo) GetName added in v0.3.8

func (*EventGatewayBackendClusterResourceInfo) GetNormalizedLabels added in v0.3.8

func (e *EventGatewayBackendClusterResourceInfo) GetNormalizedLabels() map[string]string

type EventGatewayClusterPolicyAdapter added in v0.8.0

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

EventGatewayClusterPolicyAdapter implements ResourceOperations for Event Gateway Cluster Policy resources. Cluster policies are grandchildren: Event Gateway → Virtual Cluster → Cluster Policy. Both the gateway ID and virtual cluster ID are required for all operations.

func NewEventGatewayClusterPolicyAdapter added in v0.8.0

func NewEventGatewayClusterPolicyAdapter(client *state.Client) *EventGatewayClusterPolicyAdapter

NewEventGatewayClusterPolicyAdapter creates a new EventGatewayClusterPolicyAdapter

func (*EventGatewayClusterPolicyAdapter) Create added in v0.8.0

Create creates a new cluster policy

func (*EventGatewayClusterPolicyAdapter) Delete added in v0.8.0

Delete deletes a cluster policy

func (*EventGatewayClusterPolicyAdapter) GetByID added in v0.8.0

GetByID gets a cluster policy by ID

func (*EventGatewayClusterPolicyAdapter) GetByName added in v0.8.0

GetByName is not supported for cluster policies

func (*EventGatewayClusterPolicyAdapter) MapCreateFields added in v0.8.0

MapCreateFields maps fields to EventGatewayClusterPolicyModify (union type). The fields map should contain the full union-typed policy body (serialized from the resource).

func (*EventGatewayClusterPolicyAdapter) MapUpdateFields added in v0.8.0

func (a *EventGatewayClusterPolicyAdapter) MapUpdateFields(
	_ context.Context,
	_ *ExecutionContext,
	fieldsToUpdate map[string]any,
	update *kkComps.EventGatewayClusterPolicyModify,
	_ map[string]string,
) error

MapUpdateFields maps the fields into an EventGatewayClusterPolicyModify (union type).

func (*EventGatewayClusterPolicyAdapter) RequiredFields added in v0.8.0

func (a *EventGatewayClusterPolicyAdapter) RequiredFields() []string

RequiredFields returns the list of required fields for this resource. For union types, the required fields depend on which variant is set, so validation is delegated to the SDK type.

func (*EventGatewayClusterPolicyAdapter) ResourceType added in v0.8.0

func (a *EventGatewayClusterPolicyAdapter) ResourceType() string

ResourceType returns the resource type string

func (*EventGatewayClusterPolicyAdapter) SupportsUpdate added in v0.8.0

func (a *EventGatewayClusterPolicyAdapter) SupportsUpdate() bool

SupportsUpdate indicates whether this resource supports update operations

func (*EventGatewayClusterPolicyAdapter) Update added in v0.8.0

Update updates an existing cluster policy

type EventGatewayClusterPolicyResourceInfo added in v0.8.0

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

EventGatewayClusterPolicyResourceInfo wraps a Cluster Policy to implement ResourceInfo

func (*EventGatewayClusterPolicyResourceInfo) GetID added in v0.8.0

func (*EventGatewayClusterPolicyResourceInfo) GetLabels added in v0.8.0

func (*EventGatewayClusterPolicyResourceInfo) GetName added in v0.8.0

func (*EventGatewayClusterPolicyResourceInfo) GetNormalizedLabels added in v0.8.0

func (e *EventGatewayClusterPolicyResourceInfo) GetNormalizedLabels() map[string]string

type EventGatewayConsumePolicyAdapter added in v0.8.0

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

EventGatewayConsumePolicyAdapter implements ResourceOperations for Event Gateway Consume Policy resources. Consume policies are grandchildren: Event Gateway → Virtual Cluster → Consume Policy. Both the gateway ID and virtual cluster ID are required for all operations.

func NewEventGatewayConsumePolicyAdapter added in v0.8.0

func NewEventGatewayConsumePolicyAdapter(client *state.Client) *EventGatewayConsumePolicyAdapter

NewEventGatewayConsumePolicyAdapter creates a new EventGatewayConsumePolicyAdapter

func (*EventGatewayConsumePolicyAdapter) Create added in v0.8.0

Create creates a new consume policy

func (*EventGatewayConsumePolicyAdapter) Delete added in v0.8.0

Delete deletes a consume policy

func (*EventGatewayConsumePolicyAdapter) GetByID added in v0.8.0

GetByID gets a consume policy by ID

func (*EventGatewayConsumePolicyAdapter) GetByName added in v0.8.0

GetByName is not supported for consume policies

func (*EventGatewayConsumePolicyAdapter) MapCreateFields added in v0.8.0

MapCreateFields maps fields to EventGatewayConsumePolicyCreate (union type). The fields map should contain the full union-typed policy body (serialized from the resource).

func (*EventGatewayConsumePolicyAdapter) MapUpdateFields added in v0.8.0

func (a *EventGatewayConsumePolicyAdapter) MapUpdateFields(
	_ context.Context,
	_ *ExecutionContext,
	fieldsToUpdate map[string]any,
	update *kkComps.EventGatewayConsumePolicyUpdate,
	_ map[string]string,
) error

MapUpdateFields maps the fields into an EventGatewayConsumePolicyUpdate (union type). The update type has the same discriminator as the create type but may use different struct names.

func (*EventGatewayConsumePolicyAdapter) RequiredFields added in v0.8.0

func (a *EventGatewayConsumePolicyAdapter) RequiredFields() []string

RequiredFields returns the list of required fields for this resource. For union types, the required fields depend on which variant is set, so validation is delegated to the SDK type.

func (*EventGatewayConsumePolicyAdapter) ResourceType added in v0.8.0

func (a *EventGatewayConsumePolicyAdapter) ResourceType() string

ResourceType returns the resource type string

func (*EventGatewayConsumePolicyAdapter) SupportsUpdate added in v0.8.0

func (a *EventGatewayConsumePolicyAdapter) SupportsUpdate() bool

SupportsUpdate indicates whether this resource supports update operations

func (*EventGatewayConsumePolicyAdapter) Update added in v0.8.0

Update updates an existing consume policy

type EventGatewayConsumePolicyResourceInfo added in v0.8.0

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

EventGatewayConsumePolicyResourceInfo wraps a Consume Policy to implement ResourceInfo

func (*EventGatewayConsumePolicyResourceInfo) GetID added in v0.8.0

func (*EventGatewayConsumePolicyResourceInfo) GetLabels added in v0.8.0

func (*EventGatewayConsumePolicyResourceInfo) GetName added in v0.8.0

func (*EventGatewayConsumePolicyResourceInfo) GetNormalizedLabels added in v0.8.0

func (e *EventGatewayConsumePolicyResourceInfo) GetNormalizedLabels() map[string]string

type EventGatewayControlPlaneControlPlaneAdapter added in v0.3.7

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

func NewEventGatewayControlPlaneControlPlaneAdapter added in v0.3.7

func NewEventGatewayControlPlaneControlPlaneAdapter(client *state.Client) *EventGatewayControlPlaneControlPlaneAdapter

func (*EventGatewayControlPlaneControlPlaneAdapter) Create added in v0.3.7

func (*EventGatewayControlPlaneControlPlaneAdapter) Delete added in v0.3.7

func (*EventGatewayControlPlaneControlPlaneAdapter) GetByID added in v0.3.7

GetByID gets a event_gateway by ID

func (*EventGatewayControlPlaneControlPlaneAdapter) GetByName added in v0.3.7

GetByName gets a event_gateway by name

func (*EventGatewayControlPlaneControlPlaneAdapter) MapCreateFields added in v0.3.7

func (*EventGatewayControlPlaneControlPlaneAdapter) MapUpdateFields added in v0.3.7

func (a *EventGatewayControlPlaneControlPlaneAdapter) MapUpdateFields(
	_ context.Context, execCtx *ExecutionContext,
	fields map[string]any, update *components.UpdateGatewayRequest,
	currentLabels map[string]string,
) error

func (*EventGatewayControlPlaneControlPlaneAdapter) RequiredFields added in v0.3.7

func (*EventGatewayControlPlaneControlPlaneAdapter) ResourceType added in v0.3.7

func (*EventGatewayControlPlaneControlPlaneAdapter) SupportsUpdate added in v0.3.7

func (*EventGatewayControlPlaneControlPlaneAdapter) Update added in v0.3.7

type EventGatewayControlPlaneResourceInfo added in v0.3.7

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

EventGatewayControlPlaneResourceInfo wraps an Event Gateway Control Plane to implement ResourceInfo

func (*EventGatewayControlPlaneResourceInfo) GetID added in v0.3.7

func (*EventGatewayControlPlaneResourceInfo) GetLabels added in v0.3.7

func (*EventGatewayControlPlaneResourceInfo) GetName added in v0.3.7

func (*EventGatewayControlPlaneResourceInfo) GetNormalizedLabels added in v0.3.7

func (e *EventGatewayControlPlaneResourceInfo) GetNormalizedLabels() map[string]string

type EventGatewayDataPlaneCertificateAdapter added in v0.6.0

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

EventGatewayDataPlaneCertificateAdapter implements ResourceOperations for Event Gateway Data Plane Certificate resources

func NewEventGatewayDataPlaneCertificateAdapter added in v0.6.0

func NewEventGatewayDataPlaneCertificateAdapter(client *state.Client) *EventGatewayDataPlaneCertificateAdapter

NewEventGatewayDataPlaneCertificateAdapter creates a new EventGatewayDataPlaneCertificateAdapter

func (*EventGatewayDataPlaneCertificateAdapter) Create added in v0.6.0

Create creates a new data plane certificate

func (*EventGatewayDataPlaneCertificateAdapter) Delete added in v0.6.0

Delete deletes a data plane certificate

func (*EventGatewayDataPlaneCertificateAdapter) GetByID added in v0.6.0

GetByID gets a data plane certificate by ID

func (*EventGatewayDataPlaneCertificateAdapter) GetByName added in v0.6.0

GetByName is not supported for data plane certificates (they are looked up by name within a gateway)

func (*EventGatewayDataPlaneCertificateAdapter) MapCreateFields added in v0.6.0

MapCreateFields maps fields to CreateEventGatewayDataPlaneCertificateRequest

func (*EventGatewayDataPlaneCertificateAdapter) MapUpdateFields added in v0.6.0

MapUpdateFields maps the fields to update into an UpdateEventGatewayDataPlaneCertificateRequest

func (*EventGatewayDataPlaneCertificateAdapter) RequiredFields added in v0.6.0

func (a *EventGatewayDataPlaneCertificateAdapter) RequiredFields() []string

RequiredFields returns the list of required fields for this resource

func (*EventGatewayDataPlaneCertificateAdapter) ResourceType added in v0.6.0

ResourceType returns the resource type string

func (*EventGatewayDataPlaneCertificateAdapter) SupportsUpdate added in v0.6.0

func (a *EventGatewayDataPlaneCertificateAdapter) SupportsUpdate() bool

SupportsUpdate indicates whether this resource supports update operations

func (*EventGatewayDataPlaneCertificateAdapter) Update added in v0.6.0

Update updates an existing data plane certificate

type EventGatewayDataPlaneCertificateResourceInfo added in v0.6.0

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

EventGatewayDataPlaneCertificateResourceInfo wraps an Event Gateway Data Plane Certificate to implement ResourceInfo

func (*EventGatewayDataPlaneCertificateResourceInfo) GetID added in v0.6.0

func (*EventGatewayDataPlaneCertificateResourceInfo) GetLabels added in v0.6.0

func (*EventGatewayDataPlaneCertificateResourceInfo) GetName added in v0.6.0

func (*EventGatewayDataPlaneCertificateResourceInfo) GetNormalizedLabels added in v0.6.0

func (e *EventGatewayDataPlaneCertificateResourceInfo) GetNormalizedLabels() map[string]string

type EventGatewayListenerAdapter added in v0.5.0

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

EventGatewayListenerAdapter implements ResourceOperations for Event Gateway Listener resources

func NewEventGatewayListenerAdapter added in v0.5.0

func NewEventGatewayListenerAdapter(client *state.Client) *EventGatewayListenerAdapter

NewEventGatewayListenerAdapter creates a new EventGatewayListenerAdapter

func (*EventGatewayListenerAdapter) Create added in v0.5.0

Create creates a new listener

func (*EventGatewayListenerAdapter) Delete added in v0.5.0

func (a *EventGatewayListenerAdapter) Delete(
	ctx context.Context,
	id string,
	execCtx *ExecutionContext,
) error

Delete deletes a listener

func (*EventGatewayListenerAdapter) GetByID added in v0.5.0

GetByID gets a listener by ID

func (*EventGatewayListenerAdapter) GetByName added in v0.5.0

GetByName is not supported for listeners (they are looked up by name within a gateway)

func (*EventGatewayListenerAdapter) MapCreateFields added in v0.5.0

MapCreateFields maps fields to CreateEventGatewayListenerRequest

func (*EventGatewayListenerAdapter) MapUpdateFields added in v0.5.0

func (a *EventGatewayListenerAdapter) MapUpdateFields(
	_ context.Context,
	_ *ExecutionContext,
	fieldsToUpdate map[string]any,
	update *kkComps.UpdateEventGatewayListenerRequest,
	_ map[string]string,
) error

MapUpdateFields maps the fields to update into an UpdateEventGatewayListenerRequest

func (*EventGatewayListenerAdapter) RequiredFields added in v0.5.0

func (a *EventGatewayListenerAdapter) RequiredFields() []string

RequiredFields returns the list of required fields for this resource

func (*EventGatewayListenerAdapter) ResourceType added in v0.5.0

func (a *EventGatewayListenerAdapter) ResourceType() string

ResourceType returns the resource type string

func (*EventGatewayListenerAdapter) SupportsUpdate added in v0.5.0

func (a *EventGatewayListenerAdapter) SupportsUpdate() bool

SupportsUpdate indicates whether this resource supports update operations

func (*EventGatewayListenerAdapter) Update added in v0.5.0

Update updates an existing listener

type EventGatewayListenerPolicyAdapter added in v0.5.0

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

EventGatewayListenerPolicyAdapter implements ResourceOperations for Event Gateway Listener Policy resources. Listener policies are grandchildren: Event Gateway → Listener → Listener Policy. Both the gateway ID and listener ID are required for all operations.

func NewEventGatewayListenerPolicyAdapter added in v0.5.0

func NewEventGatewayListenerPolicyAdapter(client *state.Client) *EventGatewayListenerPolicyAdapter

NewEventGatewayListenerPolicyAdapter creates a new EventGatewayListenerPolicyAdapter

func (*EventGatewayListenerPolicyAdapter) Create added in v0.5.0

Create creates a new listener policy

func (*EventGatewayListenerPolicyAdapter) Delete added in v0.5.0

Delete deletes a listener policy

func (*EventGatewayListenerPolicyAdapter) GetByID added in v0.5.0

GetByID gets a listener policy by ID

func (*EventGatewayListenerPolicyAdapter) GetByName added in v0.5.0

GetByName is not supported for listener policies

func (*EventGatewayListenerPolicyAdapter) MapCreateFields added in v0.5.0

MapCreateFields maps fields to EventGatewayListenerPolicyCreate (union type). The fields map should contain the full union-typed policy body (serialized from the resource).

func (*EventGatewayListenerPolicyAdapter) MapUpdateFields added in v0.5.0

func (a *EventGatewayListenerPolicyAdapter) MapUpdateFields(
	_ context.Context,
	execCtx *ExecutionContext,
	fieldsToUpdate map[string]any,
	update *kkComps.EventGatewayListenerPolicyUpdate,
	_ map[string]string,
) error

MapUpdateFields maps the fields into an EventGatewayListenerPolicyUpdate (union type). The update type uses SensitiveDataAware variants where applicable.

func (*EventGatewayListenerPolicyAdapter) RequiredFields added in v0.5.0

func (a *EventGatewayListenerPolicyAdapter) RequiredFields() []string

RequiredFields returns the list of required fields for this resource. For union types, the required fields depend on which variant is set, so validation is delegated to the SDK type.

func (*EventGatewayListenerPolicyAdapter) ResourceType added in v0.5.0

func (a *EventGatewayListenerPolicyAdapter) ResourceType() string

ResourceType returns the resource type string

func (*EventGatewayListenerPolicyAdapter) SupportsUpdate added in v0.5.0

func (a *EventGatewayListenerPolicyAdapter) SupportsUpdate() bool

SupportsUpdate indicates whether this resource supports update operations

func (*EventGatewayListenerPolicyAdapter) Update added in v0.5.0

Update updates an existing listener policy

type EventGatewayListenerPolicyResourceInfo added in v0.5.0

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

EventGatewayListenerPolicyResourceInfo wraps a Listener Policy to implement ResourceInfo

func (*EventGatewayListenerPolicyResourceInfo) GetID added in v0.5.0

func (*EventGatewayListenerPolicyResourceInfo) GetLabels added in v0.5.0

func (*EventGatewayListenerPolicyResourceInfo) GetName added in v0.5.0

func (*EventGatewayListenerPolicyResourceInfo) GetNormalizedLabels added in v0.5.0

func (e *EventGatewayListenerPolicyResourceInfo) GetNormalizedLabels() map[string]string

type EventGatewayListenerResourceInfo added in v0.5.0

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

EventGatewayListenerResourceInfo wraps an Event Gateway Listener to implement ResourceInfo

func (*EventGatewayListenerResourceInfo) GetID added in v0.5.0

func (*EventGatewayListenerResourceInfo) GetLabels added in v0.5.0

func (e *EventGatewayListenerResourceInfo) GetLabels() map[string]string

func (*EventGatewayListenerResourceInfo) GetName added in v0.5.0

func (*EventGatewayListenerResourceInfo) GetNormalizedLabels added in v0.5.0

func (e *EventGatewayListenerResourceInfo) GetNormalizedLabels() map[string]string

type EventGatewayProducePolicyAdapter added in v0.8.0

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

EventGatewayProducePolicyAdapter implements ResourceOperations for Event Gateway Produce Policy resources. Produce policies are grandchildren: Event Gateway → Virtual Cluster → Produce Policy. Both the gateway ID and virtual cluster ID are required for all operations.

func NewEventGatewayProducePolicyAdapter added in v0.8.0

func NewEventGatewayProducePolicyAdapter(client *state.Client) *EventGatewayProducePolicyAdapter

NewEventGatewayProducePolicyAdapter creates a new EventGatewayProducePolicyAdapter.

func (*EventGatewayProducePolicyAdapter) Create added in v0.8.0

Create creates a new produce policy.

func (*EventGatewayProducePolicyAdapter) Delete added in v0.8.0

Delete deletes a produce policy.

func (*EventGatewayProducePolicyAdapter) GetByID added in v0.8.0

GetByID gets a produce policy by ID.

func (*EventGatewayProducePolicyAdapter) GetByName added in v0.8.0

GetByName is not supported for produce policies (API does not support name filtering).

func (*EventGatewayProducePolicyAdapter) MapCreateFields added in v0.8.0

MapCreateFields maps the planner fields into EventGatewayProducePolicyCreate. The fields map contains the full union-typed policy body; the SDK union type handles discriminating on the "type" field.

func (*EventGatewayProducePolicyAdapter) MapUpdateFields added in v0.8.0

func (a *EventGatewayProducePolicyAdapter) MapUpdateFields(
	_ context.Context,
	_ *ExecutionContext,
	fieldsToUpdate map[string]any,
	update *kkComps.EventGatewayProducePolicyUpdate,
	_ map[string]string,
) error

MapUpdateFields maps the planner fields into EventGatewayProducePolicyUpdate.

func (*EventGatewayProducePolicyAdapter) RequiredFields added in v0.8.0

func (a *EventGatewayProducePolicyAdapter) RequiredFields() []string

RequiredFields returns the required fields (validation is handled by the SDK union type).

func (*EventGatewayProducePolicyAdapter) ResourceType added in v0.8.0

func (a *EventGatewayProducePolicyAdapter) ResourceType() string

ResourceType returns the resource type string.

func (*EventGatewayProducePolicyAdapter) SupportsUpdate added in v0.8.0

func (a *EventGatewayProducePolicyAdapter) SupportsUpdate() bool

SupportsUpdate indicates whether this resource supports update operations.

func (*EventGatewayProducePolicyAdapter) Update added in v0.8.0

Update updates an existing produce policy.

type EventGatewayProducePolicyResourceInfo added in v0.8.0

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

EventGatewayProducePolicyResourceInfo wraps a ProducePolicyInfo to implement ResourceInfo.

func (*EventGatewayProducePolicyResourceInfo) GetID added in v0.8.0

func (*EventGatewayProducePolicyResourceInfo) GetLabels added in v0.8.0

func (*EventGatewayProducePolicyResourceInfo) GetName added in v0.8.0

func (*EventGatewayProducePolicyResourceInfo) GetNormalizedLabels added in v0.8.0

func (e *EventGatewayProducePolicyResourceInfo) GetNormalizedLabels() map[string]string

type EventGatewaySchemaRegistryAdapter added in v0.8.0

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

EventGatewaySchemaRegistryAdapter implements ResourceOperations for Event Gateway Schema Registries.

func NewEventGatewaySchemaRegistryAdapter added in v0.8.0

func NewEventGatewaySchemaRegistryAdapter(client *state.Client) *EventGatewaySchemaRegistryAdapter

NewEventGatewaySchemaRegistryAdapter creates a new adapter for Event Gateway Schema Registries.

func (*EventGatewaySchemaRegistryAdapter) Create added in v0.8.0

Create creates a new schema registry.

func (*EventGatewaySchemaRegistryAdapter) Delete added in v0.8.0

Delete deletes a schema registry.

func (*EventGatewaySchemaRegistryAdapter) GetByID added in v0.8.0

GetByID gets a schema registry by ID.

func (*EventGatewaySchemaRegistryAdapter) GetByName added in v0.8.0

GetByName is not directly supported; schema registries are identified by name via list.

func (*EventGatewaySchemaRegistryAdapter) MapCreateFields added in v0.8.0

MapCreateFields maps plan fields to a SchemaRegistryCreate request.

func (*EventGatewaySchemaRegistryAdapter) MapUpdateFields added in v0.8.0

MapUpdateFields maps plan fields to a SchemaRegistryUpdate request.

func (*EventGatewaySchemaRegistryAdapter) RequiredFields added in v0.8.0

func (a *EventGatewaySchemaRegistryAdapter) RequiredFields() []string

RequiredFields returns the list of required fields for this resource.

func (*EventGatewaySchemaRegistryAdapter) ResourceType added in v0.8.0

func (a *EventGatewaySchemaRegistryAdapter) ResourceType() string

ResourceType returns the resource type string.

func (*EventGatewaySchemaRegistryAdapter) SupportsUpdate added in v0.8.0

func (a *EventGatewaySchemaRegistryAdapter) SupportsUpdate() bool

SupportsUpdate indicates whether this resource supports update operations.

func (*EventGatewaySchemaRegistryAdapter) Update added in v0.8.0

Update updates an existing schema registry.

type EventGatewaySchemaRegistryResourceInfo added in v0.8.0

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

EventGatewaySchemaRegistryResourceInfo wraps an Event Gateway Schema Registry to implement ResourceInfo.

func (*EventGatewaySchemaRegistryResourceInfo) GetID added in v0.8.0

func (*EventGatewaySchemaRegistryResourceInfo) GetLabels added in v0.8.0

func (*EventGatewaySchemaRegistryResourceInfo) GetName added in v0.8.0

func (*EventGatewaySchemaRegistryResourceInfo) GetNormalizedLabels added in v0.8.0

func (e *EventGatewaySchemaRegistryResourceInfo) GetNormalizedLabels() map[string]string

type EventGatewayStaticKeyAdapter added in v0.8.0

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

EventGatewayStaticKeyAdapter implements ResourceOperations for Event Gateway Static Key resources. Static keys do not support update operations – use delete + create instead.

func NewEventGatewayStaticKeyAdapter added in v0.8.0

func NewEventGatewayStaticKeyAdapter(client *state.Client) *EventGatewayStaticKeyAdapter

NewEventGatewayStaticKeyAdapter creates a new EventGatewayStaticKeyAdapter.

func (*EventGatewayStaticKeyAdapter) Create added in v0.8.0

Create creates a new static key.

func (*EventGatewayStaticKeyAdapter) Delete added in v0.8.0

func (a *EventGatewayStaticKeyAdapter) Delete(
	ctx context.Context,
	id string,
	execCtx *ExecutionContext,
) error

Delete deletes a static key.

func (*EventGatewayStaticKeyAdapter) GetByID added in v0.8.0

GetByID retrieves a static key by ID.

func (*EventGatewayStaticKeyAdapter) GetByName added in v0.8.0

GetByName is not supported for static keys (no direct name-based lookup).

func (*EventGatewayStaticKeyAdapter) MapCreateFields added in v0.8.0

MapCreateFields maps fields to EventGatewayStaticKeyCreate.

func (*EventGatewayStaticKeyAdapter) MapUpdateFields added in v0.8.0

MapUpdateFields is not supported for static keys.

func (*EventGatewayStaticKeyAdapter) RequiredFields added in v0.8.0

func (a *EventGatewayStaticKeyAdapter) RequiredFields() []string

RequiredFields returns the list of required fields for this resource.

func (*EventGatewayStaticKeyAdapter) ResourceType added in v0.8.0

func (a *EventGatewayStaticKeyAdapter) ResourceType() string

ResourceType returns the resource type string.

func (*EventGatewayStaticKeyAdapter) SupportsUpdate added in v0.8.0

func (a *EventGatewayStaticKeyAdapter) SupportsUpdate() bool

SupportsUpdate returns false – static keys must be deleted and re-created on change.

func (*EventGatewayStaticKeyAdapter) Update added in v0.8.0

Update is not supported for static keys.

type EventGatewayStaticKeyResourceInfo added in v0.8.0

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

EventGatewayStaticKeyResourceInfo wraps an Event Gateway Static Key to implement ResourceInfo.

func (*EventGatewayStaticKeyResourceInfo) GetID added in v0.8.0

func (*EventGatewayStaticKeyResourceInfo) GetLabels added in v0.8.0

func (e *EventGatewayStaticKeyResourceInfo) GetLabels() map[string]string

func (*EventGatewayStaticKeyResourceInfo) GetName added in v0.8.0

func (*EventGatewayStaticKeyResourceInfo) GetNormalizedLabels added in v0.8.0

func (e *EventGatewayStaticKeyResourceInfo) GetNormalizedLabels() map[string]string

type EventGatewayTLSTrustBundleAdapter added in v0.8.0

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

EventGatewayTLSTrustBundleAdapter implements ResourceOperations for Event Gateway TLS Trust Bundle resources. TLS trust bundles support update operations.

func NewEventGatewayTLSTrustBundleAdapter added in v0.8.0

func NewEventGatewayTLSTrustBundleAdapter(client *state.Client) *EventGatewayTLSTrustBundleAdapter

NewEventGatewayTLSTrustBundleAdapter creates a new EventGatewayTLSTrustBundleAdapter.

func (*EventGatewayTLSTrustBundleAdapter) Create added in v0.8.0

Create creates a new TLS trust bundle.

func (*EventGatewayTLSTrustBundleAdapter) Delete added in v0.8.0

Delete deletes a TLS trust bundle.

func (*EventGatewayTLSTrustBundleAdapter) GetByID added in v0.8.0

GetByID retrieves a TLS trust bundle by ID.

func (*EventGatewayTLSTrustBundleAdapter) GetByName added in v0.8.0

GetByName is not supported for TLS trust bundles (no direct name-based lookup).

func (*EventGatewayTLSTrustBundleAdapter) MapCreateFields added in v0.8.0

MapCreateFields maps fields to CreateTLSTrustBundleRequest.

func (*EventGatewayTLSTrustBundleAdapter) MapUpdateFields added in v0.8.0

MapUpdateFields maps fields to UpdateTLSTrustBundleRequest.

func (*EventGatewayTLSTrustBundleAdapter) RequiredFields added in v0.8.0

func (a *EventGatewayTLSTrustBundleAdapter) RequiredFields() []string

RequiredFields returns the list of required fields for this resource.

func (*EventGatewayTLSTrustBundleAdapter) ResourceType added in v0.8.0

func (a *EventGatewayTLSTrustBundleAdapter) ResourceType() string

ResourceType returns the resource type string.

func (*EventGatewayTLSTrustBundleAdapter) SupportsUpdate added in v0.8.0

func (a *EventGatewayTLSTrustBundleAdapter) SupportsUpdate() bool

SupportsUpdate returns true – TLS trust bundles support update operations.

func (*EventGatewayTLSTrustBundleAdapter) Update added in v0.8.0

Update updates an existing TLS trust bundle.

type EventGatewayTLSTrustBundleResourceInfo added in v0.8.0

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

EventGatewayTLSTrustBundleResourceInfo wraps an Event Gateway TLS Trust Bundle to implement ResourceInfo.

func (*EventGatewayTLSTrustBundleResourceInfo) GetID added in v0.8.0

func (*EventGatewayTLSTrustBundleResourceInfo) GetLabels added in v0.8.0

func (*EventGatewayTLSTrustBundleResourceInfo) GetName added in v0.8.0

func (*EventGatewayTLSTrustBundleResourceInfo) GetNormalizedLabels added in v0.8.0

func (e *EventGatewayTLSTrustBundleResourceInfo) GetNormalizedLabels() map[string]string

type EventGatewayVirtualClusterAdapter added in v0.4.0

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

EventGatewayVirtualClusterAdapter implements ResourceOperations for Event Gateway Virtual Cluster resources

func NewEventGatewayVirtualClusterAdapter added in v0.4.0

func NewEventGatewayVirtualClusterAdapter(client *state.Client) *EventGatewayVirtualClusterAdapter

NewEventGatewayVirtualClusterAdapter creates a new EventGatewayVirtualClusterAdapter

func (*EventGatewayVirtualClusterAdapter) Create added in v0.4.0

Create creates a new virtual cluster

func (*EventGatewayVirtualClusterAdapter) Delete added in v0.4.0

Delete deletes a virtual cluster

func (*EventGatewayVirtualClusterAdapter) GetByID added in v0.4.0

GetByID gets a virtual cluster by ID

func (*EventGatewayVirtualClusterAdapter) GetByName added in v0.4.0

GetByName is not supported for virtual clusters (they are looked up by name within a gateway)

func (*EventGatewayVirtualClusterAdapter) MapCreateFields added in v0.4.0

MapCreateFields maps fields to CreateVirtualClusterRequest

func (*EventGatewayVirtualClusterAdapter) MapUpdateFields added in v0.4.0

func (a *EventGatewayVirtualClusterAdapter) MapUpdateFields(
	_ context.Context,
	execCtx *ExecutionContext,
	fieldsToUpdate map[string]any,
	update *kkComps.UpdateVirtualClusterRequest,
	_ map[string]string,
) error

MapUpdateFields maps the fields to update into an UpdateVirtualClusterRequest

func (*EventGatewayVirtualClusterAdapter) RequiredFields added in v0.4.0

func (a *EventGatewayVirtualClusterAdapter) RequiredFields() []string

RequiredFields returns the list of required fields for this resource

func (*EventGatewayVirtualClusterAdapter) ResourceType added in v0.4.0

func (a *EventGatewayVirtualClusterAdapter) ResourceType() string

ResourceType returns the resource type string

func (*EventGatewayVirtualClusterAdapter) SupportsUpdate added in v0.4.0

func (a *EventGatewayVirtualClusterAdapter) SupportsUpdate() bool

SupportsUpdate indicates whether this resource supports update operations

func (*EventGatewayVirtualClusterAdapter) Update added in v0.4.0

Update updates an existing virtual cluster

type EventGatewayVirtualClusterResourceInfo added in v0.4.0

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

EventGatewayVirtualClusterResourceInfo wraps an Event Gateway Virtual Cluster to implement ResourceInfo

func (*EventGatewayVirtualClusterResourceInfo) GetID added in v0.4.0

func (*EventGatewayVirtualClusterResourceInfo) GetLabels added in v0.4.0

func (*EventGatewayVirtualClusterResourceInfo) GetName added in v0.4.0

func (*EventGatewayVirtualClusterResourceInfo) GetNormalizedLabels added in v0.4.0

func (e *EventGatewayVirtualClusterResourceInfo) GetNormalizedLabels() map[string]string

type ExecutionContext added in v0.1.3

type ExecutionContext struct {
	// Namespace is the kongctl namespace for resource labeling
	Namespace string

	// Protection contains protection-related metadata for resource labeling
	Protection any

	// PlannedChange contains the full planned change being executed,
	// including references and field changes
	PlannedChange *planner.PlannedChange
}

ExecutionContext carries execution state that was previously stored in context. This struct eliminates the need for context.WithValue and unsafe type assertions by making dependencies explicit in function signatures.

func NewExecutionContext added in v0.1.3

func NewExecutionContext(change *planner.PlannedChange) *ExecutionContext

NewExecutionContext creates a new ExecutionContext from a PlannedChange

type ExecutionError

type ExecutionError struct {
	ChangeID     string `json:"change_id"`
	ResourceType string `json:"resource_type"`
	ResourceName string `json:"resource_name"`
	ResourceRef  string `json:"resource_ref"`
	Action       string `json:"action"`
	Error        string `json:"error"`
}

ExecutionError represents an error that occurred during execution

type ExecutionResult

type ExecutionResult struct {
	// Counts
	SuccessCount int `json:"success_count"`
	FailureCount int `json:"failure_count"`
	SkippedCount int `json:"skipped_count"`

	// Errors encountered during execution
	Errors []ExecutionError `json:"errors,omitempty"`

	// Indicates if this was a dry-run execution
	DryRun bool `json:"dry_run"`

	// Changes that were successfully applied (empty in dry-run)
	ChangesApplied []AppliedChange `json:"changes_applied,omitempty"`

	// Validation results for dry-run mode
	ValidationResults []ValidationResult `json:"validation_results,omitempty"`
}

ExecutionResult represents the outcome of executing a plan

func (*ExecutionResult) HasErrors

func (r *ExecutionResult) HasErrors() bool

HasErrors returns true if any errors occurred during execution

func (*ExecutionResult) Message

func (r *ExecutionResult) Message() string

Message returns a user-friendly summary of the execution result

func (*ExecutionResult) TotalChanges

func (r *ExecutionResult) TotalChanges() int

TotalChanges returns the total number of changes processed

type Executor

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

Executor handles the execution of declarative configuration plans

func New

func New(client *state.Client, reporter ProgressReporter, dryRun bool) *Executor

New creates a new Executor instance with default options.

func NewWithOptions added in v0.3.8

func NewWithOptions(client *state.Client, reporter ProgressReporter, dryRun bool, opts Options) *Executor

NewWithOptions creates a new Executor instance.

func (*Executor) Execute

func (e *Executor) Execute(ctx context.Context, plan *planner.Plan) *ExecutionResult

Execute runs the plan and returns the execution result

type Options added in v0.3.8

type Options struct {
	DeckRunner     deck.Runner
	KonnectToken   string
	KonnectBaseURL string
	Mode           planner.PlanMode
	PlanBaseDir    string
}

Options configures executor behavior.

type OrganizationTeamAdapter added in v0.4.0

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

OrganizationTeamAdapter implements ResourceOperations for teams

func NewOrganizationTeamAdapter added in v0.4.0

func NewOrganizationTeamAdapter(client *state.Client) *OrganizationTeamAdapter

NewOrganizationTeamAdapter creates a new team adapter

func (*OrganizationTeamAdapter) Create added in v0.4.0

Create issues a create call via the state client

func (*OrganizationTeamAdapter) Delete added in v0.4.0

Delete issues a delete call via the state client

func (*OrganizationTeamAdapter) GetByID added in v0.4.0

GetByID resolves a organization_team by ID

func (*OrganizationTeamAdapter) GetByName added in v0.4.0

func (a *OrganizationTeamAdapter) GetByName(ctx context.Context, name string) (ResourceInfo, error)

GetByName resolves a organization_team by name

func (*OrganizationTeamAdapter) MapCreateFields added in v0.4.0

func (a *OrganizationTeamAdapter) MapCreateFields(_ context.Context, execCtx *ExecutionContext,
	fields map[string]any, create *kkComps.CreateTeam,
) error

MapCreateFields maps planner fields to CreateTeam request

func (*OrganizationTeamAdapter) MapUpdateFields added in v0.4.0

func (a *OrganizationTeamAdapter) MapUpdateFields(_ context.Context, execCtx *ExecutionContext,
	fields map[string]any, update *kkComps.UpdateTeam, currentLabels map[string]string,
) error

MapUpdateFields maps planner fields to UpdateTeam request

func (*OrganizationTeamAdapter) RequiredFields added in v0.4.0

func (a *OrganizationTeamAdapter) RequiredFields() []string

RequiredFields lists required fields for create

func (*OrganizationTeamAdapter) ResourceType added in v0.4.0

func (a *OrganizationTeamAdapter) ResourceType() string

ResourceType returns the adapter resource type

func (*OrganizationTeamAdapter) SupportsUpdate added in v0.4.0

func (a *OrganizationTeamAdapter) SupportsUpdate() bool

SupportsUpdate indicates team support updates

func (*OrganizationTeamAdapter) Update added in v0.4.0

func (a *OrganizationTeamAdapter) Update(ctx context.Context, id string, req kkComps.UpdateTeam,
	namespace string, _ *ExecutionContext,
) (string, error)

Update issues an update call via the state client

type OrganizationTeamResourceInfo added in v0.4.0

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

OrganizationTeamResourceInfo implements ResourceInfo for organization_teams

func (*OrganizationTeamResourceInfo) GetID added in v0.4.0

func (*OrganizationTeamResourceInfo) GetLabels added in v0.4.0

func (c *OrganizationTeamResourceInfo) GetLabels() map[string]string

func (*OrganizationTeamResourceInfo) GetName added in v0.4.0

func (c *OrganizationTeamResourceInfo) GetName() string

func (*OrganizationTeamResourceInfo) GetNormalizedLabels added in v0.4.0

func (c *OrganizationTeamResourceInfo) GetNormalizedLabels() map[string]string

type ParentAwareOperations

type ParentAwareOperations[TCreate any, TUpdate any] interface {
	ResourceOperations[TCreate, TUpdate]

	// Parent resolution
	ResolveParentID(ctx context.Context, change planner.PlannedChange, executor *Executor) (string, error)
}

ParentAwareOperations extends ResourceOperations for resources with parent relationships

type PortalAdapter

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

PortalAdapter implements ResourceOperations for portals

func NewPortalAdapter

func NewPortalAdapter(client *state.Client) *PortalAdapter

NewPortalAdapter creates a new portal adapter

func (*PortalAdapter) Create

func (p *PortalAdapter) Create(ctx context.Context, req kkComps.CreatePortal,
	namespace string, _ *ExecutionContext,
) (string, error)

Create creates a new portal

func (*PortalAdapter) Delete

func (p *PortalAdapter) Delete(ctx context.Context, id string, _ *ExecutionContext) error

Delete deletes a portal

func (*PortalAdapter) GetByID added in v0.1.4

GetByID gets a portal by ID

func (*PortalAdapter) GetByName

func (p *PortalAdapter) GetByName(ctx context.Context, name string) (ResourceInfo, error)

GetByName gets a portal by name

func (*PortalAdapter) MapCreateFields

func (p *PortalAdapter) MapCreateFields(_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	create *kkComps.CreatePortal,
) error

MapCreateFields maps fields to CreatePortal request

func (*PortalAdapter) MapUpdateFields

func (p *PortalAdapter) MapUpdateFields(_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	update *kkComps.UpdatePortal, currentLabels map[string]string,
) error

MapUpdateFields maps fields to UpdatePortal request

func (*PortalAdapter) RequiredFields

func (p *PortalAdapter) RequiredFields() []string

RequiredFields returns the required fields for creation

func (*PortalAdapter) ResourceType

func (p *PortalAdapter) ResourceType() string

ResourceType returns the resource type name

func (*PortalAdapter) SupportsUpdate

func (p *PortalAdapter) SupportsUpdate() bool

SupportsUpdate returns true as portals support updates

func (*PortalAdapter) Update

func (p *PortalAdapter) Update(ctx context.Context, id string, req kkComps.UpdatePortal,
	namespace string, _ *ExecutionContext,
) (string, error)

Update updates an existing portal

type PortalAssetFaviconAdapter added in v0.3.5

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

PortalAssetFaviconAdapter implements SingletonOperations for portal favicon assets Favicon assets are singleton resources that always exist and only support updates

func NewPortalAssetFaviconAdapter added in v0.3.5

func NewPortalAssetFaviconAdapter(client *state.Client) *PortalAssetFaviconAdapter

NewPortalAssetFaviconAdapter creates a new portal asset favicon adapter

func (*PortalAssetFaviconAdapter) MapUpdateFields added in v0.3.5

func (p *PortalAssetFaviconAdapter) MapUpdateFields(_ context.Context, fields map[string]any,
	update *kkComps.ReplacePortalImageAsset,
) error

MapUpdateFields maps fields to ReplacePortalImageAsset

func (*PortalAssetFaviconAdapter) ResourceType added in v0.3.5

func (p *PortalAssetFaviconAdapter) ResourceType() string

ResourceType returns the resource type name

func (*PortalAssetFaviconAdapter) Update added in v0.3.5

Update updates the portal favicon

type PortalAssetLogoAdapter added in v0.3.5

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

PortalAssetLogoAdapter implements SingletonOperations for portal logo assets Logo assets are singleton resources that always exist and only support updates

func NewPortalAssetLogoAdapter added in v0.3.5

func NewPortalAssetLogoAdapter(client *state.Client) *PortalAssetLogoAdapter

NewPortalAssetLogoAdapter creates a new portal asset logo adapter

func (*PortalAssetLogoAdapter) MapUpdateFields added in v0.3.5

func (p *PortalAssetLogoAdapter) MapUpdateFields(_ context.Context, fields map[string]any,
	update *kkComps.ReplacePortalImageAsset,
) error

MapUpdateFields maps fields to ReplacePortalImageAsset

func (*PortalAssetLogoAdapter) ResourceType added in v0.3.5

func (p *PortalAssetLogoAdapter) ResourceType() string

ResourceType returns the resource type name

func (*PortalAssetLogoAdapter) Update added in v0.3.5

Update updates the portal logo

type PortalAuthSettingsAdapter added in v0.3.4

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

PortalAuthSettingsAdapter implements SingletonOperations for portal auth settings.

func NewPortalAuthSettingsAdapter added in v0.3.4

func NewPortalAuthSettingsAdapter(client *state.Client) *PortalAuthSettingsAdapter

NewPortalAuthSettingsAdapter creates a new adapter.

func (*PortalAuthSettingsAdapter) MapUpdateFields added in v0.3.4

MapUpdateFields maps planner fields into the SDK update request.

func (*PortalAuthSettingsAdapter) ResourceType added in v0.3.4

func (p *PortalAuthSettingsAdapter) ResourceType() string

func (*PortalAuthSettingsAdapter) Update added in v0.3.4

Update executes the API call for portal auth settings.

type PortalCustomizationAdapter

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

PortalCustomizationAdapter implements SingletonOperations for portal customization Portal customization is a singleton resource that always exists and only supports updates

func NewPortalCustomizationAdapter

func NewPortalCustomizationAdapter(client *state.Client) *PortalCustomizationAdapter

NewPortalCustomizationAdapter creates a new portal customization adapter

func (*PortalCustomizationAdapter) MapUpdateFields

func (p *PortalCustomizationAdapter) MapUpdateFields(_ context.Context, fields map[string]any,
	update *kkComps.PortalCustomization,
) error

MapUpdateFields maps fields to PortalCustomization

func (*PortalCustomizationAdapter) ResourceType

func (p *PortalCustomizationAdapter) ResourceType() string

ResourceType returns the resource type name

func (*PortalCustomizationAdapter) Update

Update updates the portal customization

type PortalDomainAdapter

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

PortalDomainAdapter implements ResourceOperations for portal custom domains

func NewPortalDomainAdapter

func NewPortalDomainAdapter(client *state.Client) *PortalDomainAdapter

NewPortalDomainAdapter creates a new portal domain adapter

func (*PortalDomainAdapter) Create

Create creates a new portal custom domain

func (*PortalDomainAdapter) Delete

Delete deletes a portal custom domain

func (*PortalDomainAdapter) GetByID added in v0.1.2

GetByID gets a portal custom domain by ID (portal ID in this case)

func (*PortalDomainAdapter) GetByName

GetByName gets a portal custom domain by name (hostname)

func (*PortalDomainAdapter) MapCreateFields

MapCreateFields maps fields to CreatePortalCustomDomainRequest

func (*PortalDomainAdapter) MapUpdateFields

MapUpdateFields maps fields to UpdatePortalCustomDomainRequest

func (*PortalDomainAdapter) RequiredFields

func (p *PortalDomainAdapter) RequiredFields() []string

RequiredFields returns the required fields for creation

func (*PortalDomainAdapter) ResourceType

func (p *PortalDomainAdapter) ResourceType() string

ResourceType returns the resource type name

func (*PortalDomainAdapter) SupportsUpdate

func (p *PortalDomainAdapter) SupportsUpdate() bool

SupportsUpdate returns true as custom domains support updates (enabled field only)

func (*PortalDomainAdapter) Update

Update updates an existing portal custom domain

type PortalDomainResourceInfo

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

PortalDomainResourceInfo implements ResourceInfo for portal custom domains

func (*PortalDomainResourceInfo) GetID

func (p *PortalDomainResourceInfo) GetID() string

func (*PortalDomainResourceInfo) GetLabels

func (p *PortalDomainResourceInfo) GetLabels() map[string]string

func (*PortalDomainResourceInfo) GetName

func (p *PortalDomainResourceInfo) GetName() string

func (*PortalDomainResourceInfo) GetNormalizedLabels

func (p *PortalDomainResourceInfo) GetNormalizedLabels() map[string]string

type PortalEmailConfigAdapter added in v0.3.5

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

PortalEmailConfigAdapter implements ResourceOperations for portal email configs.

func NewPortalEmailConfigAdapter added in v0.3.5

func NewPortalEmailConfigAdapter(client *state.Client) *PortalEmailConfigAdapter

NewPortalEmailConfigAdapter creates a new adapter.

func (*PortalEmailConfigAdapter) Create added in v0.3.5

func (*PortalEmailConfigAdapter) Delete added in v0.3.5

func (*PortalEmailConfigAdapter) GetByID added in v0.3.5

func (*PortalEmailConfigAdapter) GetByName added in v0.3.5

func (*PortalEmailConfigAdapter) MapCreateFields added in v0.3.5

func (a *PortalEmailConfigAdapter) MapCreateFields(
	_ context.Context, _ *ExecutionContext, fields map[string]any, create *kkComps.PostPortalEmailConfig,
) error

func (*PortalEmailConfigAdapter) MapUpdateFields added in v0.3.5

func (a *PortalEmailConfigAdapter) MapUpdateFields(
	_ context.Context, _ *ExecutionContext, fields map[string]any, update *kkComps.PatchPortalEmailConfig,
	_ map[string]string,
) error

func (*PortalEmailConfigAdapter) RequiredFields added in v0.3.5

func (a *PortalEmailConfigAdapter) RequiredFields() []string

func (*PortalEmailConfigAdapter) ResourceType added in v0.3.5

func (a *PortalEmailConfigAdapter) ResourceType() string

func (*PortalEmailConfigAdapter) SupportsUpdate added in v0.3.5

func (a *PortalEmailConfigAdapter) SupportsUpdate() bool

func (*PortalEmailConfigAdapter) Update added in v0.3.5

type PortalEmailTemplateAdapter added in v0.3.5

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

PortalEmailTemplateAdapter implements ResourceOperations for portal email templates.

func NewPortalEmailTemplateAdapter added in v0.3.5

func NewPortalEmailTemplateAdapter(client *state.Client) *PortalEmailTemplateAdapter

NewPortalEmailTemplateAdapter constructs a new adapter.

func (*PortalEmailTemplateAdapter) Create added in v0.3.5

func (*PortalEmailTemplateAdapter) Delete added in v0.3.5

func (*PortalEmailTemplateAdapter) GetByID added in v0.3.5

func (*PortalEmailTemplateAdapter) GetByName added in v0.3.5

func (*PortalEmailTemplateAdapter) MapCreateFields added in v0.3.5

func (*PortalEmailTemplateAdapter) MapUpdateFields added in v0.3.5

func (*PortalEmailTemplateAdapter) RequiredFields added in v0.3.5

func (a *PortalEmailTemplateAdapter) RequiredFields() []string

func (*PortalEmailTemplateAdapter) ResourceType added in v0.3.5

func (a *PortalEmailTemplateAdapter) ResourceType() string

func (*PortalEmailTemplateAdapter) SupportsUpdate added in v0.3.5

func (a *PortalEmailTemplateAdapter) SupportsUpdate() bool

func (*PortalEmailTemplateAdapter) Update added in v0.3.5

type PortalIdentityProviderAdapter added in v0.9.0

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

PortalIdentityProviderAdapter implements ResourceOperations for portal identity providers.

func NewPortalIdentityProviderAdapter added in v0.9.0

func NewPortalIdentityProviderAdapter(client *state.Client) *PortalIdentityProviderAdapter

NewPortalIdentityProviderAdapter creates a new portal identity provider adapter.

func (*PortalIdentityProviderAdapter) Create added in v0.9.0

Create creates a new portal identity provider.

func (*PortalIdentityProviderAdapter) Delete added in v0.9.0

Delete deletes a portal identity provider.

func (*PortalIdentityProviderAdapter) GetByID added in v0.9.0

GetByID gets a portal identity provider by ID.

func (*PortalIdentityProviderAdapter) GetByName added in v0.9.0

GetByName returns nil because portal identity providers are looked up by ID.

func (*PortalIdentityProviderAdapter) MapCreateFields added in v0.9.0

MapCreateFields maps planner fields to CreateIdentityProvider.

func (*PortalIdentityProviderAdapter) MapUpdateFields added in v0.9.0

func (p *PortalIdentityProviderAdapter) MapUpdateFields(
	_ context.Context,
	_ *ExecutionContext,
	fields map[string]any,
	update *kkComps.UpdateIdentityProvider,
	_ map[string]string,
) error

MapUpdateFields maps planner fields to UpdateIdentityProvider.

func (*PortalIdentityProviderAdapter) RequiredFields added in v0.9.0

func (p *PortalIdentityProviderAdapter) RequiredFields() []string

RequiredFields returns the required fields for creation.

func (*PortalIdentityProviderAdapter) ResourceType added in v0.9.0

func (p *PortalIdentityProviderAdapter) ResourceType() string

ResourceType returns the resource type name.

func (*PortalIdentityProviderAdapter) SupportsUpdate added in v0.9.0

func (p *PortalIdentityProviderAdapter) SupportsUpdate() bool

SupportsUpdate returns true.

func (*PortalIdentityProviderAdapter) Update added in v0.9.0

Update updates an existing portal identity provider.

type PortalIdentityProviderResourceInfo added in v0.9.0

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

PortalIdentityProviderResourceInfo implements ResourceInfo for portal identity providers.

func (*PortalIdentityProviderResourceInfo) GetID added in v0.9.0

GetID returns the resource ID.

func (*PortalIdentityProviderResourceInfo) GetLabels added in v0.9.0

GetLabels returns the resource labels.

func (*PortalIdentityProviderResourceInfo) GetName added in v0.9.0

GetName returns the resource name.

func (*PortalIdentityProviderResourceInfo) GetNormalizedLabels added in v0.9.0

func (p *PortalIdentityProviderResourceInfo) GetNormalizedLabels() map[string]string

GetNormalizedLabels returns the normalized labels.

type PortalPageAdapter

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

PortalPageAdapter implements ResourceOperations for portal pages

func NewPortalPageAdapter

func NewPortalPageAdapter(client *state.Client) *PortalPageAdapter

NewPortalPageAdapter creates a new portal page adapter

func (*PortalPageAdapter) Create

Create creates a new portal page

func (*PortalPageAdapter) Delete

func (p *PortalPageAdapter) Delete(ctx context.Context, id string, execCtx *ExecutionContext) error

Delete deletes a portal page

func (*PortalPageAdapter) GetByID added in v0.1.1

func (p *PortalPageAdapter) GetByID(ctx context.Context, id string, execCtx *ExecutionContext) (ResourceInfo, error)

GetByID gets a portal page by ID using portal context

func (*PortalPageAdapter) GetByName

func (p *PortalPageAdapter) GetByName(_ context.Context, _ string) (ResourceInfo, error)

GetByName gets a portal page by slug

func (*PortalPageAdapter) MapCreateFields

func (p *PortalPageAdapter) MapCreateFields(_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	create *kkComps.CreatePortalPageRequest,
) error

MapCreateFields maps fields to CreatePortalPageRequest

func (*PortalPageAdapter) MapUpdateFields

func (p *PortalPageAdapter) MapUpdateFields(_ context.Context, execCtx *ExecutionContext, fields map[string]any,
	update *kkComps.UpdatePortalPageRequest, _ map[string]string,
) error

MapUpdateFields maps fields to UpdatePortalPageRequest

func (*PortalPageAdapter) RequiredFields

func (p *PortalPageAdapter) RequiredFields() []string

RequiredFields returns the required fields for creation

func (*PortalPageAdapter) ResourceType

func (p *PortalPageAdapter) ResourceType() string

ResourceType returns the resource type name

func (*PortalPageAdapter) SupportsUpdate

func (p *PortalPageAdapter) SupportsUpdate() bool

SupportsUpdate returns true as pages support updates

func (*PortalPageAdapter) Update

Update updates an existing portal page

type PortalPageResourceInfo

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

PortalPageResourceInfo implements ResourceInfo for portal pages

func (*PortalPageResourceInfo) GetID

func (p *PortalPageResourceInfo) GetID() string

func (*PortalPageResourceInfo) GetLabels

func (p *PortalPageResourceInfo) GetLabels() map[string]string

func (*PortalPageResourceInfo) GetName

func (p *PortalPageResourceInfo) GetName() string

func (*PortalPageResourceInfo) GetNormalizedLabels

func (p *PortalPageResourceInfo) GetNormalizedLabels() map[string]string

type PortalResourceInfo

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

PortalResourceInfo wraps a Portal to implement ResourceInfo

func (*PortalResourceInfo) GetID

func (p *PortalResourceInfo) GetID() string

func (*PortalResourceInfo) GetLabels

func (p *PortalResourceInfo) GetLabels() map[string]string

func (*PortalResourceInfo) GetName

func (p *PortalResourceInfo) GetName() string

func (*PortalResourceInfo) GetNormalizedLabels

func (p *PortalResourceInfo) GetNormalizedLabels() map[string]string

type PortalSnippetAdapter

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

PortalSnippetAdapter implements ResourceOperations for portal snippets

func NewPortalSnippetAdapter

func NewPortalSnippetAdapter(client *state.Client) *PortalSnippetAdapter

NewPortalSnippetAdapter creates a new portal snippet adapter

func (*PortalSnippetAdapter) Create

Create creates a new portal snippet

func (*PortalSnippetAdapter) Delete

func (p *PortalSnippetAdapter) Delete(ctx context.Context, id string, execCtx *ExecutionContext) error

Delete deletes a portal snippet

func (*PortalSnippetAdapter) GetByID added in v0.1.2

func (p *PortalSnippetAdapter) GetByID(
	ctx context.Context, id string, execCtx *ExecutionContext,
) (ResourceInfo, error)

GetByID gets a portal snippet by ID

func (*PortalSnippetAdapter) GetByName

GetByName gets a portal snippet by name

func (*PortalSnippetAdapter) MapCreateFields

func (p *PortalSnippetAdapter) MapCreateFields(
	_ context.Context, _ *ExecutionContext, fields map[string]any,
	create *kkComps.CreatePortalSnippetRequest,
) error

MapCreateFields maps fields to CreatePortalSnippetRequest

func (*PortalSnippetAdapter) MapUpdateFields

func (p *PortalSnippetAdapter) MapUpdateFields(_ context.Context, _ *ExecutionContext, fields map[string]any,
	update *kkComps.UpdatePortalSnippetRequest, _ map[string]string,
) error

MapUpdateFields maps fields to UpdatePortalSnippetRequest

func (*PortalSnippetAdapter) RequiredFields

func (p *PortalSnippetAdapter) RequiredFields() []string

RequiredFields returns the required fields for creation

func (*PortalSnippetAdapter) ResourceType

func (p *PortalSnippetAdapter) ResourceType() string

ResourceType returns the resource type name

func (*PortalSnippetAdapter) SupportsUpdate

func (p *PortalSnippetAdapter) SupportsUpdate() bool

SupportsUpdate returns true as snippets support updates

func (*PortalSnippetAdapter) Update

Update updates an existing portal snippet

type PortalSnippetResourceInfo

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

PortalSnippetResourceInfo implements ResourceInfo for portal snippets

func (*PortalSnippetResourceInfo) GetID

func (p *PortalSnippetResourceInfo) GetID() string

func (*PortalSnippetResourceInfo) GetLabels

func (p *PortalSnippetResourceInfo) GetLabels() map[string]string

func (*PortalSnippetResourceInfo) GetName

func (p *PortalSnippetResourceInfo) GetName() string

func (*PortalSnippetResourceInfo) GetNormalizedLabels

func (p *PortalSnippetResourceInfo) GetNormalizedLabels() map[string]string

type PortalTeamAdapter added in v0.3.3

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

PortalTeamAdapter implements ResourceOperations for portal teams

func NewPortalTeamAdapter added in v0.3.3

func NewPortalTeamAdapter(client *state.Client) *PortalTeamAdapter

NewPortalTeamAdapter creates a new portal team adapter

func (*PortalTeamAdapter) Create added in v0.3.3

func (p *PortalTeamAdapter) Create(ctx context.Context, req kkComps.PortalCreateTeamRequest,
	namespace string, execCtx *ExecutionContext,
) (string, error)

Create creates a new portal team

func (*PortalTeamAdapter) Delete added in v0.3.3

func (p *PortalTeamAdapter) Delete(ctx context.Context, id string, execCtx *ExecutionContext) error

Delete deletes a portal team

func (*PortalTeamAdapter) GetByID added in v0.3.3

func (p *PortalTeamAdapter) GetByID(
	ctx context.Context, id string, execCtx *ExecutionContext,
) (ResourceInfo, error)

GetByID gets a portal team by ID

func (*PortalTeamAdapter) GetByName added in v0.3.3

func (p *PortalTeamAdapter) GetByName(_ context.Context, _ string) (ResourceInfo, error)

GetByName gets a portal team by name

func (*PortalTeamAdapter) MapCreateFields added in v0.3.3

func (p *PortalTeamAdapter) MapCreateFields(
	_ context.Context, _ *ExecutionContext, fields map[string]any,
	create *kkComps.PortalCreateTeamRequest,
) error

MapCreateFields maps fields to PortalCreateTeamRequest

func (*PortalTeamAdapter) MapUpdateFields added in v0.3.3

func (p *PortalTeamAdapter) MapUpdateFields(_ context.Context, _ *ExecutionContext, fields map[string]any,
	update *kkComps.PortalUpdateTeamRequest, _ map[string]string,
) error

MapUpdateFields maps fields to PortalUpdateTeamRequest

func (*PortalTeamAdapter) RequiredFields added in v0.3.3

func (p *PortalTeamAdapter) RequiredFields() []string

RequiredFields returns the required fields for creation

func (*PortalTeamAdapter) ResourceType added in v0.3.3

func (p *PortalTeamAdapter) ResourceType() string

ResourceType returns the resource type name

func (*PortalTeamAdapter) SupportsUpdate added in v0.3.3

func (p *PortalTeamAdapter) SupportsUpdate() bool

SupportsUpdate returns true as teams support updates (description only)

func (*PortalTeamAdapter) Update added in v0.3.3

func (p *PortalTeamAdapter) Update(ctx context.Context, id string, req kkComps.PortalUpdateTeamRequest,
	namespace string, execCtx *ExecutionContext,
) (string, error)

Update updates an existing portal team

type PortalTeamResourceInfo added in v0.3.3

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

PortalTeamResourceInfo implements ResourceInfo for portal teams

func (*PortalTeamResourceInfo) GetID added in v0.3.3

func (p *PortalTeamResourceInfo) GetID() string

func (*PortalTeamResourceInfo) GetLabels added in v0.3.3

func (p *PortalTeamResourceInfo) GetLabels() map[string]string

func (*PortalTeamResourceInfo) GetName added in v0.3.3

func (p *PortalTeamResourceInfo) GetName() string

func (*PortalTeamResourceInfo) GetNormalizedLabels added in v0.3.3

func (p *PortalTeamResourceInfo) GetNormalizedLabels() map[string]string

type PortalTeamRoleAdapter added in v0.3.4

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

PortalTeamRoleAdapter implements ResourceOperations for portal team roles

func NewPortalTeamRoleAdapter added in v0.3.4

func NewPortalTeamRoleAdapter(client *state.Client) *PortalTeamRoleAdapter

NewPortalTeamRoleAdapter creates a new portal team role adapter

func (*PortalTeamRoleAdapter) Create added in v0.3.4

Create assigns a role to a portal team

func (*PortalTeamRoleAdapter) Delete added in v0.3.4

func (p *PortalTeamRoleAdapter) Delete(ctx context.Context, id string, execCtx *ExecutionContext) error

Delete removes an assigned role from a portal team

func (*PortalTeamRoleAdapter) GetByID added in v0.3.4

func (p *PortalTeamRoleAdapter) GetByID(
	ctx context.Context, id string, execCtx *ExecutionContext,
) (ResourceInfo, error)

GetByID fetches a role assignment by ID

func (*PortalTeamRoleAdapter) GetByName added in v0.3.4

GetByName is not supported for portal team roles

func (*PortalTeamRoleAdapter) MapCreateFields added in v0.3.4

func (p *PortalTeamRoleAdapter) MapCreateFields(
	_ context.Context, execCtx *ExecutionContext, fields map[string]any, create *kkComps.PortalAssignRoleRequest,
) error

MapCreateFields maps fields to PortalAssignRoleRequest

func (*PortalTeamRoleAdapter) MapUpdateFields added in v0.3.4

MapUpdateFields is not supported for portal team roles

func (*PortalTeamRoleAdapter) RequiredFields added in v0.3.4

func (p *PortalTeamRoleAdapter) RequiredFields() []string

RequiredFields returns the required fields for creation

func (*PortalTeamRoleAdapter) ResourceType added in v0.3.4

func (p *PortalTeamRoleAdapter) ResourceType() string

ResourceType returns the resource type name

func (*PortalTeamRoleAdapter) SupportsUpdate added in v0.3.4

func (p *PortalTeamRoleAdapter) SupportsUpdate() bool

SupportsUpdate indicates update is not supported

func (*PortalTeamRoleAdapter) Update added in v0.3.4

Update is not supported for portal team roles

type PortalTeamRoleResourceInfo added in v0.3.4

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

PortalTeamRoleResourceInfo implements ResourceInfo for portal team roles

func (*PortalTeamRoleResourceInfo) GetID added in v0.3.4

func (*PortalTeamRoleResourceInfo) GetLabels added in v0.3.4

func (p *PortalTeamRoleResourceInfo) GetLabels() map[string]string

func (*PortalTeamRoleResourceInfo) GetName added in v0.3.4

func (p *PortalTeamRoleResourceInfo) GetName() string

func (*PortalTeamRoleResourceInfo) GetNormalizedLabels added in v0.3.4

func (p *PortalTeamRoleResourceInfo) GetNormalizedLabels() map[string]string

type ProgressReporter

type ProgressReporter interface {
	// StartExecution is called at the beginning of plan execution
	StartExecution(plan *planner.Plan)

	// StartChange is called before executing a change
	StartChange(change planner.PlannedChange)

	// CompleteChange is called after a change is executed (success or failure)
	CompleteChange(change planner.PlannedChange, err error)

	// SkipChange is called when a change is skipped (e.g., in dry-run mode)
	SkipChange(change planner.PlannedChange, reason string)

	// FinishExecution is called at the end of plan execution
	FinishExecution(result *ExecutionResult)
}

ProgressReporter provides real-time feedback during plan execution

type ResourceInfo

type ResourceInfo interface {
	GetID() string
	GetName() string
	GetLabels() map[string]string
	GetNormalizedLabels() map[string]string
}

ResourceInfo provides common resource information

type ResourceOperations

type ResourceOperations[TCreate any, TUpdate any] interface {
	// Field mapping
	MapCreateFields(ctx context.Context, execCtx *ExecutionContext, fields map[string]any, create *TCreate) error
	MapUpdateFields(ctx context.Context, execCtx *ExecutionContext, fields map[string]any, update *TUpdate,
		currentLabels map[string]string) error

	// API calls
	Create(ctx context.Context, req TCreate, namespace string, execCtx *ExecutionContext) (string, error)
	Update(ctx context.Context, id string, req TUpdate, namespace string, execCtx *ExecutionContext) (string, error)
	Delete(ctx context.Context, id string, execCtx *ExecutionContext) error
	GetByName(ctx context.Context, name string) (ResourceInfo, error)
	GetByID(ctx context.Context, id string, execCtx *ExecutionContext) (ResourceInfo, error)

	// Resource info
	ResourceType() string
	RequiredFields() []string
	SupportsUpdate() bool
}

ResourceOperations defines the contract for resource-specific operations

type SingletonOperations

type SingletonOperations[TUpdate any] interface {
	// Field mapping
	MapUpdateFields(ctx context.Context, fields map[string]any, update *TUpdate) error

	// API calls - note the special signature for singleton resources
	Update(ctx context.Context, parentID string, req TUpdate) error

	// Resource info
	ResourceType() string
}

SingletonOperations defines operations for singleton resources that always exist and only support updates (no create/delete), such as portal customization

type ValidationResult

type ValidationResult struct {
	ChangeID     string `json:"change_id"`
	ResourceType string `json:"resource_type"`
	ResourceName string `json:"resource_name"`
	ResourceRef  string `json:"resource_ref"`
	Action       string `json:"action"`
	Status       string `json:"status"`               // "would_succeed", "would_fail", "skipped"
	Validation   string `json:"validation,omitempty"` // "passed", "failed", reason
	Message      string `json:"message,omitempty"`
}

ValidationResult represents the validation outcome for a change in dry-run mode

Jump to

Keyboard shortcuts

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