chattest

package
v1.22.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL