71f9802e1a
Split Query Running + Debugging Full Flow * completedquerysyncrunner * spliitinglogic * synccomplete * informdependents * only push same collector * deps * livetesting * foundissue * some issues resolved * activeupdate * collectorupdatefixes * fix dbquesries * tests * tests * pollingdebug
36 lines
706 B
Go
36 lines
706 B
Go
package document
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func (s *Service) GetCleanVersion() int32 {
|
|
// TODO - actual version
|
|
return 1
|
|
}
|
|
|
|
func (s *Service) GetTextVersion() int32 {
|
|
// TODO - actual version
|
|
return 1
|
|
}
|
|
|
|
func (s *Service) IsValidCleanVersion(v int32) error {
|
|
currentVersion := s.GetCleanVersion()
|
|
|
|
if v < 1 || v > currentVersion {
|
|
return fmt.Errorf("document clean code version must be in the range 0 < version <= %d", currentVersion)
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (s *Service) IsValidTextVersion(v int32) error {
|
|
currentVersion := s.GetTextVersion()
|
|
|
|
if v < 1 || v > currentVersion {
|
|
return fmt.Errorf("document text code version must be in the range 0 < version <= %d", currentVersion)
|
|
}
|
|
|
|
return nil
|
|
}
|