catalog

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeploymentCatalogSlug

func DeploymentCatalogSlug(model string) string

func SlugCandidates

func SlugCandidates(models ...string) []string

Types

type AuthField

type AuthField struct {
	Key         string        `json:"key"`
	Label       string        `json:"label"`
	Type        AuthFieldType `json:"type"`
	Description string        `json:"description,omitempty"`
	Required    bool          `json:"required,omitempty"`
	Secret      bool          `json:"secret,omitempty"`
	Default     any           `json:"default,omitempty"`
}

type AuthFieldType

type AuthFieldType string
const (
	AuthFieldTypeString  AuthFieldType = "string"
	AuthFieldTypeBoolean AuthFieldType = "boolean"
)

type AuthTypeOption

type AuthTypeOption struct {
	Type        string      `json:"type"`
	Variant     string      `json:"variant,omitempty"`
	Label       string      `json:"label"`
	Description string      `json:"description,omitempty"`
	Fields      []AuthField `json:"fields"`
}

func ProviderAuthOptions

func ProviderAuthOptions(code string) []AuthTypeOption

type MCPServerCatalog

type MCPServerCatalog interface {
	ListMCPServers() []domain.MCPServer
}

func NewMCPServerCatalog

func NewMCPServerCatalog() (MCPServerCatalog, error)

NewMCPServerCatalog loads the curated catalog of remote MCP servers embedded at build time. The embedded JSON is a validated build asset, so a parse failure is a programming error and surfaces at startup.

type OptionFieldType

type OptionFieldType string
const (
	OptionFieldTypeString OptionFieldType = "string"
	OptionFieldTypeEnum   OptionFieldType = "enum"
	OptionFieldTypeMap    OptionFieldType = "map"
)

type Pricing

type Pricing struct {
	ModelLabel  string
	InputPrice  float64
	OutputPrice float64
	Found       bool
}

type PricingResolver

type PricingResolver interface {
	Resolve(ctx context.Context, providerCode, slug string) Pricing
}

func NewPricingResolver

func NewPricingResolver(repo domain.Repository, manager *cache.TTLMapManager, logger *slog.Logger) PricingResolver

type ProviderOptionField

type ProviderOptionField struct {
	Key         string                  `json:"key"`
	Label       string                  `json:"label"`
	Type        OptionFieldType         `json:"type"`
	Description string                  `json:"description,omitempty"`
	Required    bool                    `json:"required,omitempty"`
	Default     any                     `json:"default,omitempty"`
	Enum        []appplugins.EnumOption `json:"enum,omitempty"`
}

func ProviderOptions

func ProviderOptions(code string) []ProviderOptionField

type Service

type Service interface {
	ListProviders(ctx context.Context) ([]domain.Provider, error)
	ListModels(ctx context.Context, providerCode string) ([]domain.Model, error)
}

func NewService

func NewService(repo domain.Repository) Service

type Syncer

type Syncer interface {
	Sync(ctx context.Context) error
}

func NewSyncer

func NewSyncer(repo domain.Repository, client *modelsdev.Client, logger *slog.Logger) Syncer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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