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 ¶
- type Service
- func (s *Service) Create(rec *models.ResponseRecord) error
- func (s *Service) Delete(id string) error
- func (s *Service) Get(id string, kinds ...models.ResponseRecordKind) (*models.ResponseRecord, error)
- func (s *Service) List(kinds []models.ResponseRecordKind, parentID string) ([]*models.ResponseRecord, error)
- func (s *Service) Update(rec *models.ResponseRecord) error
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 (*Service) Create ¶
func (s *Service) Create(rec *models.ResponseRecord) error
Create persists a new record: one public method, one db.Update.
func (*Service) Get ¶
func (s *Service) Get(id string, kinds ...models.ResponseRecordKind) (*models.ResponseRecord, error)
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.
Click to show internal directories.
Click to hide internal directories.