chore: import lab3 baseline

This commit is contained in:
2026-10-02 17:49:28 +03:00
parent ec540a1a72
commit 4f43336c18
44 changed files with 4516 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
package messenger
import (
"gitea.privcloud.tech/dizi/mtusi2026lab4/internal/model"
"github.com/google/uuid"
)
type User = model.User
type Chat = model.Chat
type Message = model.Message
func newID() (string, error) {
id, err := uuid.NewRandom()
if err != nil {
return "", err
}
return id.String(), nil
}
func canonicalID(value string) (string, bool) {
if len(value) != 36 {
return "", false
}
id, err := uuid.Parse(value)
if err != nil {
return "", false
}
return id.String(), true
}