MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / CheckUuidDuplicate

Method CheckUuidDuplicate

service/ai/iml.go:73–77  ·  view source on GitHub ↗

func (i *imlProviderService) Save(ctx context.Context, id string, cfg *SetProvider) error { userId := utils.UserId(ctx) now := time.Now() info, err := i.store.First(ctx, map[string]interface{}{"uuid": id}) if err != nil { if !errors.Is(err, gorm.ErrRecordNotFound) { return err } if cfg.

(ctx context.Context, uuid string)

Source from the content-addressed store, hash-verified

71//}
72
73func (i *imlProviderService) CheckUuidDuplicate(ctx context.Context, uuid string) bool {
74 v, _ := i.store.First(ctx, map[string]interface{}{"uuid": uuid})
75
76 return v != nil
77}
78
79func (i *imlProviderService) GetLabels(ctx context.Context, ids ...string) map[string]string {
80 if len(ids) == 0 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected