Documentation ¶
Overview ¶
Package hicli contains a highly opinionated high-level framework for developing instant messaging clients on Matrix.
Index ¶
- Constants
- Variables
- type EventsDecrypted
- type HiClient
- func (h *HiClient) CheckServerVersions(ctx context.Context) error
- func (h *HiClient) Encrypt(ctx context.Context, room *database.Room, evtType event.Type, content any) (encrypted *event.EncryptedEventContent, err error)
- func (h *HiClient) EnsureGroupSessionShared(ctx context.Context, roomID id.RoomID) error
- func (h *HiClient) FetchKeysForOutdatedUsers(ctx context.Context) error
- func (h *HiClient) GetEvent(ctx context.Context, roomID id.RoomID, eventID id.EventID) (*database.Event, error)
- func (h *HiClient) GetEventsByRowIDs(ctx context.Context, rowIDs []database.EventRowID) ([]*database.Event, error)
- func (h *HiClient) IsLoggedIn() bool
- func (h *HiClient) Login(ctx context.Context, req *mautrix.ReqLogin) error
- func (h *HiClient) LoginAndVerify(ctx context.Context, homeserverURL, username, password, recoveryCode string) error
- func (h *HiClient) LoginPassword(ctx context.Context, homeserverURL, username, password string) error
- func (h *HiClient) Paginate(ctx context.Context, roomID id.RoomID, maxTimelineID database.TimelineRowID, ...) ([]*database.Event, error)
- func (h *HiClient) PaginateServer(ctx context.Context, roomID id.RoomID, limit int) ([]*database.Event, error)
- func (h *HiClient) RequestQueuedSessions(ctx context.Context) (bool, error)
- func (h *HiClient) RunRequestQueue(ctx context.Context)
- func (h *HiClient) Send(ctx context.Context, roomID id.RoomID, evtType event.Type, content any) (*database.Event, error)
- func (h *HiClient) Start(ctx context.Context, userID id.UserID, expectedAccount *database.Account) error
- func (h *HiClient) Stop()
- func (h *HiClient) Sync()
- func (h *HiClient) VerifyWithRecoveryCode(ctx context.Context, code string) error
- func (h *HiClient) WakeupRequestQueue()
- type SendComplete
- type SyncComplete
- type SyncRoom
- type Typing
Constants ¶
View Source
const MaxParallelRequests = 5
Variables ¶
View Source
var ErrFailedToCheckServerVersions = errors.New("failed to check server versions")
View Source
var ErrOutdatedServer = errors.New("homeserver is outdated")
View Source
var ErrPaginationAlreadyInProgress = errors.New("pagination is already in progress")
View Source
var ErrTimelineReset = errors.New("got limited timeline sync response")
View Source
var InitialDeviceDisplayName = "mautrix hiclient"
View Source
var MinimumSpecVersion = mautrix.SpecV11
Functions ¶
This section is empty.
Types ¶
type EventsDecrypted ¶
type HiClient ¶
type HiClient struct { DB *database.Database Account *database.Account Client *mautrix.Client Crypto *crypto.OlmMachine CryptoStore *crypto.SQLCryptoStore ClientStore *database.ClientStateStore Log zerolog.Logger Verified bool KeyBackupVersion id.KeyBackupVersion KeyBackupKey *backup.MegolmBackupKey EventHandler func(evt any) // contains filtered or unexported fields }
func (*HiClient) CheckServerVersions ¶
func (*HiClient) EnsureGroupSessionShared ¶
func (*HiClient) FetchKeysForOutdatedUsers ¶
func (*HiClient) GetEventsByRowIDs ¶
func (*HiClient) IsLoggedIn ¶
func (*HiClient) LoginAndVerify ¶
func (*HiClient) LoginPassword ¶
func (*HiClient) PaginateServer ¶
func (*HiClient) RequestQueuedSessions ¶
func (*HiClient) RunRequestQueue ¶
func (*HiClient) VerifyWithRecoveryCode ¶
func (*HiClient) WakeupRequestQueue ¶
func (h *HiClient) WakeupRequestQueue()
type SendComplete ¶
type SyncComplete ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.