mongo

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package mongo provides a MongoDB-backed implementation of the runtime prompt store. Build the low-level client via features/prompt/mongo/clients/mongo and pass it to NewStore to persist and resolve scoped prompt overrides.

Package mongo wires the prompt.Store interface to the MongoDB prompt client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store implements prompt.Store by delegating to the Mongo client.

func NewStore

func NewStore(client clientsmongo.Client) (*Store, error)

NewStore builds a Mongo-backed prompt store using the provided client.

func (*Store) History

func (s *Store) History(ctx context.Context, promptID prompt.Ident) ([]*prompt.Override, error)

History returns prompt override history for one prompt ID.

func (*Store) List

func (s *Store) List(ctx context.Context) ([]*prompt.Override, error)

List returns all prompt overrides ordered newest-first.

func (*Store) Resolve

func (s *Store) Resolve(ctx context.Context, promptID prompt.Ident, scope prompt.Scope) (*prompt.Override, error)

Resolve resolves the highest-precedence override for promptID within scope.

func (*Store) Set

func (s *Store) Set(ctx context.Context, promptID prompt.Ident, scope prompt.Scope, template string, metadata map[string]string) error

Set persists one override entry.

Directories

Path Synopsis
clients
mongo
Package mongo implements the low-level MongoDB client used by the prompt override store.
Package mongo implements the low-level MongoDB client used by the prompt override store.

Jump to

Keyboard shortcuts

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