Documentation ¶
Index ¶
- Variables
- type BanHandlingPortal
- 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(ctx context.Context)
- func (br *Bridge) WaitWebsocketConnected()
- type BridgeStateQueue
- type CSFeatureRequirer
- type ChildOverride
- type CommandProcessor
- type ConfigValidatingBridge
- type Crypto
- type CryptoHelper
- func (helper *CryptoHelper) Client() *mautrix.Client
- func (helper *CryptoHelper) Decrypt(ctx context.Context, evt *event.Event) (*event.Event, error)
- func (helper *CryptoHelper) Encrypt(ctx context.Context, roomID id.RoomID, evtType event.Type, ...) (err error)
- func (helper *CryptoHelper) HandleMemberEvent(ctx context.Context, evt *event.Event)
- func (helper *CryptoHelper) Init(ctx context.Context) error
- func (helper *CryptoHelper) RequestSession(ctx context.Context, roomID id.RoomID, senderKey id.SenderKey, ...)
- func (helper *CryptoHelper) Reset(ctx context.Context, startAfterReset bool)
- func (helper *CryptoHelper) ResetSession(ctx context.Context, roomID id.RoomID)
- func (helper *CryptoHelper) ShareKeys(ctx context.Context) error
- func (helper *CryptoHelper) Start()
- func (helper *CryptoHelper) Stop()
- func (helper *CryptoHelper) WaitForSession(ctx context.Context, roomID id.RoomID, senderKey id.SenderKey, ...) bool
- type DisappearingPortal
- type DoublePuppet
- type FlagHandlingBridge
- type Ghost
- type GhostWithProfile
- type InviteHandlingPortal
- type JoinRuleHandlingPortal
- type KnockHandlingPortal
- type MatrixHandler
- func (mx *MatrixHandler) HandleBotInvite(ctx context.Context, evt *event.Event)
- func (mx *MatrixHandler) HandleEncrypted(ctx context.Context, evt *event.Event)
- func (mx *MatrixHandler) HandleEncryption(ctx context.Context, evt *event.Event)
- func (mx *MatrixHandler) HandleGhostInvite(ctx context.Context, evt *event.Event, inviter User, ghost Ghost)
- func (mx *MatrixHandler) HandleJoinRule(_ context.Context, evt *event.Event)
- func (mx *MatrixHandler) HandleMembership(ctx context.Context, evt *event.Event)
- func (mx *MatrixHandler) HandleMessage(ctx context.Context, evt *event.Event)
- func (mx *MatrixHandler) HandlePowerLevels(_ context.Context, evt *event.Event)
- func (mx *MatrixHandler) HandleReaction(_ context.Context, evt *event.Event)
- func (mx *MatrixHandler) HandleReceipt(_ context.Context, evt *event.Event)
- func (mx *MatrixHandler) HandleRedaction(_ context.Context, evt *event.Event)
- func (mx *MatrixHandler) HandleRoomMetadata(ctx context.Context, evt *event.Event)
- func (mx *MatrixHandler) HandleTyping(_ context.Context, evt *event.Event)
- type MembershipHandlingPortal
- type MetaHandlingPortal
- type Portal
- type PowerLevelHandlingPortal
- type PreInitableBridge
- type ReadReceiptHandlingPortal
- type SQLCryptoStore
- type TypingPortal
- type User
- type VersionJSONOutput
- type WebsocketStartingBridge
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMismatchingMXID = errors.New("whoami result does not match custom mxid") ErrNoAccessToken = errors.New("no access token provided") ErrNoMXID = errors.New("no mxid provided") )
View Source
var DuplicateMessageIndex = crypto.DuplicateMessageIndex
View Source
var MinSpecVersion = mautrix.SpecV14
View Source
var NoSessionFound = crypto.NoSessionFound
View Source
var UnknownMessageIndex = olm.UnknownMessageIndex
Functions ¶
This section is empty.
Types ¶
type BanHandlingPortal ¶ added in v0.18.1
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 DoublePuppet *doublePuppetUtil 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 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 ¶
func (*Bridge) NewBridgeStateQueue ¶
func (br *Bridge) NewBridgeStateQueue(user status.BridgeStateFiller) *BridgeStateQueue
func (*Bridge) PingServer ¶
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 (*Bridge) WaitWebsocketConnected ¶
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 ChildOverride ¶
type CommandProcessor ¶
type ConfigValidatingBridge ¶ added in v0.18.1
type ConfigValidatingBridge interface { ChildOverride ValidateConfig() error }
type Crypto ¶
type Crypto interface { HandleMemberEvent(context.Context, *event.Event) Decrypt(context.Context, *event.Event) (*event.Event, error) Encrypt(context.Context, id.RoomID, event.Type, *event.Content) error WaitForSession(context.Context, id.RoomID, id.SenderKey, id.SessionID, time.Duration) bool RequestSession(context.Context, id.RoomID, id.SenderKey, id.SessionID, id.UserID, id.DeviceID) ResetSession(context.Context, id.RoomID) Init(ctx context.Context) error Start() Stop() Reset(ctx context.Context, 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(ctx context.Context, evt *event.Event)
func (*CryptoHelper) RequestSession ¶
func (*CryptoHelper) Reset ¶
func (helper *CryptoHelper) Reset(ctx context.Context, startAfterReset bool)
func (*CryptoHelper) ResetSession ¶
func (helper *CryptoHelper) ResetSession(ctx context.Context, roomID id.RoomID)
func (*CryptoHelper) ShareKeys ¶
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 InviteHandlingPortal ¶ added in v0.18.1
type JoinRuleHandlingPortal ¶ added in v0.18.1
type KnockHandlingPortal ¶ added in v0.18.1
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(ctx context.Context, evt *event.Event)
func (*MatrixHandler) HandleEncryption ¶
func (mx *MatrixHandler) HandleEncryption(ctx context.Context, evt *event.Event)
func (*MatrixHandler) HandleGhostInvite ¶
func (*MatrixHandler) HandleJoinRule ¶ added in v0.18.1
func (mx *MatrixHandler) HandleJoinRule(_ context.Context, evt *event.Event)
func (*MatrixHandler) HandleMembership ¶
func (mx *MatrixHandler) HandleMembership(ctx context.Context, evt *event.Event)
func (*MatrixHandler) HandleMessage ¶
func (mx *MatrixHandler) HandleMessage(ctx context.Context, evt *event.Event)
func (*MatrixHandler) HandlePowerLevels ¶ added in v0.18.1
func (mx *MatrixHandler) HandlePowerLevels(_ context.Context, evt *event.Event)
func (*MatrixHandler) HandleReaction ¶
func (mx *MatrixHandler) HandleReaction(_ context.Context, evt *event.Event)
func (*MatrixHandler) HandleReceipt ¶
func (mx *MatrixHandler) HandleReceipt(_ context.Context, evt *event.Event)
func (*MatrixHandler) HandleRedaction ¶
func (mx *MatrixHandler) HandleRedaction(_ context.Context, evt *event.Event)
func (*MatrixHandler) HandleRoomMetadata ¶
func (mx *MatrixHandler) HandleRoomMetadata(ctx context.Context, evt *event.Event)
func (*MatrixHandler) HandleTyping ¶
func (mx *MatrixHandler) HandleTyping(_ context.Context, evt *event.Event)
type MetaHandlingPortal ¶
type PowerLevelHandlingPortal ¶ added in v0.18.1
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 ¶
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 ¶
type WebsocketStartingBridge ¶
type WebsocketStartingBridge interface { ChildOverride OnWebsocketConnect() }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.