Files
query-orchestration/internal/document/text/version/version.go
T

20 lines
334 B
Go
Raw Normal View History

package textversion
import (
"fmt"
)
func (s *Service) GetVersion() int32 {
return 1
}
func (s *Service) IsValidVersion(v int32) error {
currentVersion := s.GetVersion()
if v < 1 || v > currentVersion {
return fmt.Errorf("document text code version must be in the range 0 < version <= %d", currentVersion)
}
return nil
}