Documentation
¶
Overview ¶
Package presets owns reusable inference configuration presets and persistence.
Index ¶
Constants ¶
View Source
const ( // StorageSchemaVersion identifies the only preset schema. StorageSchemaVersion = 1 // StoragePrefix is the preset v1 namespace. StoragePrefix = "presets:v1:name:" )
Variables ¶
View Source
var ( // ErrRepositoryRequired reports an absent preset storage adapter. ErrRepositoryRequired = errors.New("preset storage is required") // ErrNotFound reports an absent preset. ErrNotFound = errors.New("preset not found") // ErrConflict reports a preset revision conflict. ErrConflict = errors.New("preset revision conflict") // ErrCorruptRecord reports invalid durable preset data. ErrCorruptRecord = errors.New("preset record is invalid") // ErrNameImmutable reports an attempted preset-name change. ErrNameImmutable = errors.New("preset name is immutable") )
Functions ¶
This section is empty.
Types ¶
type Preset ¶
type Preset struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Config map[string]any `json:"config"`
Version int `json:"version"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Preset is one reusable inference configuration.
type Repository ¶
type Repository interface {
Create(context.Context, Preset) (Record, error)
Get(context.Context, string) (Record, error)
List(context.Context, int) ([]Record, error)
Update(context.Context, Preset, uint64) (Record, error)
Delete(context.Context, string, uint64) error
}
Repository is the durable preset contract.
Click to show internal directories.
Click to hide internal directories.