integration

package
v0.0.0-...-707b42e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB        *sql.DB
	Redis     *redis.Client
	JWTSecret string
	JWTIssuer string
}

Config holds configuration for the E2E integration

type E2EIntegration

type E2EIntegration struct {
	// contains filtered or unexported fields
}

E2EIntegration provides E2E encryption functionality as a plugin for efchat

func NewE2EIntegration

func NewE2EIntegration(config *Config) (*E2EIntegration, error)

NewE2EIntegration creates a new E2E integration that can be embedded into efchat

func (*E2EIntegration) CheckPreKeyCount

func (e *E2EIntegration) CheckPreKeyCount(userID string, threshold int) (bool, error)

CheckPreKeyCount checks if a user needs to replenish their one-time prekeys

func (*E2EIntegration) CleanupDMSession

func (e *E2EIntegration) CleanupDMSession(spaceID string) error

CleanupDMSession removes all E2E session data for a DM space

func (*E2EIntegration) GetDMHandler

func (e *E2EIntegration) GetDMHandler() *handlers.DMHandler

func (*E2EIntegration) GetGroupHandler

func (e *E2EIntegration) GetGroupHandler() *handlers.GroupHandler

func (*E2EIntegration) GetKeyHandler

func (e *E2EIntegration) GetKeyHandler() *handlers.KeyHandler

Handler getters for bridge integration

func (*E2EIntegration) GetKeyStatus

func (e *E2EIntegration) GetKeyStatus(w http.ResponseWriter, r *http.Request)

GetKeyStatus returns the current key status for a user

func (*E2EIntegration) GetSpaceHandler

func (e *E2EIntegration) GetSpaceHandler() *handlers.SpaceHandler

func (*E2EIntegration) GetStore

func (e *E2EIntegration) GetStore() *postgres.Store

GetStore returns the underlying storage implementation

func (*E2EIntegration) RegisterRoutes

func (e *E2EIntegration) RegisterRoutes(router *mux.Router, authMiddleware func(http.Handler) http.Handler)

RegisterRoutes adds E2E routes to an existing router If authMiddleware is nil, it will use the built-in JWT validation

func (*E2EIntegration) RekeyGroup

func (e *E2EIntegration) RekeyGroup(w http.ResponseWriter, r *http.Request)

func (*E2EIntegration) ValidateSetup

func (e *E2EIntegration) ValidateSetup() error

ValidateSetup checks if the E2E module is properly configured

type ValidationError

type ValidationError struct {
	Message string
}

ValidationError represents a configuration validation error

func (*ValidationError) Error

func (e *ValidationError) Error() string

Jump to

Keyboard shortcuts

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