Documentation ¶
Index ¶
- type BridgeConfig
- func (bc BridgeConfig) EnableCommunities() bool
- func (bc BridgeConfig) EnableSpaces() bool
- func (bc BridgeConfig) FormatCommunity(localpart, server string) string
- func (bc BridgeConfig) FormatDisplayname(contact pulsesms.Contact) (string, int8)
- func (bc BridgeConfig) FormatSpace(localpart, server string) string
- func (bc BridgeConfig) FormatUsername(userID string) string
- func (bc *BridgeConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
- type CommunityTemplateArgs
- type Config
- func (config *Config) CanDoublePuppet(userID id.UserID) bool
- func (config *Config) GetRegistration() (*appservice.Registration, error)
- func (config *Config) MakeAppService() (*appservice.AppService, error)
- func (config *Config) NewRegistration() (*appservice.Registration, error)
- func (config *Config) Save(path string) error
- type PermissionConfig
- func (pc PermissionConfig) GetPermissionLevel(userID id.UserID) PermissionLevel
- func (pc PermissionConfig) IsAdmin(userID id.UserID) bool
- func (pc PermissionConfig) IsRelaybotWhitelisted(userID id.UserID) bool
- func (pc PermissionConfig) IsWhitelisted(userID id.UserID) bool
- func (pc *PermissionConfig) MarshalYAML() (interface{}, error)
- func (pc *PermissionConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
- type PermissionLevel
- type RelaybotConfig
- type Sender
- type SpaceTemplateArgs
- type UsernameTemplateArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BridgeConfig ¶
type BridgeConfig struct { UsernameTemplate string `yaml:"username_template"` DisplaynameTemplate string `yaml:"displayname_template"` CommunityTemplate string `yaml:"community_template"` SpaceTemplate string `yaml:"space_template"` ConnectionTimeout int `yaml:"connection_timeout"` FetchMessageOnTimeout bool `yaml:"fetch_message_on_timeout"` DeliveryReceipts bool `yaml:"delivery_receipts"` MaxConnectionAttempts int `yaml:"max_connection_attempts"` ConnectionRetryDelay int `yaml:"connection_retry_delay"` ReportConnectionRetry bool `yaml:"report_connection_retry"` AggressiveReconnect bool `yaml:"aggressive_reconnect"` ChatListWait int `yaml:"chat_list_wait"` PortalSyncWait int `yaml:"portal_sync_wait"` UserMessageBuffer int `yaml:"user_message_buffer"` PortalMessageBuffer int `yaml:"portal_message_buffer"` CallNotices struct { Start bool `yaml:"start"` End bool `yaml:"end"` } `yaml:"call_notices"` InitialChatSync int `yaml:"initial_chat_sync_count"` InitialHistoryFill int `yaml:"initial_history_fill_count"` HistoryDisableNotifs bool `yaml:"initial_history_disable_notifications"` RecoverChatSync int `yaml:"recovery_chat_sync_count"` RecoverHistory bool `yaml:"recovery_history_backfill"` ChatMetaSync bool `yaml:"chat_meta_sync"` UserAvatarSync bool `yaml:"user_avatar_sync"` BridgeMatrixLeave bool `yaml:"bridge_matrix_leave"` SyncChatMaxAge int64 `yaml:"sync_max_chat_age"` SyncWithCustomPuppets bool `yaml:"sync_with_custom_puppets"` SyncDirectChatList bool `yaml:"sync_direct_chat_list"` DefaultBridgeReceipts bool `yaml:"default_bridge_receipts"` DefaultBridgePresence bool `yaml:"default_bridge_presence"` InviteOwnPuppetForBackfilling bool `yaml:"invite_own_puppet_for_backfilling"` PrivateChatPortalMeta bool `yaml:"private_chat_portal_meta"` BridgeNotices bool `yaml:"bridge_notices"` ResendBridgeInfo bool `yaml:"resend_bridge_info"` MuteBridging bool `yaml:"mute_bridging"` ArchiveTag string `yaml:"archive_tag"` PinnedTag string `yaml:"pinned_tag"` TagOnlyOnCreate bool `yaml:"tag_only_on_create"` MarkReadOnlyOnCreate bool `yaml:"mark_read_only_on_create"` WhatsappThumbnail bool `yaml:"whatsapp_thumbnail"` AllowUserInvite bool `yaml:"allow_user_invite"` CommandPrefix string `yaml:"command_prefix"` Encryption struct { Allow bool `yaml:"allow"` Default bool `yaml:"default"` KeySharing struct { Allow bool `yaml:"allow"` RequireCrossSigning bool `yaml:"require_cross_signing"` RequireVerification bool `yaml:"require_verification"` } `yaml:"key_sharing"` } `yaml:"encryption"` Permissions PermissionConfig `yaml:"permissions"` Relaybot RelaybotConfig `yaml:"relaybot"` // contains filtered or unexported fields }
func (BridgeConfig) EnableCommunities ¶
func (bc BridgeConfig) EnableCommunities() bool
func (BridgeConfig) EnableSpaces ¶
func (bc BridgeConfig) EnableSpaces() bool
func (BridgeConfig) FormatCommunity ¶
func (bc BridgeConfig) FormatCommunity(localpart, server string) string
func (BridgeConfig) FormatDisplayname ¶
func (bc BridgeConfig) FormatDisplayname(contact pulsesms.Contact) (string, int8)
func (BridgeConfig) FormatSpace ¶
func (bc BridgeConfig) FormatSpace(localpart, server string) string
func (BridgeConfig) FormatUsername ¶
func (bc BridgeConfig) FormatUsername(userID string) string
func (*BridgeConfig) UnmarshalYAML ¶
func (bc *BridgeConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type CommunityTemplateArgs ¶
type Config ¶
type Config struct { Homeserver struct { Address string `yaml:"address"` Domain string `yaml:"domain"` Asmux bool `yaml:"asmux"` } `yaml:"homeserver"` AppService struct { Address string `yaml:"address"` Hostname string `yaml:"hostname"` Port uint16 `yaml:"port"` Database struct { Type string `yaml:"type"` URI string `yaml:"uri"` MaxOpenConns int `yaml:"max_open_conns"` MaxIdleConns int `yaml:"max_idle_conns"` } `yaml:"database"` StateStore string `yaml:"state_store_path,omitempty"` Provisioning struct { Prefix string `yaml:"prefix"` SharedSecret string `yaml:"shared_secret"` } `yaml:"provisioning"` ID string `yaml:"id"` Bot struct { Username string `yaml:"username"` Displayname string `yaml:"displayname"` Avatar string `yaml:"avatar"` } `yaml:"bot"` ASToken string `yaml:"as_token"` HSToken string `yaml:"hs_token"` } `yaml:"appservice"` Metrics struct { Enabled bool `yaml:"enabled"` Listen string `yaml:"listen"` } `yaml:"metrics"` WhatsApp struct { OSName string `yaml:"os_name"` BrowserName string `yaml:"browser_name"` } `yaml:"whatsapp"` Bridge BridgeConfig `yaml:"bridge"` Logging appservice.LogConfig `yaml:"logging"` }
func (*Config) GetRegistration ¶
func (config *Config) GetRegistration() (*appservice.Registration, error)
func (*Config) MakeAppService ¶
func (config *Config) MakeAppService() (*appservice.AppService, error)
func (*Config) NewRegistration ¶
func (config *Config) NewRegistration() (*appservice.Registration, error)
type PermissionConfig ¶
type PermissionConfig map[string]PermissionLevel
func (PermissionConfig) GetPermissionLevel ¶
func (pc PermissionConfig) GetPermissionLevel(userID id.UserID) PermissionLevel
func (PermissionConfig) IsRelaybotWhitelisted ¶
func (pc PermissionConfig) IsRelaybotWhitelisted(userID id.UserID) bool
func (PermissionConfig) IsWhitelisted ¶
func (pc PermissionConfig) IsWhitelisted(userID id.UserID) bool
func (*PermissionConfig) MarshalYAML ¶
func (pc *PermissionConfig) MarshalYAML() (interface{}, error)
func (*PermissionConfig) UnmarshalYAML ¶
func (pc *PermissionConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type PermissionLevel ¶
type PermissionLevel int
const ( PermissionLevelDefault PermissionLevel = 0 PermissionLevelRelaybot PermissionLevel = 5 PermissionLevelUser PermissionLevel = 10 PermissionLevelAdmin PermissionLevel = 100 )
type RelaybotConfig ¶
type RelaybotConfig struct { Enabled bool `yaml:"enabled"` ManagementRoom id.RoomID `yaml:"management"` InviteUsers []id.UserID `yaml:"invites"` MessageFormats map[event.MessageType]string `yaml:"message_formats"` // contains filtered or unexported fields }
func (*RelaybotConfig) FormatMessage ¶
func (rc *RelaybotConfig) FormatMessage(content *event.MessageEventContent, sender id.UserID, member *event.MemberEventContent) (string, error)
func (*RelaybotConfig) UnmarshalYAML ¶
func (rc *RelaybotConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type SpaceTemplateArgs ¶
type UsernameTemplateArgs ¶
Click to show internal directories.
Click to hide internal directories.