Documentation
¶
Index ¶
- type Config
- type E2EIntegration
- func (e *E2EIntegration) CheckPreKeyCount(userID string, threshold int) (bool, error)
- func (e *E2EIntegration) CleanupDMSession(spaceID string) error
- func (e *E2EIntegration) GetDMHandler() *handlers.DMHandler
- func (e *E2EIntegration) GetGroupHandler() *handlers.GroupHandler
- func (e *E2EIntegration) GetKeyHandler() *handlers.KeyHandler
- func (e *E2EIntegration) GetKeyStatus(w http.ResponseWriter, r *http.Request)
- func (e *E2EIntegration) GetSpaceHandler() *handlers.SpaceHandler
- func (e *E2EIntegration) GetStore() *postgres.Store
- func (e *E2EIntegration) RegisterRoutes(router *mux.Router, authMiddleware func(http.Handler) http.Handler)
- func (e *E2EIntegration) RekeyGroup(w http.ResponseWriter, r *http.Request)
- func (e *E2EIntegration) ValidateSetup() error
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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