Versions in this module Expand all Collapse all v0 v0.0.10 Apr 10, 2026 v0.0.9 Mar 17, 2026 Changes in this version + type AuditServiceImpl struct + EventBuffer *EventBufferConfig + MinIO *MinIOConfig + func (i *AuditServiceImpl) CloseConnection(ctx context.Context, event *audit.ConnectionCloseEvent) error + func (i *AuditServiceImpl) GetObjectStorage() audit.ObjectStorage + func (i *AuditServiceImpl) GetSession(ctx context.Context, req *audit.GetSessionRequest) (*audit.Session, error) + func (i *AuditServiceImpl) GetSessionReplay(ctx context.Context, req *audit.GetSessionReplayRequest) (*audit.SessionReplay, error) + func (i *AuditServiceImpl) Init() error + func (i *AuditServiceImpl) Name() string + func (i *AuditServiceImpl) Priority() int + func (i *AuditServiceImpl) QuerySessions(ctx context.Context, req *audit.QuerySessionRequest) (*audit.SessionSet, error) + func (i *AuditServiceImpl) RecordConnection(ctx context.Context, event *audit.ConnectionEvent) error + func (i *AuditServiceImpl) RecordDataFlow(ctx context.Context, event *audit.DataFlowEvent) error + func (i *AuditServiceImpl) RecordEvent(ctx context.Context, event *audit.OperationEvent) error + type EventBuffer struct + func NewEventBuffer(storage StorageAdapter, cfg *EventBufferConfig) *EventBuffer + func (b *EventBuffer) Close() error + func (b *EventBuffer) Flush() error + func (b *EventBuffer) Stats() map[string]interface{} + func (b *EventBuffer) Stop() + func (b *EventBuffer) Write(event *audit.OperationEvent) error + type EventBufferConfig struct + BatchSize int + Enabled bool + FlushInterval int + Size int + func DefaultEventBufferConfig() *EventBufferConfig + type MinIOConfig struct + AccessKey string + Bucket string + Endpoint string + SecretKey string + UseSSL bool + func DefaultMinIOConfig() *MinIOConfig + type MinIOStorage struct + func NewMinIOStorage(cfg *MinIOConfig) (*MinIOStorage, error) + func (s *MinIOStorage) BatchDownload(ctx context.Context, paths []string, destDir string) error + func (s *MinIOStorage) Delete(ctx context.Context, path string) error + func (s *MinIOStorage) DeleteRecording(ctx context.Context, path string) error + func (s *MinIOStorage) Download(ctx context.Context, path string) ([]byte, error) + func (s *MinIOStorage) DownloadRecording(ctx context.Context, path string) (io.ReadCloser, error) + func (s *MinIOStorage) Exists(ctx context.Context, path string) (bool, error) + func (s *MinIOStorage) FileExists(ctx context.Context, path string) (bool, error) + func (s *MinIOStorage) GetPresignedURL(ctx context.Context, path string, expiry int) (string, error) + func (s *MinIOStorage) GetURL(ctx context.Context, path string, expiry time.Duration) (string, error) + func (s *MinIOStorage) ListObjectsWithPrefix(ctx context.Context, prefix string) ([]string, error) + func (s *MinIOStorage) Upload(ctx context.Context, path string, data io.Reader) error + func (s *MinIOStorage) UploadRecording(ctx context.Context, path string, data io.Reader, contentType string) error + type MySQLStorage struct + func NewMySQLStorage() *MySQLStorage + func (s *MySQLStorage) BatchSaveEvents(ctx context.Context, events []*audit.OperationEvent) error + func (s *MySQLStorage) GetSession(ctx context.Context, id string) (*audit.Session, error) + func (s *MySQLStorage) QueryEvents(ctx context.Context, sessionID string) ([]*audit.OperationEvent, error) + func (s *MySQLStorage) QuerySessions(ctx context.Context, req *audit.QuerySessionRequest) (*audit.SessionSet, error) + func (s *MySQLStorage) SaveEvent(ctx context.Context, event *audit.OperationEvent) error + func (s *MySQLStorage) SaveSession(ctx context.Context, session *audit.Session) error + func (s *MySQLStorage) UpdateSession(ctx context.Context, session *audit.Session) error + type ObjectStorage interface + DeleteRecording func(ctx context.Context, path string) error + DownloadRecording func(ctx context.Context, path string) (io.ReadCloser, error) + FileExists func(ctx context.Context, path string) (bool, error) + GetPresignedURL func(ctx context.Context, path string, expiry int) (string, error) + UploadRecording func(ctx context.Context, path string, data io.Reader, contentType string) error + type StorageAdapter interface + BatchSaveEvents func(ctx context.Context, events []*audit.OperationEvent) error + GetSession func(ctx context.Context, id string) (*audit.Session, error) + QueryEvents func(ctx context.Context, sessionID string) ([]*audit.OperationEvent, error) + QuerySessions func(ctx context.Context, req *audit.QuerySessionRequest) (*audit.SessionSet, error) + SaveEvent func(ctx context.Context, event *audit.OperationEvent) error + SaveSession func(ctx context.Context, session *audit.Session) error + UpdateSession func(ctx context.Context, session *audit.Session) error