interfaces

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentUnknown    = contracts.ComponentUnknown
	ComponentIntentAPI  = contracts.ComponentIntentAPI
	ComponentVIMSIM     = contracts.ComponentVIMSIM
	ComponentNEPHIO     = contracts.ComponentNEPHIO
	ComponentORAN       = contracts.ComponentORAN
	ComponentCACHE      = contracts.ComponentCACHE
	ComponentCONTROLLER = contracts.ComponentCONTROLLER
	ComponentMETRICS    = contracts.ComponentMETRICS
	ComponentPERF       = contracts.ComponentPERF
)

Component type constants

View Source
const (
	PhaseUnknown    = contracts.PhaseUnknown
	PhaseInit       = contracts.PhaseInit
	PhaseValidation = contracts.PhaseValidation
	PhaseProcessing = contracts.PhaseProcessing
	PhaseComplete   = contracts.PhaseComplete
	PhaseError      = contracts.PhaseError
)

Phase constants

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKeys

type APIKeys struct {
	OpenAI    string `json:"openai,omitempty"`
	Weaviate  string `json:"weaviate,omitempty"`
	Anthropic string `json:"anthropic,omitempty"`
	GoogleAI  string `json:"googleai,omitempty"`
	Generic   string `json:"generic,omitempty"`
	JWTSecret string `json:"jwt_secret,omitempty"`
}

func (*APIKeys) IsEmpty

func (ak *APIKeys) IsEmpty() bool

type AuditLevel

type AuditLevel int
const (
	AuditLevelInfo AuditLevel = iota

	AuditLevelWarn

	AuditLevelError

	AuditLevelCritical
)

func AuditLevelFromString

func AuditLevelFromString(level string) AuditLevel

FromString method to convert string back to AuditLevel

func (AuditLevel) String

func (al AuditLevel) String() string

String method for AuditLevel to support type conversion and logging

type AuditLogger

type AuditLogger interface {
	LogSecretAccess(secretType, source, userID, sessionID string, success bool, err error)

	LogAuthenticationAttempt(provider, userID, ipAddress, userAgent string, success bool, err error)

	LogSecretRotation(secretName, rotationType, userID string, success bool, err error)

	LogAPIKeyValidation(keyType, provider string, success bool, err error)

	LogUnauthorizedAccess(resource, userID, ipAddress, userAgent, reason string)

	LogSecurityViolation(violationType, description, userID, ipAddress string, severity AuditLevel)

	SetEnabled(enabled bool)

	IsEnabled() bool

	Close() error
}

type CacheManager

type CacheManager interface {
	Get(key string) (interface{}, bool)
	Set(key string, value interface{}) error
	Delete(key string) error
}

CacheManager manages caching operations

type ComponentController

type ComponentController interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	Status() ComponentStatus
}

ComponentController manages component lifecycle

type ComponentStatus

type ComponentStatus struct {
	Healthy bool
	Message string
	Phase   ProcessingPhase
}

ComponentStatus represents component health status

type ComponentType

type ComponentType = contracts.ComponentType

Type aliases for backward compatibility

type ConfigProvider

type ConfigProvider interface {
	GetRAGAPIURL(useInternal bool) string

	GetLLMProcessorURL() string

	GetLLMProcessorTimeout() time.Duration

	GetGitRepoURL() string

	GetGitToken() string

	GetGitBranch() string

	GetWeaviateURL() string

	GetWeaviateIndex() string

	GetOpenAIAPIKey() string

	GetOpenAIModel() string

	GetOpenAIEmbeddingModel() string

	GetNamespace() string

	Validate() error
}

type Event

type Event struct {
	Type      string
	Component ComponentType
	Data      interface{}
}

Event represents a system event

type EventHandler

type EventHandler interface {
	HandleEvent(ctx context.Context, event Event) error
}

EventHandler handles system events

type IntentProcessor

type IntentProcessor interface {
	ProcessIntent(ctx context.Context, intent *contracts.NetworkIntent) error
	ValidateIntent(ctx context.Context, intent *contracts.NetworkIntent) error
}

IntentProcessor is the main interface for processing network intents

type MetricsCollector

type MetricsCollector interface {
	RecordLatency(operation string, duration float64)
	RecordThroughput(operation string, value float64)
	RecordError(operation string, err error)
}

MetricsCollector collects performance metrics

type ProcessingPhase

type ProcessingPhase = contracts.ProcessingPhase

Type aliases for backward compatibility

type RotationResult

type RotationResult struct {
	SecretName string `json:"secret_name"`

	RotationType string `json:"rotation_type"`

	Success bool `json:"success"`

	OldSecretHash string `json:"old_secret_hash,omitempty"`

	NewSecretHash string `json:"new_secret_hash,omitempty"`

	BackupCreated bool `json:"backup_created"`

	Timestamp time.Time `json:"timestamp"`

	Error string `json:"error,omitempty"`
}

type SecretManager

type SecretManager interface {
	GetSecretValue(ctx context.Context, secretName, key, envVarName string) (string, error)

	CreateSecretFromEnvVars(ctx context.Context, secretName string, envVarMapping map[string]string) error

	UpdateSecret(ctx context.Context, secretName string, data map[string][]byte) error

	SecretExists(ctx context.Context, secretName string) bool

	RotateSecret(ctx context.Context, secretName, secretKey, newValue string) error

	GetSecretRotationInfo(ctx context.Context, secretName string) (map[string]string, error)

	GetAPIKeys(ctx context.Context) (*APIKeys, error)
}

Jump to

Keyboard shortcuts

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