adapters

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package adapters provides module wrappers for existing AegisGate packages. These adapters allow gradual migration to the modular plugin architecture.

Index

Constants

This section is empty.

Variables

View Source
var Now = func() time.Time {
	return time.Now()
}

Now is a variable for testing purposes.

Functions

This section is empty.

Types

type AuthModuleAdapter

type AuthModuleAdapter struct {
	*core.BaseModule
	// contains filtered or unexported fields
}

AuthModuleAdapter wraps the auth package as a module.

func NewAuthModule

func NewAuthModule() *AuthModuleAdapter

NewAuthModule creates a new auth module adapter.

func (*AuthModuleAdapter) GetManager

func (m *AuthModuleAdapter) GetManager() *auth.Manager

GetManager returns the underlying auth manager.

func (*AuthModuleAdapter) Initialize

func (m *AuthModuleAdapter) Initialize(ctx context.Context, config core.ModuleConfig) error

Initialize prepares the auth module.

func (*AuthModuleAdapter) Provides

func (m *AuthModuleAdapter) Provides() []string

Provides returns the capabilities this module provides.

func (*AuthModuleAdapter) Start

func (m *AuthModuleAdapter) Start(ctx context.Context) error

Start begins the auth module operation.

func (*AuthModuleAdapter) Stop

func (m *AuthModuleAdapter) Stop(ctx context.Context) error

Stop gracefully shuts down the auth module.

type DashboardModuleAdapter

type DashboardModuleAdapter struct {
	*core.BaseModule
	// contains filtered or unexported fields
}

DashboardModuleAdapter wraps the dashboard package as a module.

func NewDashboardModule

func NewDashboardModule() *DashboardModuleAdapter

NewDashboardModule creates a new dashboard module adapter.

func (*DashboardModuleAdapter) Dependencies

func (m *DashboardModuleAdapter) Dependencies() []string

Dependencies returns required modules.

func (*DashboardModuleAdapter) GetDashboard

func (m *DashboardModuleAdapter) GetDashboard() *dashboard.Dashboard

GetDashboard returns the underlying dashboard instance.

func (*DashboardModuleAdapter) Initialize

func (m *DashboardModuleAdapter) Initialize(ctx context.Context, config core.ModuleConfig) error

Initialize prepares the dashboard module.

func (*DashboardModuleAdapter) OptionalDependencies

func (m *DashboardModuleAdapter) OptionalDependencies() []string

OptionalDependencies returns optional modules.

func (*DashboardModuleAdapter) Provides

func (m *DashboardModuleAdapter) Provides() []string

Provides returns the capabilities this module provides.

func (*DashboardModuleAdapter) SetI18nManager

func (m *DashboardModuleAdapter) SetI18nManager(i18nMgr *i18n.Manager)

SetI18nManager sets the i18n manager for the dashboard.

func (*DashboardModuleAdapter) Start

Start begins the dashboard module operation.

func (*DashboardModuleAdapter) Stop

Stop gracefully shuts down the dashboard module.

type I18nModuleAdapter

type I18nModuleAdapter struct {
	*core.BaseModule
	// contains filtered or unexported fields
}

I18nModuleAdapter wraps the i18n package as a module.

func NewI18nModule

func NewI18nModule() *I18nModuleAdapter

NewI18nModule creates a new i18n module adapter.

func (*I18nModuleAdapter) GetManager

func (m *I18nModuleAdapter) GetManager() *i18n.Manager

GetManager returns the underlying i18n manager.

func (*I18nModuleAdapter) Initialize

func (m *I18nModuleAdapter) Initialize(ctx context.Context, config core.ModuleConfig) error

Initialize prepares the i18n module.

func (*I18nModuleAdapter) Provides

func (m *I18nModuleAdapter) Provides() []string

Provides returns the capabilities this module provides.

func (*I18nModuleAdapter) Start

func (m *I18nModuleAdapter) Start(ctx context.Context) error

Start begins the i18n module operation.

type MetricsModuleAdapter

type MetricsModuleAdapter struct {
	*core.BaseModule
	// contains filtered or unexported fields
}

MetricsModuleAdapter wraps the metrics package as a module.

