messages

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetOptions

type GetOptions struct {
	MessageID       string
	ChatID          string
	ContextSize     int
	Format          db.MessageFormat
	TextLikeOutput  bool
	FallbackAllowed bool
}

type GetResult

type GetResult struct {
	Messages   []api.Message
	MatchIndex int
	ThreadName string
}

type ListOptions

type ListOptions struct {
	ChatID          string
	Cursor          string
	Direction       string
	Limit           int
	Offset          int
	UnreadOnly      bool
	After           *time.Time
	Before          *time.Time
	Format          db.MessageFormat
	TextLikeOutput  bool
	FallbackAllowed bool
}

type ListResult

type ListResult struct {
	Messages   []api.Message
	HasMore    bool
	NextCursor string
	ThreadName string
}

type SearchOptions

type SearchOptions struct {
	Query           string
	ChatIDs         []string
	AccountIDs      []string
	DateAfter       *time.Time
	Limit           int
	FallbackAllowed bool
}

type Service

type Service struct {
	Backend        string
	Client         *api.Client
	ClientErr      error
	OpenStore      func() (*db.Store, error)
	ProgressWriter io.Writer
	WarnStale      bool
}

func NewService

func NewService(opts ServiceOptions) *Service

func (*Service) Get

func (s *Service) Get(ctx context.Context, opts GetOptions) (GetResult, error)

func (*Service) List

func (s *Service) List(ctx context.Context, opts ListOptions) (ListResult, error)

func (*Service) Search

type ServiceOptions

type ServiceOptions struct {
	Backend        string
	Client         *api.Client
	ClientErr      error
	OpenStore      func() (*db.Store, error)
	ProgressWriter io.Writer
	WarnStale      bool
}

Jump to

Keyboard shortcuts

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