service

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CatalogModelTypeName           = "kf.CatalogModel"
	CatalogModelArtifactTypeName   = "kf.CatalogModelArtifact"
	CatalogMetricsArtifactTypeName = "kf.CatalogMetricsArtifact"
	CatalogSourceTypeName          = "kf.CatalogSource"
	MCPServerTypeName              = "kf.MCPServer"
	MCPServerToolTypeName          = "kf.MCPServerTool"
)

Variables

View Source
var ErrCatalogArtifactNotFound = errors.New("catalog artifact by id not found")
View Source
var ErrCatalogSourceNotFound = errors.New("catalog source not found")

Functions

func DatastoreSpec

func DatastoreSpec() (*datastore.Spec, error)

func NewCatalogArtifactEntityMappings added in v0.3.10

func NewCatalogArtifactEntityMappings() filter.EntityMappingFunctions

func NewCatalogArtifactRepository

func NewCatalogArtifactRepository(db *gorm.DB, artifactTypes datastore.ArtifactTypeMap) models.CatalogArtifactRepository

func NewCatalogSourceRepository

func NewCatalogSourceRepository(db *gorm.DB, typeID int32) models.CatalogSourceRepository

NewCatalogSourceRepository creates a new CatalogSourceRepository.

func NewPropertyOptionsRepository

func NewPropertyOptionsRepository(db *gorm.DB) models.PropertyOptionsRepository

Types

type CatalogArtifactRepositoryImpl

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

func (*CatalogArtifactRepositoryImpl) CountByParentIDs added in v0.3.11

func (r *CatalogArtifactRepositoryImpl) CountByParentIDs(parentIDs []int32) (map[int32]map[string]int32, error)

CountByParentIDs returns artifact counts grouped by category for each parent model. The outer map key is the parent model ID (context_id from Attribution). The inner map key is the artifact category: "model-artifact" for CatalogModelArtifacts, or the metricsType value ("performance-metrics", "accuracy-metrics", etc.) for CatalogMetricsArtifacts. Categories with zero count are omitted from the inner map. Parents with no artifacts have no entry in the outer map.

func (*CatalogArtifactRepositoryImpl) DeleteByParentID

func (r *CatalogArtifactRepositoryImpl) DeleteByParentID(artifactTypeName string, parentResourceID int32) error

func (*CatalogArtifactRepositoryImpl) GetByID

func (*CatalogArtifactRepositoryImpl) List

List retrieves catalog artifacts with support for filtering, pagination, and custom property ordering.

The method handles ordering in the following priority: 1. NAME - Special catalog-specific ordering 2. Standard columns (ID, CREATE_TIME, LAST_UPDATE_TIME) - Uses allowed column map 3. Custom properties (e.g., accuracy.double_value) - Dynamic property-based ordering 4. Fallback to ID ordering for invalid or unrecognized inputs

type CatalogSourceRepositoryImpl

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

CatalogSourceRepositoryImpl implements CatalogSourceRepository using GORM.

func (*CatalogSourceRepositoryImpl) Delete

func (r *CatalogSourceRepositoryImpl) Delete(sourceID string) error

Delete removes a catalog source by its source ID.

func (*CatalogSourceRepositoryImpl) GetAll

GetAll retrieves all catalog sources.

func (*CatalogSourceRepositoryImpl) GetAllStatuses

func (r *CatalogSourceRepositoryImpl) GetAllStatuses() (map[string]models.SourceStatus, error)

GetAllStatuses returns a map of source ID to status/error for all sources.

func (*CatalogSourceRepositoryImpl) GetBySourceID

func (r *CatalogSourceRepositoryImpl) GetBySourceID(sourceID string) (models.CatalogSource, error)

GetBySourceID retrieves a catalog source by its source ID.

func (*CatalogSourceRepositoryImpl) Save

Save creates or updates a catalog source.

type PropertyOptionsRepositoryImpl

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

func (*PropertyOptionsRepositoryImpl) List

func (*PropertyOptionsRepositoryImpl) Refresh

Jump to

Keyboard shortcuts

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