whisperdb

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor struct {
	AgentID   string `json:"agent_id"`
	LastSeen  string `json:"last_seen"`
	UpdatedAt string `json:"updated_at"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type InsertWhisperParams

type InsertWhisperParams struct {
	ID            string         `json:"id"`
	Scope         string         `json:"scope"`
	Type          string         `json:"type"`
	Source        string         `json:"source"`
	Topic         string         `json:"topic"`
	Content       string         `json:"content"`
	Importance    string         `json:"importance"`
	CreatedAt     string         `json:"created_at"`
	AgentID       sql.NullString `json:"agent_id"`
	PrincipalID   sql.NullString `json:"principal_id"`
	PrincipalType sql.NullString `json:"principal_type"`
	TeamID        sql.NullString `json:"team_id"`
	Metadata      sql.NullString `json:"metadata"`
}

type IsRelayedParams

type IsRelayedParams struct {
	MurmurID string `json:"murmur_id"`
	Scope    string `json:"scope"`
}

type MarkRelayedParams

type MarkRelayedParams struct {
	MurmurID  string `json:"murmur_id"`
	Scope     string `json:"scope"`
	RelayedAt string `json:"relayed_at"`
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeleteAllRelayed

func (q *Queries) DeleteAllRelayed(ctx context.Context) error

func (*Queries) DeleteAllWhispers

func (q *Queries) DeleteAllWhispers(ctx context.Context) error

func (*Queries) GetCursor

func (q *Queries) GetCursor(ctx context.Context, agentID string) (string, error)

func (*Queries) InsertWhisper

func (q *Queries) InsertWhisper(ctx context.Context, arg InsertWhisperParams) error

func (*Queries) IsRelayed

func (q *Queries) IsRelayed(ctx context.Context, arg IsRelayedParams) (int64, error)

func (*Queries) MarkRelayed

func (q *Queries) MarkRelayed(ctx context.Context, arg MarkRelayedParams) error

func (*Queries) PruneCursors

func (q *Queries) PruneCursors(ctx context.Context, updatedAt string) (sql.Result, error)

func (*Queries) PruneRelayed

func (q *Queries) PruneRelayed(ctx context.Context, relayedAt string) (sql.Result, error)

func (*Queries) PruneWhispers

func (q *Queries) PruneWhispers(ctx context.Context, createdAt string) (sql.Result, error)

func (*Queries) RemoveCursor

func (q *Queries) RemoveCursor(ctx context.Context, agentID string) error

func (*Queries) UpsertCursor

func (q *Queries) UpsertCursor(ctx context.Context, arg UpsertCursorParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type RelayedMurmur

type RelayedMurmur struct {
	MurmurID  string `json:"murmur_id"`
	Scope     string `json:"scope"`
	RelayedAt string `json:"relayed_at"`
}

type UpsertCursorParams

type UpsertCursorParams struct {
	AgentID   string `json:"agent_id"`
	LastSeen  string `json:"last_seen"`
	UpdatedAt string `json:"updated_at"`
}

type Whisper

type Whisper struct {
	ID            string         `json:"id"`
	Scope         string         `json:"scope"`
	Type          string         `json:"type"`
	Source        string         `json:"source"`
	Topic         string         `json:"topic"`
	Content       string         `json:"content"`
	Importance    string         `json:"importance"`
	CreatedAt     string         `json:"created_at"`
	AgentID       sql.NullString `json:"agent_id"`
	PrincipalID   sql.NullString `json:"principal_id"`
	PrincipalType sql.NullString `json:"principal_type"`
	TeamID        sql.NullString `json:"team_id"`
	Metadata      sql.NullString `json:"metadata"`
}

Jump to

Keyboard shortcuts

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