responses

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package responses persists router-side compatibility records.

Responses, conversations, assistants, threads, thread messages and runs share one bucket (ResponseRecord envelope with a Kind discriminator), modeled on the videojobs service: one public method, one db.Update.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service owns ResponseRecord rows in the responses bucket.

func New

func New(database *db.DB) *Service

New constructs a responses Service. Construction performs no I/O.

func (*Service) Create

func (s *Service) Create(rec *models.ResponseRecord) error

Create persists a new record: one public method, one db.Update.

func (*Service) Delete

func (s *Service) Delete(id string) error

Delete removes a record. Missing rows are not errors.

func (*Service) Get

Get returns the record by ID, optionally asserting its kind.

func (*Service) List

func (s *Service) List(kinds []models.ResponseRecordKind, parentID string) ([]*models.ResponseRecord, error)

List returns records of the given kinds (empty kinds = all), oldest first. ParentID filters thread children and run bindings when non-empty.

func (*Service) Update

func (s *Service) Update(rec *models.ResponseRecord) error

Update rewrites a record in place: one public method, one db.Update.

Jump to

Keyboard shortcuts

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