func NewMetricsModule

func NewMetricsModule() *MetricsModuleAdapter

NewMetricsModule creates a new metrics module adapter.

func (*MetricsModuleAdapter) GetCollector

func (m *MetricsModuleAdapter) GetCollector() *metrics.MetricsCollector

GetCollector returns the underlying metrics collector.

func (*MetricsModuleAdapter) Initialize

func (m *MetricsModuleAdapter) Initialize(ctx context.Context, config core.ModuleConfig) error

Initialize prepares the metrics module.

func (*MetricsModuleAdapter) Provides

func (m *MetricsModuleAdapter) Provides() []string

Provides returns the capabilities this module provides.

func (*MetricsModuleAdapter) Start

func (m *MetricsModuleAdapter) Start(ctx context.Context) error

Start begins the metrics module operation.

type ProxyModuleAdapter

type ProxyModuleAdapter struct {
	*core.BaseModule
	// contains filtered or unexported fields
}

ProxyModuleAdapter wraps the proxy package as a module.

func NewProxyModule

func NewProxyModule() *ProxyModuleAdapter

NewProxyModule creates a new proxy module adapter.

func (*ProxyModuleAdapter) Dependencies

func (m *ProxyModuleAdapter) Dependencies() []string

Dependencies returns required modules.

func (*ProxyModuleAdapter) GetHandler

func (m *ProxyModuleAdapter) GetHandler() *proxy.Proxy

GetHandler returns the underlying proxy handler.

func (*ProxyModuleAdapter) Initialize

func (m *ProxyModuleAdapter) Initialize(ctx context.Context, config core.ModuleConfig) error

Initialize prepares the proxy module.

func (*ProxyModuleAdapter) OptionalDependencies

func (m *ProxyModuleAdapter) OptionalDependencies() []string

OptionalDependencies returns optional modules.

func (*ProxyModuleAdapter) Provides

func (m *ProxyModuleAdapter) Provides() []string

Provides returns the capabilities this module provides.

func (*ProxyModuleAdapter) Start

func (m *ProxyModuleAdapter) Start(ctx context.Context) error

Start begins the proxy module operation.

type ScannerModuleAdapter

type ScannerModuleAdapter struct {
	*core.BaseModule
	// contains filtered or unexported fields
}

ScannerModuleAdapter wraps the scanner package as a module.

func NewScannerModule

func NewScannerModule() *ScannerModuleAdapter

NewScannerModule creates a new scanner module adapter.

func (*ScannerModuleAdapter) GetScanner

func (m *ScannerModuleAdapter) GetScanner() *scanner.Scanner

GetScanner returns the underlying scanner.

func (*ScannerModuleAdapter) Initialize

func (m *ScannerModuleAdapter) Initialize(ctx context.Context, config core.ModuleConfig) error

Initialize prepares the scanner module.

func (*ScannerModuleAdapter) Provides

func (m *ScannerModuleAdapter) Provides() []string

Provides returns the capabilities this module provides.

func (*ScannerModuleAdapter) Start

func (m *ScannerModuleAdapter) Start(ctx context.Context) error

Start begins the scanner module operation.

type TLSModuleAdapter

type TLSModuleAdapter struct {
	*core.BaseModule
	// contains filtered or unexported fields
}

TLSModuleAdapter wraps the TLS package as a module.

func NewTLSModule

func NewTLSModule() *TLSModuleAdapter

NewTLSModule creates a new TLS module adapter.

func (*TLSModuleAdapter) GetManager

func (m *TLSModuleAdapter) GetManager() *tlspkg.Manager

GetManager returns the underlying TLS manager.

func (*TLSModuleAdapter) Initialize

func (m *TLSModuleAdapter) Initialize(ctx context.Context, config core.ModuleConfig) error

Initialize prepares the TLS module.

func (*TLSModuleAdapter) Provides

func (m *TLSModuleAdapter) Provides() []string

Provides returns the capabilities this module provides.

func (*TLSModuleAdapter) Start

func (m *TLSModuleAdapter) Start(ctx context.Context) error

Start begins the TLS module operation.

Jump to

Keyboard shortcuts

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