Documentation ¶
Overview ¶
Package config contains the wrappers for gomuks configurations and sessions.
Index ¶
- Constants
- Variables
- type AuthCache
- type Config
- func (config *Config) Clear()
- func (config *Config) ClearData()
- func (config *Config) CreateCacheDirs()
- func (config *Config) DeleteSession()
- func (config *Config) GetUserID() id.UserID
- func (config *Config) Load()
- func (config *Config) LoadAll()
- func (config *Config) LoadAuthCache()
- func (config *Config) LoadFilterID(_ id.UserID) string
- func (config *Config) LoadKeybindings()
- func (config *Config) LoadNextBatch(_ id.UserID) string
- func (config *Config) LoadPreferences()
- func (config *Config) LoadPushRules()
- func (config *Config) LoadRoom(_ id.RoomID) *mautrix.Room
- func (config *Config) Save()
- func (config *Config) SaveAll()
- func (config *Config) SaveAuthCache()
- func (config *Config) SaveFilterID(_ id.UserID, filterID string)
- func (config *Config) SaveKeybindings()
- func (config *Config) SaveNextBatch(_ id.UserID, nextBatch string)
- func (config *Config) SavePreferences()
- func (config *Config) SavePushRules()
- func (config *Config) SaveRoom(_ *mautrix.Room)
- type Keybind
- type ParsedKeybindings
- type RawKeybindings
- type UserPreferences
Constants ¶
View Source
const FilterVersion = 1
Variables ¶
View Source
var DefaultKeybindings string
View Source
var InlineURLsProbablySupported bool
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { UserID id.UserID `yaml:"mxid"` DeviceID id.DeviceID `yaml:"device_id"` AccessToken string `yaml:"access_token"` HS string `yaml:"homeserver"` RoomCacheSize int `yaml:"room_cache_size"` RoomCacheAge int64 `yaml:"room_cache_age"` NotifySound bool `yaml:"notify_sound"` SendToVerifiedOnly bool `yaml:"send_to_verified_only"` Backspace1RemovesWord bool `yaml:"backspace1_removes_word"` Backspace2RemovesWord bool `yaml:"backspace2_removes_word"` AlwaysClearScreen bool `yaml:"always_clear_screen"` Dir string `yaml:"-"` DataDir string `yaml:"data_dir"` CacheDir string `yaml:"cache_dir"` HistoryPath string `yaml:"history_path"` RoomListPath string `yaml:"room_list_path"` MediaDir string `yaml:"media_dir"` DownloadDir string `yaml:"download_dir"` StateDir string `yaml:"state_dir"` Preferences UserPreferences `yaml:"-"` AuthCache AuthCache `yaml:"-"` Rooms *rooms.RoomCache `yaml:"-"` PushRules *pushrules.PushRuleset `yaml:"-"` Keybindings ParsedKeybindings `yaml:"-"` // contains filtered or unexported fields }
Config contains the main config of gomuks.
func (*Config) Clear ¶
func (config *Config) Clear()
Clear clears the session cache and removes all history.
func (*Config) ClearData ¶
func (config *Config) ClearData()
ClearData clears non-temporary session data.
func (*Config) CreateCacheDirs ¶
func (config *Config) CreateCacheDirs()
func (*Config) DeleteSession ¶
func (config *Config) DeleteSession()
func (*Config) Load ¶
func (config *Config) Load()
Load loads the config from config.yaml in the directory given to the config struct.
func (*Config) LoadAuthCache ¶
func (config *Config) LoadAuthCache()
func (*Config) LoadKeybindings ¶ added in v0.3.0
func (config *Config) LoadKeybindings()
func (*Config) LoadPreferences ¶
func (config *Config) LoadPreferences()
func (*Config) LoadPushRules ¶
func (config *Config) LoadPushRules()
func (*Config) Save ¶
func (config *Config) Save()
Save saves this config to config.yaml in the directory given to the config struct.
func (*Config) SaveAuthCache ¶
func (config *Config) SaveAuthCache()
func (*Config) SaveKeybindings ¶ added in v0.3.0
func (config *Config) SaveKeybindings()
func (*Config) SavePreferences ¶
func (config *Config) SavePreferences()
func (*Config) SavePushRules ¶
func (config *Config) SavePushRules()
type ParsedKeybindings ¶ added in v0.3.0
type RawKeybindings ¶ added in v0.3.0
type UserPreferences ¶
type UserPreferences struct { HideUserList bool `yaml:"hide_user_list"` HideRoomList bool `yaml:"hide_room_list"` HideTimestamp bool `yaml:"hide_timestamp"` BareMessageView bool `yaml:"bare_message_view"` DisableImages bool `yaml:"disable_images"` DisableTypingNotifs bool `yaml:"disable_typing_notifs"` DisableEmojis bool `yaml:"disable_emojis"` DisableMarkdown bool `yaml:"disable_markdown"` DisableHTML bool `yaml:"disable_html"` DisableDownloads bool `yaml:"disable_downloads"` DisableNotifications bool `yaml:"disable_notifications"` DisableShowURLs bool `yaml:"disable_show_urls"` AltEnterToSend bool `yaml:"alt_enter_to_send"` InlineURLMode string `yaml:"inline_url_mode"` }
func (*UserPreferences) EnableInlineURLs ¶ added in v0.3.0
func (up *UserPreferences) EnableInlineURLs() bool
Click to show internal directories.
Click to hide internal directories.