Documentation ¶
Index ¶
- func DeleteOldLogs(prefix string)
- func NewRustClient(t ct.TestLike, opts api.ClientCreationOpts) (api.Client, error)
- func SetupLogs(prefix string)
- type DynamicSlice
- func (s *DynamicSlice[T]) Append(vals ...T)
- func (s *DynamicSlice[T]) Clear()
- func (s *DynamicSlice[T]) Insert(i int, val T)
- func (s *DynamicSlice[T]) PopBack()
- func (s *DynamicSlice[T]) PopFront()
- func (s *DynamicSlice[T]) PushBack(val T)
- func (s *DynamicSlice[T]) PushFront(val T)
- func (s *DynamicSlice[T]) Remove(i int)
- func (s *DynamicSlice[T]) Reset(vals []T)
- func (s *DynamicSlice[T]) Set(i int, val T)
- func (s *DynamicSlice[T]) Truncate(length int)
- type MemoryClientSessionDelegate
- type RoomsListener
- type RustClient
- func (c *RustClient) Close(t ct.TestLike)
- func (c *RustClient) CurrentAccessToken(t ct.TestLike) string
- func (c *RustClient) DeletePersistentStorage(t ct.TestLike)
- func (c *RustClient) ForceClose(t ct.TestLike)
- func (c *RustClient) GetNotification(t ct.TestLike, roomID, eventID string) (*api.Notification, error)
- func (c *RustClient) IsRoomEncrypted(t ct.TestLike, roomID string) (bool, error)
- func (c *RustClient) LoadBackup(t ct.TestLike, recoveryKey string) error
- func (c *RustClient) Logf(t ct.TestLike, format string, args ...interface{})
- func (c *RustClient) Login(t ct.TestLike, opts api.ClientCreationOpts) error
- func (c *RustClient) MustBackpaginate(t ct.TestLike, roomID string, count int)
- func (c *RustClient) MustBackupKeys(t ct.TestLike) (recoveryKey string)
- func (c *RustClient) MustGetEvent(t ct.TestLike, roomID, eventID string) api.Event
- func (c *RustClient) MustLoadBackup(t ct.TestLike, recoveryKey string)
- func (c *RustClient) MustStartSyncing(t ct.TestLike) (stopSyncing func())
- func (c *RustClient) Opts() api.ClientCreationOpts
- func (c *RustClient) SendMessage(t ct.TestLike, roomID, text string) (eventID string)
- func (c *RustClient) StartSyncing(t ct.TestLike) (stopSyncing func(), err error)
- func (c *RustClient) TrySendMessage(t ct.TestLike, roomID, text string) (eventID string, err error)
- func (c *RustClient) Type() api.ClientTypeLang
- func (c *RustClient) UserID() string
- func (c *RustClient) WaitUntilEventInRoom(t ct.TestLike, roomID string, checker func(api.Event) bool) api.Waiter
- type RustRoomInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteOldLogs ¶
func DeleteOldLogs(prefix string)
func NewRustClient ¶
Types ¶
type DynamicSlice ¶
type DynamicSlice[T any] struct { Slice []T }
This is a recurring pattern in the FFI bindings where a room list or timeline has delta updates sent to it. Rather than reimplementing all the functions over and over, define it once here.
func (*DynamicSlice[T]) Append ¶
func (s *DynamicSlice[T]) Append(vals ...T)
Append items to the end of the slice.
func (*DynamicSlice[T]) Clear ¶
func (s *DynamicSlice[T]) Clear()
func (*DynamicSlice[T]) Insert ¶
func (s *DynamicSlice[T]) Insert(i int, val T)
Insert the item, shifting anything in this place up by one.
func (*DynamicSlice[T]) PopBack ¶
func (s *DynamicSlice[T]) PopBack()
func (*DynamicSlice[T]) PopFront ¶
func (s *DynamicSlice[T]) PopFront()
func (*DynamicSlice[T]) PushBack ¶
func (s *DynamicSlice[T]) PushBack(val T)
func (*DynamicSlice[T]) PushFront ¶
func (s *DynamicSlice[T]) PushFront(val T)
func (*DynamicSlice[T]) Remove ¶
func (s *DynamicSlice[T]) Remove(i int)
Remove the item, shifting anything above this down by one.
func (*DynamicSlice[T]) Reset ¶
func (s *DynamicSlice[T]) Reset(vals []T)
func (*DynamicSlice[T]) Set ¶
func (s *DynamicSlice[T]) Set(i int, val T)
Set the item at i to val, does not shift anything.
func (*DynamicSlice[T]) Truncate ¶
func (s *DynamicSlice[T]) Truncate(length int)
type MemoryClientSessionDelegate ¶
type MemoryClientSessionDelegate struct {
// contains filtered or unexported fields
}
func NewMemoryClientSessionDelegate ¶
func NewMemoryClientSessionDelegate() *MemoryClientSessionDelegate
func (*MemoryClientSessionDelegate) RetrieveSessionFromKeychain ¶
func (d *MemoryClientSessionDelegate) RetrieveSessionFromKeychain(userID string) (matrix_sdk_ffi.Session, *matrix_sdk_ffi.ClientError)
func (*MemoryClientSessionDelegate) SaveSessionInKeychain ¶
func (d *MemoryClientSessionDelegate) SaveSessionInKeychain(session matrix_sdk_ffi.Session)
type RoomsListener ¶
type RoomsListener struct {
// contains filtered or unexported fields
}
This is a more ergonomic way to listen for updates from the FFI layer, as it will allow you to listen for non-existing rooms without crashing.
func NewRoomsListener ¶
func NewRoomsListener() *RoomsListener
func (*RoomsListener) AddListener ¶
func (l *RoomsListener) AddListener(callback func(broadcastRoomID string) (cancel bool)) (cancel func())
AddListener registers the given callback, which will be invoked for every call to BroadcastUpdateForRoom.
func (*RoomsListener) BroadcastUpdateForRoom ¶
func (l *RoomsListener) BroadcastUpdateForRoom(roomID string)
BroadcastUpdateForRoom informs all attached listeners that something has happened in relation to this room ID. This could be a new event, or the room appearing in all_rooms, or something else entirely. It is up to the listener to decide what to do upon receipt of the poke.
type RustClient ¶
type RustClient struct { FFIClient *matrix_sdk_ffi.Client // contains filtered or unexported fields }
func (*RustClient) Close ¶
func (c *RustClient) Close(t ct.TestLike)
func (*RustClient) CurrentAccessToken ¶
func (c *RustClient) CurrentAccessToken(t ct.TestLike) string
func (*RustClient) DeletePersistentStorage ¶
func (c *RustClient) DeletePersistentStorage(t ct.TestLike)
func (*RustClient) ForceClose ¶
func (c *RustClient) ForceClose(t ct.TestLike)
func (*RustClient) GetNotification ¶
func (c *RustClient) GetNotification(t ct.TestLike, roomID, eventID string) (*api.Notification, error)
func (*RustClient) IsRoomEncrypted ¶
IsRoomEncrypted returns true if the room is encrypted. May return an error e.g if you provide a bogus room ID.
func (*RustClient) LoadBackup ¶
func (c *RustClient) LoadBackup(t ct.TestLike, recoveryKey string) error
func (*RustClient) Logf ¶
func (c *RustClient) Logf(t ct.TestLike, format string, args ...interface{})
func (*RustClient) Login ¶
func (c *RustClient) Login(t ct.TestLike, opts api.ClientCreationOpts) error
func (*RustClient) MustBackpaginate ¶
func (c *RustClient) MustBackpaginate(t ct.TestLike, roomID string, count int)
func (*RustClient) MustBackupKeys ¶
func (c *RustClient) MustBackupKeys(t ct.TestLike) (recoveryKey string)
func (*RustClient) MustGetEvent ¶
func (*RustClient) MustLoadBackup ¶
func (c *RustClient) MustLoadBackup(t ct.TestLike, recoveryKey string)
func (*RustClient) MustStartSyncing ¶
func (c *RustClient) MustStartSyncing(t ct.TestLike) (stopSyncing func())
func (*RustClient) Opts ¶
func (c *RustClient) Opts() api.ClientCreationOpts
func (*RustClient) SendMessage ¶
func (c *RustClient) SendMessage(t ct.TestLike, roomID, text string) (eventID string)
SendMessage sends the given text as an m.room.message with msgtype:m.text into the given room. Returns the event ID of the sent event.
func (*RustClient) StartSyncing ¶
func (c *RustClient) StartSyncing(t ct.TestLike) (stopSyncing func(), err error)
StartSyncing to begin syncing from sync v2 / sliding sync. Tests should call stopSyncing() at the end of the test.
func (*RustClient) TrySendMessage ¶
func (*RustClient) Type ¶
func (c *RustClient) Type() api.ClientTypeLang
func (*RustClient) UserID ¶
func (c *RustClient) UserID() string
type RustRoomInfo ¶
type RustRoomInfo struct {
// contains filtered or unexported fields
}