MCPcopy Create free account
hub / github.com/OpenCSGs/csghub-server / DeleteRuntimeFrameworkModes

Method DeleteRuntimeFrameworkModes

component/model.go:820–835  ·  view source on GitHub ↗
(ctx context.Context, currentUser string, deployType int, id int64, paths []string)

Source from the content-addressed store, hash-verified

818}
819
820func (c *ModelComponent) DeleteRuntimeFrameworkModes(ctx context.Context, currentUser string, deployType int, id int64, paths []string) ([]string, error) {
821 models, err := c.ms.ListByPath(ctx, paths)
822 if err != nil {
823 return nil, err
824 }
825
826 var failedModels []string
827 for _, model := range models {
828 err = c.rrtfms.Delete(ctx, id, model.Repository.ID, deployType)
829 if err != nil {
830 failedModels = append(failedModels, model.Repository.Path)
831 }
832 }
833
834 return failedModels, nil
835}
836
837func (c *ModelComponent) ListModelsOfRuntimeFrameworks(ctx context.Context, currentUser, search, sort string, per, page int, deployType int) ([]types.Model, int, error) {
838 var (

Callers 1

Calls 2

ListByPathMethod · 0.45
DeleteMethod · 0.45

Tested by

no test coverage detected