Documentation
¶
Index ¶
- type MockClient
- func (m *MockClient) SetAccountID(accountID domain.AccountID)
- func (m *MockClient) Stream(ctx context.Context, req chat.Request, onMessage func(*domain.Message)) (*chat.StreamResult, error)
- func (m *MockClient) StreamSnapshots(ctx context.Context, req chat.Request, onSnapshot func(chat.StreamSnapshot)) (*chat.StreamResult, error)
- func (m *MockClient) WithAccountID(accountID domain.AccountID) chat.Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockClient ¶
type MockClient struct {
StreamFunc func(ctx context.Context, req chat.Request, onMessage func(*domain.Message)) (*chat.StreamResult, error)
StreamSnapshotsFunc func(ctx context.Context, req chat.Request, onSnapshot func(chat.StreamSnapshot)) (*chat.StreamResult, error)
SetAccountFunc func(accountID domain.AccountID)
WithAccountFunc func(accountID domain.AccountID) chat.Client
}
MockClient is a mock implementation of chat.Client for testing.
func (*MockClient) SetAccountID ¶
func (m *MockClient) SetAccountID(accountID domain.AccountID)
func (*MockClient) Stream ¶
func (m *MockClient) Stream(ctx context.Context, req chat.Request, onMessage func(*domain.Message)) (*chat.StreamResult, error)
func (*MockClient) StreamSnapshots ¶ added in v1.22.1
func (m *MockClient) StreamSnapshots(ctx context.Context, req chat.Request, onSnapshot func(chat.StreamSnapshot)) (*chat.StreamResult, error)
func (*MockClient) WithAccountID ¶ added in v1.22.1
func (m *MockClient) WithAccountID(accountID domain.AccountID) chat.Client
Click to show internal directories.
Click to hide internal directories.