connector

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFileExists

func CheckFileExists(filePath string) bool

func GetEntitlementForTesting

func GetEntitlementForTesting(
	resource *v2.Resource,
	resourceDisplayName string,
	roleEntitlement string,
) *v2.Entitlement

func GetRoleResourceForTesting

func GetRoleResourceForTesting(
	t *testing.T,
	name string,
	description string,
) *v2.Resource

func GetUserResourceForTesting

func GetUserResourceForTesting(
	t *testing.T,
	name string,
	description string,
) *v2.Resource

func PopulateOptions

func PopulateOptions(displayName, permission, resource string) []ent.EntitlementOption

PopulateOptions - Populate entitlement options for teleport resource.

Types

type Connector

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

func New

func New(
	ctx context.Context,
	proxyAddress string,
	keyFilePath string,
	key string,
) (*Connector, error)

New returns a new instance of the connector.

func (*Connector) Asset

func (d *Connector) Asset(ctx context.Context, asset *v2.AssetRef) (string, io.ReadCloser, error)

Asset takes an input AssetRef and attempts to fetch it using the connector's authenticated http client It streams a response, always starting with a metadata object, following by chunked payloads for the asset.

func (*Connector) Metadata

func (d *Connector) Metadata(ctx context.Context) (*v2.ConnectorMetadata, error)

Metadata returns metadata about the connector.

func (*Connector) ResourceSyncers

func (d *Connector) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer

ResourceSyncers returns a ResourceSyncer for each resource type that should be synced from the upstream service.

func (*Connector) Validate

func (d *Connector) Validate(ctx context.Context) (annotations.Annotations, error)

Validate is called to ensure that the connector is properly configured. It should exercise any API credentials to be sure that they are valid.

type Node

type Node struct {
	Id        string
	Name      string
	Namespace string
}

Jump to

Keyboard shortcuts

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