mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-29 15:38:52 +00:00
refactor: eventstore v2
This commit is contained in:
@@ -8,8 +8,10 @@ import (
|
||||
|
||||
var versionRegexp = regexp.MustCompile(`^v[0-9]+(\.[0-9]+){0,2}$`)
|
||||
|
||||
//Version represents the semver of an aggregate
|
||||
type Version string
|
||||
|
||||
//Validate checks if the v is semver
|
||||
func (v Version) Validate() error {
|
||||
if !versionRegexp.MatchString(string(v)) {
|
||||
return errors.ThrowPreconditionFailed(nil, "MODEL-luDuS", "version is not semver")
|
||||
|
||||
Reference in New Issue
Block a user