Documentation ¶
Index ¶
- Variables
- type Bridge
- func (br *Bridge) GenerateRegistration()
- func (br *Bridge) InitVersion(tag, commit, buildTime string)
- func (br *Bridge) LogDBUpgradeErrorAndExit(name string, err error)
- func (br *Bridge) Main()
- func (br *Bridge) ManualStop(exitCode int)
- func (br *Bridge) NewBridgeStateQueue(user status.BridgeStateFiller) *BridgeStateQueue
- func (br *Bridge) PingServer() (start, serverTs, end time.Time)
- func (br *Bridge) ResendBridgeInfo()
- func (br *Bridge) SendBridgeState(ctx context.Context, state *status.BridgeState) error
- func (br *Bridge) SendGlobalBridgeState(state status.BridgeState)
- func (br *Bridge) SendMessageCheckpoint(evt *event.Event, step status.MessageCheckpointStep, err error, ...)
- func (br *Bridge) SendMessageCheckpoints(checkpoints []*status.MessageCheckpoint) error
- func (br *Bridge) SendMessageErrorCheckpoint(evt *event.Event, step status.MessageCheckpointStep, err error, permanent bool, ...)
- func (br *Bridge) SendMessageSuccessCheckpoint(evt *event.Event, step status.MessageCheckpointStep, retryNum int)
- func (br *Bridge) SendRawMessageCheckpoint(cp *status.MessageCheckpoint)
- func (br *Bridge) UpdateBotProfile()
- func (br *Bridge) WaitWebsocketConnected()
- type BridgeStateQueue
- type CSFeatureRequirer
- type ChildOverride
- type CommandProcessor
- type Crypto
- type CryptoHelper
- func (helper *CryptoHelper) Client() *mautrix.Client
- func (helper *CryptoHelper) Decrypt(evt *event.Event) (*event.Event, error)
- func (helper *CryptoHelper) Encrypt(roomID id.RoomID, evtType event.Type, content *event.Content) (err error)
- func (helper *CryptoHelper) HandleMemberEvent(evt *event.Event)
- func (helper *CryptoHelper) Init() error
- func (helper *CryptoHelper) RequestSession(roomID id.RoomID, senderKey id.SenderKey, sessionID id.SessionID, ...)
- func (helper *CryptoHelper) Reset(startAfterReset bool)
- func (helper *CryptoHelper) ResetSession(roomID id.RoomID)
- func (helper *CryptoHelper) ShareKeys(ctx context.Context) error
- func (helper *CryptoHelper) Start()
- func (helper *CryptoHelper) Stop()
- func (helper *CryptoHelper) WaitForSession(roomID id.RoomID, senderKey id.SenderKey, sessionID id.SessionID, ...) bool
- type DisappearingPortal
- type DoublePuppet
- type FlagHandlingBridge
- type Ghost
- type GhostWithProfile
- type MatrixHandler
- func (mx *MatrixHandler) HandleBotInvite(ctx context.Context, evt *event.Event)
- func (mx *MatrixHandler) HandleEncrypted(evt *event.Event)
- func (mx *MatrixHandler) HandleEncryption(evt *event.Event)
- func (mx *MatrixHandler) HandleGhostInvite(ctx context.Context, evt *event.Event, inviter User, ghost Ghost)
- func (mx *MatrixHandler) HandleMembership(evt *event.Event)
- func (mx *MatrixHandler) HandleMessage(evt *event.Event)
- func (mx *MatrixHandler) HandleReaction(evt *event.Event)
- func (mx *MatrixHandler) HandleReceipt(evt *event.Event)
- func (mx *MatrixHandler) HandleRedaction(evt *event.Event)
- func (mx *MatrixHandler) HandleRoomMetadata(evt *event.Event)
- func (mx *MatrixHandler) HandleTyping(evt *event.Event)
- type MembershipHandlingPortal
- type MetaHandlingPortal
- type Portal
- type PreInitableBridge
- type ReadReceiptHandlingPortal
- type SQLCryptoStore
- type TypingPortal
- type User
- type VersionJSONOutput
- type WebsocketStartingBridge
Constants ¶
This section is empty.
Variables ¶
View Source
var DuplicateMessageIndex = crypto.DuplicateMessageIndex
View Source
var MinSpecVersion = mautrix.SpecV11
View Source
var NoSessionFound = crypto.NoSessionFound
View Source
var UnknownMessageIndex = olm.UnknownMessageIndex
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct { Name string URL string Description string Version string ProtocolName string BeeperServiceName string BeeperNetworkName string AdditionalShortFlags string AdditionalLongFlags string VersionDesc string LinkifiedVersion string BuildTime string PublicHSAddress *url.URL AS *appservice.AppService EventProcessor *appservice.EventProcessor CommandProcessor CommandProcessor MatrixHandler *MatrixHandler Bot *appservice.IntentAPI Config bridgeconfig.BaseConfig ConfigPath string RegistrationPath string SaveConfig bool ConfigUpgrader configupgrade.BaseUpgrader DB *dbutil.Database StateStore *sqlstatestore.SQLStateStore Crypto Crypto CryptoPickleKey string // Deprecated: Switch to ZLog Log maulogger.Logger ZLog *zerolog.Logger MediaConfig mautrix.RespMediaConfig SpecVersions mautrix.RespVersions Child ChildOverride Stopping bool Websocket bool // contains filtered or unexported fields }
func (*Bridge) GenerateRegistration ¶
func (br *Bridge) GenerateRegistration()
func (*Bridge) InitVersion ¶
func (*Bridge) LogDBUpgradeErrorAndExit ¶
func (*Bridge) ManualStop ¶ added in v0.12.1
func (*Bridge) NewBridgeStateQueue ¶
func (br *Bridge) NewBridgeStateQueue(user status.BridgeStateFiller) *BridgeStateQueue
func (*Bridge) PingServer ¶ added in v0.15.3
func (*Bridge) ResendBridgeInfo ¶
func (br *Bridge) ResendBridgeInfo()
func (*Bridge) SendBridgeState ¶
func (*Bridge) SendGlobalBridgeState ¶
func (br *Bridge) SendGlobalBridgeState(state status.BridgeState)
func (*Bridge) SendMessageCheckpoint ¶
func (br *Bridge) SendMessageCheckpoint(evt *event.Event, step status.MessageCheckpointStep, err error, s status.MessageCheckpointStatus, retryNum int)
func (*Bridge) SendMessageCheckpoints ¶
func (br *Bridge) SendMessageCheckpoints(checkpoints []*status.MessageCheckpoint) error
func (*Bridge) SendMessageErrorCheckpoint ¶
func (*Bridge) SendMessageSuccessCheckpoint ¶
func (*Bridge) SendRawMessageCheckpoint ¶
func (br *Bridge) SendRawMessageCheckpoint(cp *status.MessageCheckpoint)
func (*Bridge) UpdateBotProfile ¶
func (br *Bridge) UpdateBotProfile()
func (*Bridge) WaitWebsocketConnected ¶ added in v0.15.3
func (br *Bridge) WaitWebsocketConnected()
type BridgeStateQueue ¶
type BridgeStateQueue struct {
// contains filtered or unexported fields
}
func (*BridgeStateQueue) GetPrev ¶
func (bsq *BridgeStateQueue) GetPrev() status.BridgeState
func (*BridgeStateQueue) Send ¶
func (bsq *BridgeStateQueue) Send(state status.BridgeState)
func (*BridgeStateQueue) SetPrev ¶
func (bsq *BridgeStateQueue) SetPrev(prev status.BridgeState)
type CSFeatureRequirer ¶
type CSFeatureRequirer interface {
CheckFeatures(versions *mautrix.RespVersions) (string, bool)
}
type ChildOverride ¶
type CommandProcessor ¶
type Crypto ¶
type Crypto interface { HandleMemberEvent(*event.Event) Decrypt(*event.Event) (*event.Event, error) Encrypt(id.RoomID, event.Type, *event.Content) error WaitForSession(id.RoomID, id.SenderKey, id.SessionID, time.Duration) bool RequestSession(id.RoomID, id.SenderKey, id.SessionID, id.UserID, id.DeviceID) ResetSession(id.RoomID) Init() error Start() Stop() Reset(startAfterReset bool) Client() *mautrix.Client }
func NewCryptoHelper ¶
type CryptoHelper ¶
type CryptoHelper struct {
// contains filtered or unexported fields
}
func (*CryptoHelper) Client ¶
func (helper *CryptoHelper) Client() *mautrix.Client
func (*CryptoHelper) HandleMemberEvent ¶
func (helper *CryptoHelper) HandleMemberEvent(evt *event.Event)
func (*CryptoHelper) Init ¶
func (helper *CryptoHelper) Init() error
func (*CryptoHelper) RequestSession ¶
func (*CryptoHelper) Reset ¶
func (helper *CryptoHelper) Reset(startAfterReset bool)
func (*CryptoHelper) ResetSession ¶
func (helper *CryptoHelper) ResetSession(roomID id.RoomID)
func (*CryptoHelper) ShareKeys ¶ added in v0.16.0
func (helper *CryptoHelper) ShareKeys(ctx context.Context) error
ShareKeys uploads the given number of one-time-keys to the server.
func (*CryptoHelper) Start ¶
func (helper *CryptoHelper) Start()
func (*CryptoHelper) Stop ¶
func (helper *CryptoHelper) Stop()
type DisappearingPortal ¶
type DisappearingPortal interface { Portal ScheduleDisappearing() }
type DoublePuppet ¶
type FlagHandlingBridge ¶
type FlagHandlingBridge interface { ChildOverride HandleFlags() bool }
type Ghost ¶
type Ghost interface { DoublePuppet DefaultIntent() *appservice.IntentAPI GetMXID() id.UserID }
type GhostWithProfile ¶
type GhostWithProfile interface { Ghost GetDisplayname() string GetAvatarURL() id.ContentURI }
type MatrixHandler ¶
type MatrixHandler struct { TrackEventDuration func(event.Type) func() // contains filtered or unexported fields }
func NewMatrixHandler ¶
func NewMatrixHandler(br *Bridge) *MatrixHandler
func (*MatrixHandler) HandleBotInvite ¶
func (mx *MatrixHandler) HandleBotInvite(ctx context.Context, evt *event.Event)
func (*MatrixHandler) HandleEncrypted ¶
func (mx *MatrixHandler) HandleEncrypted(evt *event.Event)
func (*MatrixHandler) HandleEncryption ¶
func (mx *MatrixHandler) HandleEncryption(evt *event.Event)
func (*MatrixHandler) HandleGhostInvite ¶
func (*MatrixHandler) HandleMembership ¶
func (mx *MatrixHandler) HandleMembership(evt *event.Event)
func (*MatrixHandler) HandleMessage ¶
func (mx *MatrixHandler) HandleMessage(evt *event.Event)
func (*MatrixHandler) HandleReaction ¶
func (mx *MatrixHandler) HandleReaction(evt *event.Event)
func (*MatrixHandler) HandleReceipt ¶
func (mx *MatrixHandler) HandleReceipt(evt *event.Event)
func (*MatrixHandler) HandleRedaction ¶
func (mx *MatrixHandler) HandleRedaction(evt *event.Event)
func (*MatrixHandler) HandleRoomMetadata ¶
func (mx *MatrixHandler) HandleRoomMetadata(evt *event.Event)
func (*MatrixHandler) HandleTyping ¶
func (mx *MatrixHandler) HandleTyping(evt *event.Event)
type MetaHandlingPortal ¶
type PreInitableBridge ¶
type PreInitableBridge interface { ChildOverride PreInit() }
type SQLCryptoStore ¶
type SQLCryptoStore struct { *crypto.SQLCryptoStore UserID id.UserID GhostIDFormat string }
func NewSQLCryptoStore ¶
func NewSQLCryptoStore(db *dbutil.Database, log dbutil.DatabaseLogger, userID id.UserID, ghostIDFormat, pickleKey string) *SQLCryptoStore
func (*SQLCryptoStore) GetRoomJoinedOrInvitedMembers ¶ added in v0.15.0
type TypingPortal ¶
type User ¶
type User interface { GetPermissionLevel() bridgeconfig.PermissionLevel IsLoggedIn() bool GetManagementRoomID() id.RoomID SetManagementRoom(id.RoomID) GetMXID() id.UserID GetIDoublePuppet() DoublePuppet GetIGhost() Ghost }
type VersionJSONOutput ¶ added in v0.16.0
type WebsocketStartingBridge ¶ added in v0.15.3
type WebsocketStartingBridge interface { ChildOverride OnWebsocketConnect() }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.