uuid generator supports generating more than 1 uuid in one time

This commit is contained in:
MaysWind
2023-03-26 23:58:30 +08:00
parent 1d6dbf63c0
commit 7443e8a532
5 changed files with 170 additions and 16 deletions
+5
View File
@@ -45,3 +45,8 @@ type ServiceUsingUuid struct {
func (s *ServiceUsingUuid) GenerateUuid(uuidType uuid.UuidType) int64 {
return s.container.GenerateUuid(uuidType)
}
// GenerateUuids generates new uuids according to given uuid type and count
func (s *ServiceUsingUuid) GenerateUuids(uuidType uuid.UuidType, count uint8) []int64 {
return s.container.GenerateUuids(uuidType, count)
}