forked from mtusi2026/mtusi2026lab3
Implement lab 3 level 4 failover and idempotency
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package postgres
|
||||
|
||||
import (
|
||||
"highload/internal/repository"
|
||||
|
||||
"github.com/jackc/pgx/v5/pgtype"
|
||||
)
|
||||
|
||||
func getUUIDFromString(id string) (*pgtype.UUID, error) {
|
||||
var uuidID pgtype.UUID
|
||||
|
||||
if err := uuidID.Scan(id); err != nil {
|
||||
return nil, repository.ErrInvalidInput
|
||||
}
|
||||
|
||||
return &uuidID, nil
|
||||
}
|
||||
Reference in New Issue
Block a user