2025-01-23 14:56:20 +00:00
|
|
|
package documentclean
|
|
|
|
|
|
2025-02-03 17:30:50 +00:00
|
|
|
import (
|
|
|
|
|
"errors"
|
|
|
|
|
|
|
|
|
|
"github.com/google/uuid"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Create struct {
|
|
|
|
|
ID uuid.UUID `json:"id" validate:"required,uuid"`
|
|
|
|
|
}
|
2025-01-23 14:56:20 +00:00
|
|
|
|
|
|
|
|
type Service struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func New() *Service {
|
|
|
|
|
return &Service{}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *Service) IsValidVersion(v int32) error {
|
|
|
|
|
if v <= 0 {
|
|
|
|
|
return errors.New("document clean code version must be > 0")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
}
|