integration

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgoCDIntegration

type ArgoCDIntegration struct {
	K8sClient kubernetes.Interface
}

func (*ArgoCDIntegration) DeleteIntegration

func (aci *ArgoCDIntegration) DeleteIntegration(ctx context.Context, namespace, integrationName string) error

DeleteIntegration removes a named integration from the "mdai-argocd-integration" secret in the provided namespace.

func (*ArgoCDIntegration) GetIntegrationByName

func (aci *ArgoCDIntegration) GetIntegrationByName(ctx context.Context, namespace, name string) (*ArgoCDIntegrationData, error)

GetIntegrationByName retrieves the existing integration in the provided namespace for the "mdai-argocd-integration" secret, if it exists.

func (*ArgoCDIntegration) GetIntegrations

func (aci *ArgoCDIntegration) GetIntegrations(ctx context.Context, namespace string) (map[string]ArgoCDIntegrationData, error)

GetIntegrations retrieves any existing integrations in the provided namespace for the "mdai-argocd-integration" secret.

func (*ArgoCDIntegration) SetIntegration

func (aci *ArgoCDIntegration) SetIntegration(ctx context.Context, namespace, integrationName string, integrationData ArgoCDIntegrationData) error

SetIntegration adds or updates the "mdai-argocd-integration" secret for the provided namespace.

type ArgoCDIntegrationData

type ArgoCDIntegrationData struct {
	APIUrl       string `json:"apiUrl"`
	AccountToken string `json:"accountToken"`
}

type DataDogIntegration

type DataDogIntegration struct {
	K8sClient kubernetes.Interface
}

func (*DataDogIntegration) DeleteIntegration

func (ddi *DataDogIntegration) DeleteIntegration(ctx context.Context, namespace, integrationName string) error

DeleteIntegration removes a named integration from the "mdai-gateway-integration" secret in the provided namespace.

func (*DataDogIntegration) GetIntegrationByName

func (ddi *DataDogIntegration) GetIntegrationByName(ctx context.Context, namespace, name string) (*DataDogIntegrationData, error)

GetIntegrationByName retrieves the existing integration in the provided namespace for the "mdai-gateway-integration" secret, if it exists.

func (*DataDogIntegration) GetIntegrations

func (ddi *DataDogIntegration) GetIntegrations(ctx context.Context, namespace string) (map[string]DataDogIntegrationData, error)

GetIntegrations retrieves any existing integrations in the provided namespace for the "mdai-gateway-integration" secret.

func (*DataDogIntegration) SetIntegration

func (ddi *DataDogIntegration) SetIntegration(ctx context.Context, namespace, integrationName string, integrationData DataDogIntegrationData) error

SetIntegration adds or updates the "mdai-gateway-integration" secret for the provided namespace.

type DataDogIntegrationData

type DataDogIntegrationData struct {
	APIKey string `json:"apiKey"`
	DDUrl  string `json:"url"`
}

func (DataDogIntegrationData) IsKnownDatadogTLD added in v0.1.9

func (d DataDogIntegrationData) IsKnownDatadogTLD() bool

type Integration

type Integration[T any] interface {
	GetIntegrations(ctx context.Context, namespace string) (map[string]T, error)
	GetIntegrationByName(ctx context.Context, namespace, name string) (*T, error)
	SetIntegration(ctx context.Context, namespace, integrationName string, integrationData T) error
	DeleteIntegration(ctx context.Context, namespace, integrationName string) error
}

Jump to

Keyboard shortcuts

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