Documentation
¶
Index ¶
- Constants
- func DefaultDataDir() string
- func DefaultSessionsDir(dataDir string) string
- func MostRecentSessionID(sessionsDir string) (string, error)
- type ApprovalStore
- type InMemoryStore
- func (s *InMemoryStore) Create(_ context.Context, msg core.Message) (core.Message, error)
- func (s *InMemoryStore) GetApprovals(_ context.Context, sessionID string) (map[string]bool, error)
- func (s *InMemoryStore) GrantApproval(_ context.Context, sessionID, key string) error
- func (s *InMemoryStore) List(_ context.Context, sessionID string) ([]core.Message, error)
- func (s *InMemoryStore) RewriteSession(_ context.Context, sessionID string, msgs []core.Message) error
- func (s *InMemoryStore) Update(_ context.Context, msg core.Message) error
- type JSONLStore
- func (s *JSONLStore) Create(_ context.Context, msg core.Message) (core.Message, error)
- func (s *JSONLStore) GetApprovals(_ context.Context, sessionID string) (map[string]bool, error)
- func (s *JSONLStore) GrantApproval(_ context.Context, sessionID, key string) error
- func (s *JSONLStore) List(_ context.Context, sessionID string) ([]core.Message, error)
- func (s *JSONLStore) RewriteSession(_ context.Context, sessionID string, msgs []core.Message) error
- func (s *JSONLStore) Update(_ context.Context, msg core.Message) error
- type MessageStore
- type SessionRewriteStore
Constants ¶
View Source
const (
DataDirEnv = "WHALE_HOME"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultDataDir ¶
func DefaultDataDir() string
func DefaultSessionsDir ¶
func MostRecentSessionID ¶
Types ¶
type ApprovalStore ¶
type InMemoryStore ¶
type InMemoryStore struct {
// contains filtered or unexported fields
}
func NewInMemoryStore ¶
func NewInMemoryStore() *InMemoryStore
func (*InMemoryStore) GetApprovals ¶
func (*InMemoryStore) GrantApproval ¶
func (s *InMemoryStore) GrantApproval(_ context.Context, sessionID, key string) error
func (*InMemoryStore) RewriteSession ¶
type JSONLStore ¶
type JSONLStore struct {
// contains filtered or unexported fields
}
func NewJSONLStore ¶
func NewJSONLStore(sessionsDir string) (*JSONLStore, error)
func (*JSONLStore) GetApprovals ¶
func (*JSONLStore) GrantApproval ¶
func (s *JSONLStore) GrantApproval(_ context.Context, sessionID, key string) error
func (*JSONLStore) RewriteSession ¶
type MessageStore ¶
Click to show internal directories.
Click to hide internal directories.