Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKey ¶ added in v0.13.0
type APIKey struct {
Key string `json:"key" mapstructure:"key"`
UserID string `json:"user_id" mapstructure:"user_id"`
Role string `json:"role" mapstructure:"role"`
Permissions []string `json:"permissions" mapstructure:"permissions"`
CreatedAt string `json:"created_at" mapstructure:"created_at"`
ExpiresAt string `json:"expires_at,omitempty" mapstructure:"expires_at"`
}
APIKey represents an API key configuration
func (*APIKey) HasPermission ¶ added in v0.13.0
HasPermission checks if a user has a specific permission
type AuthConfig ¶ added in v0.13.0
type AuthConfig struct {
Enabled bool `json:"enabled" mapstructure:"enabled"`
APIKeys []APIKey `json:"api_keys" mapstructure:"api_keys"`
KeysFile string `json:"keys_file" mapstructure:"keys_file"`
HeaderName string `json:"header_name" mapstructure:"header_name"`
}
AuthConfig represents authentication configuration
type Config ¶
type Config struct {
// StartPort is the starting port for agentapi servers
StartPort int `json:"start_port" mapstructure:"start_port"`
// Auth represents authentication configuration
Auth AuthConfig `json:"auth" mapstructure:"auth"`
// Persistence represents session persistence configuration
Persistence PersistenceConfig `json:"persistence" mapstructure:"persistence"`
// DisableHeartbeat disables heartbeat checking (default: false)
DisableHeartbeat bool `json:"disable_heartbeat" mapstructure:"disable_heartbeat"`
// DisableZombieCleanup disables automatic zombie session cleanup (default: false)
DisableZombieCleanup bool `json:"disable_zombie_cleanup" mapstructure:"disable_zombie_cleanup"`
}
Config represents the proxy configuration
func LoadConfig ¶
LoadConfig loads configuration from a JSON file
type PersistenceConfig ¶ added in v1.0.0
type PersistenceConfig struct {
Enabled bool `json:"enabled" mapstructure:"enabled"`
Backend string `json:"backend" mapstructure:"backend"` // "file", "sqlite", "postgres"
FilePath string `json:"file_path" mapstructure:"file_path"`
SyncInterval int `json:"sync_interval_seconds" mapstructure:"sync_interval_seconds"`
EncryptSecrets bool `json:"encrypt_sensitive_data" mapstructure:"encrypt_sensitive_data"`
SessionRecoveryMaxAge int `json:"session_recovery_max_age_hours" mapstructure:"session_recovery_max_age_hours"` // Max age in hours for session recovery
}
PersistenceConfig represents session persistence configuration
Click to show internal directories.
Click to hide internal directories.