importer

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package importer defines a common interface for importing provider-specific resources into Crossplane compositions. This abstraction exists because multiple providers (e.g., GitLab, Azure, GitHub) may require different logic for importing resources, but share the same high-level operation: taking a desired resource and returning an identifier or status.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Importer

type Importer interface {
	Import(des *resource.DesiredComposed) (string, error)
	PassClient(client any) error
	GetContext() (string, error)
}

Importer defines a contract for importing resources in Crossplane functions. The interface exists to support multiple providers, each with its own import logic, while maintaining a consistent method signature.

Method:

  • Import: Takes a desired resource and performs the import operation, returning a string identifier (such as an external name) or an error.
  • PassClient: Provides the underlying provider client to the importer. The client must be of the expected type (e.g., *gitlab.Client), otherwise an error is returned.

Directories

Path Synopsis
Package gitlabimporter provides implementations of the Importer interface for GitLab resources in Crossplane functions.
Package gitlabimporter provides implementations of the Importer interface for GitLab resources in Crossplane functions.

Jump to

Keyboard shortcuts

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