Documentation
¶
Index ¶
- Variables
- func DoUpgrade(helper *up.Helper)
- type BridgeConfig
- func (bc *BridgeConfig) EnableMessageErrorNotices() bool
- func (bc *BridgeConfig) EnableMessageStatusEvents() bool
- func (bc BridgeConfig) FormatDisplayname(contact *types.Contact) string
- func (bc BridgeConfig) FormatUsername(userID string) string
- func (bc BridgeConfig) GetCommandPrefix() string
- func (bc BridgeConfig) GetDoublePuppetConfig() bridgeconfig.DoublePuppetConfig
- func (bc BridgeConfig) GetEncryptionConfig() bridgeconfig.EncryptionConfig
- func (bc BridgeConfig) GetManagementRoomTexts() bridgeconfig.ManagementRoomTexts
- func (bc *BridgeConfig) GetResendBridgeInfo() bool
- func (bc *BridgeConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (bc *BridgeConfig) Validate() error
- type Config
- type DisplaynameParams
- type RelaybotConfig
- type Sender
Constants ¶
This section is empty.
Variables ¶
View Source
var SpacedBlocks = [][]string{
{"homeserver", "software"},
{"appservice"},
{"appservice", "hostname"},
{"appservice", "database"},
{"appservice", "id"},
{"appservice", "as_token"},
{"metrics"},
{"signal"},
{"bridge"},
{"bridge", "personal_filtering_spaces"},
{"bridge", "command_prefix"},
{"bridge", "management_room_text"},
{"bridge", "encryption"},
{"bridge", "provisioning"},
{"bridge", "permissions"},
{"bridge", "limits"},
{"logging"},
}
Functions ¶
Types ¶
type BridgeConfig ¶
type BridgeConfig struct {
UsernameTemplate string `yaml:"username_template"`
DisplaynameTemplate string `yaml:"displayname_template"`
PrivateChatPortalMeta string `yaml:"private_chat_portal_meta"`
UseContactAvatars bool `yaml:"use_contact_avatars"`
UseOutdatedProfiles bool `yaml:"use_outdated_profiles"`
NumberInTopic bool `yaml:"number_in_topic"`
NoteToSelfAvatar id.ContentURIString `yaml:"note_to_self_avatar"`
PortalMessageBuffer int `yaml:"portal_message_buffer"`
PersonalFilteringSpaces bool `yaml:"personal_filtering_spaces"`
BridgeNotices bool `yaml:"bridge_notices"`
DeliveryReceipts bool `yaml:"delivery_receipts"`
MessageStatusEvents bool `yaml:"message_status_events"`
MessageErrorNotices bool `yaml:"message_error_notices"`
SyncDirectChatList bool `yaml:"sync_direct_chat_list"`
ResendBridgeInfo bool `yaml:"resend_bridge_info"`
PublicPortals bool `yaml:"public_portals"`
CaptionInMessage bool `yaml:"caption_in_message"`
FederateRooms bool `yaml:"federate_rooms"`
DoublePuppetConfig bridgeconfig.DoublePuppetConfig `yaml:",inline"`
MessageHandlingTimeout struct {
ErrorAfterStr string `yaml:"error_after"`
DeadlineStr string `yaml:"deadline"`
ErrorAfter time.Duration `yaml:"-"`
Deadline time.Duration `yaml:"-"`
} `yaml:"message_handling_timeout"`
CommandPrefix string `yaml:"command_prefix"`
ManagementRoomText bridgeconfig.ManagementRoomTexts `yaml:"management_room_text"`
Encryption bridgeconfig.EncryptionConfig `yaml:"encryption"`
Provisioning struct {
Prefix string `yaml:"prefix"`
SharedSecret string `yaml:"shared_secret"`
DebugEndpoints bool `yaml:"debug_endpoints"`
} `yaml:"provisioning"`
Permissions bridgeconfig.PermissionConfig `yaml:"permissions"`
Relay RelaybotConfig `yaml:"relay"`
Limits struct {
MaxPuppetLimit uint `yaml:"max_puppet_limit"`
MinPuppetActivityDays uint `yaml:"min_puppet_activity_days"`
PuppetInactivityDays *uint `yaml:"puppet_inactivity_days"`
BlockOnLimitReached bool `yaml:"block_on_limit_reached"`
BlockBeginsNotification string `yaml:"block_begins_notification"`
BlockEndsNotification string `yaml:"block_ends_notification"`
BlockNotificationIntervalSeconds uint `yaml:"block_notification_interval_seconds"`
} `yaml:"limits"`
// contains filtered or unexported fields
}
func (*BridgeConfig) EnableMessageErrorNotices ¶
func (bc *BridgeConfig) EnableMessageErrorNotices() bool
func (*BridgeConfig) EnableMessageStatusEvents ¶
func (bc *BridgeConfig) EnableMessageStatusEvents() bool
func (BridgeConfig) FormatDisplayname ¶
func (bc BridgeConfig) FormatDisplayname(contact *types.Contact) string
func (BridgeConfig) FormatUsername ¶
func (bc BridgeConfig) FormatUsername(userID string) string
func (BridgeConfig) GetCommandPrefix ¶
func (bc BridgeConfig) GetCommandPrefix() string
func (BridgeConfig) GetDoublePuppetConfig ¶
func (bc BridgeConfig) GetDoublePuppetConfig() bridgeconfig.DoublePuppetConfig
func (BridgeConfig) GetEncryptionConfig ¶
func (bc BridgeConfig) GetEncryptionConfig() bridgeconfig.EncryptionConfig
func (BridgeConfig) GetManagementRoomTexts ¶
func (bc BridgeConfig) GetManagementRoomTexts() bridgeconfig.ManagementRoomTexts
func (*BridgeConfig) GetResendBridgeInfo ¶
func (bc *BridgeConfig) GetResendBridgeInfo() bool
func (*BridgeConfig) UnmarshalYAML ¶
func (bc *BridgeConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
func (*BridgeConfig) Validate ¶
func (bc *BridgeConfig) Validate() error
type Config ¶
type Config struct {
*bridgeconfig.BaseConfig `yaml:",inline"`
Metrics struct {
Enabled bool `yaml:"enabled"`
Listen string `yaml:"listen"`
} `yaml:"metrics"`
Signal struct {
DeviceName string `yaml:"device_name"`
} `yaml:"signal"`
Bridge BridgeConfig `yaml:"bridge"`
}
type DisplaynameParams ¶
type RelaybotConfig ¶
type RelaybotConfig struct {
Enabled bool `yaml:"enabled"`
AdminOnly bool `yaml:"admin_only"`
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 Sender ¶
type Sender struct {
UserID string
event.MemberEventContent
}
Click to show internal directories.
Click to hide internal directories.