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

Method CheckNewVersion

service/release/iml.go:414–426  ·  view source on GitHub ↗
(ctx context.Context, service string, version string)

Source from the content-addressed store, hash-verified

412}
413
414func (s *imlReleaseService) CheckNewVersion(ctx context.Context, service string, version string) (bool, error) {
415 v, err := s.releaseStore.First(ctx, map[string]interface{}{
416 "service": service,
417 "name": version,
418 })
419 if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
420 return false, err
421 }
422 if errors.Is(err, gorm.ErrRecordNotFound) || v == nil {
423 return true, nil
424 }
425 return false, nil
426}
427
428func (s *imlReleaseService) GetRelease(ctx context.Context, id string) (*Release, error) {
429 r, err := s.releaseStore.GetByUUID(ctx, id)

Callers 1

CreateReleaseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected