history

package
v1.7.10 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileIO

type FileIO struct {
	// contains filtered or unexported fields
}

func New

func New() (*FileIO, error)

func (*FileIO) GetThread added in v1.6.2

func (f *FileIO) GetThread() string

func (*FileIO) Read

func (f *FileIO) Read() ([]History, error)

func (*FileIO) ReadThread added in v1.7.4

func (f *FileIO) ReadThread(thread string) ([]History, error)

func (*FileIO) SetThread added in v1.3.0

func (f *FileIO) SetThread(thread string)

func (*FileIO) WithDirectory added in v1.3.0

func (f *FileIO) WithDirectory(historyDir string) *FileIO

func (*FileIO) Write

func (f *FileIO) Write(historyEntries []History) error

type History added in v1.7.4

type History struct {
	api.Message
	Timestamp time.Time `json:"timestamp,omitempty"`
}

type Manager added in v1.7.6

type Manager struct {
	// contains filtered or unexported fields
}

func NewHistory added in v1.7.4

func NewHistory(store Store) *Manager

func (*Manager) Print added in v1.7.6

func (h *Manager) Print(thread string) (string, error)

type Store

type Store interface {
	Read() ([]History, error)
	ReadThread(string) ([]History, error)
	Write([]History) error
	SetThread(string)
	GetThread() string
}

Jump to

Keyboard shortcuts

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