Documentation
¶
Index ¶
- type SQLiteConfig
- type SQLiteHook
- func (h *SQLiteHook) GetStoredSessions() (map[string]*bridge.SessionInfo, error)
- func (h *SQLiteHook) ID() string
- func (h *SQLiteHook) Init(config any) error
- func (h *SQLiteHook) OnSessionCreated(session *bridge.SessionInfo) error
- func (h *SQLiteHook) OnSessionDisconnected(session *bridge.SessionInfo) error
- func (h *SQLiteHook) OnSessionResumed(session *bridge.SessionInfo) error
- func (h *SQLiteHook) OnSessionSuspended(session *bridge.SessionInfo) error
- func (h *SQLiteHook) Provides(b byte) bool
- func (h *SQLiteHook) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLiteConfig ¶
type SQLiteConfig struct {
DBPath string // Path to SQLite database file
}
SQLiteConfig holds configuration for SQLite hook
type SQLiteHook ¶
type SQLiteHook struct {
bridge.BridgeHookBase
// contains filtered or unexported fields
}
SQLiteHook implements BridgeHook interface to provide session persistence
func NewSQLiteHook ¶
func NewSQLiteHook(logger *zap.Logger) *SQLiteHook
NewSQLiteHook creates a new SQLiteHook instance
func (*SQLiteHook) GetStoredSessions ¶
func (h *SQLiteHook) GetStoredSessions() (map[string]*bridge.SessionInfo, error)
GetStoredSessions implements the SessionStore interface to retrieve all stored sessions
func (*SQLiteHook) ID ¶
func (h *SQLiteHook) ID() string
ID returns the unique identifier for this hook
func (*SQLiteHook) Init ¶
func (h *SQLiteHook) Init(config any) error
Init initializes the hook with the provided configuration
func (*SQLiteHook) OnSessionCreated ¶
func (h *SQLiteHook) OnSessionCreated(session *bridge.SessionInfo) error
OnSessionCreated handles new session creation
func (*SQLiteHook) OnSessionDisconnected ¶
func (h *SQLiteHook) OnSessionDisconnected(session *bridge.SessionInfo) error
OnSessionDisconnected handles session disconnection
func (*SQLiteHook) OnSessionResumed ¶
func (h *SQLiteHook) OnSessionResumed(session *bridge.SessionInfo) error
OnSessionResumed handles session resumption
func (*SQLiteHook) OnSessionSuspended ¶
func (h *SQLiteHook) OnSessionSuspended(session *bridge.SessionInfo) error
OnSessionSuspended handles session suspension
func (*SQLiteHook) Provides ¶
func (h *SQLiteHook) Provides(b byte) bool
Provides indicates whether this hook provides the specified functionality
Click to show internal directories.
Click to hide internal directories.