(batchID string)
| 352 | } |
| 353 | |
| 354 | func ValidateID(batchID string) error { |
| 355 | batchID = strings.TrimSpace(batchID) |
| 356 | |
| 357 | parsed, err := uuid.Parse(batchID) |
| 358 | if err != nil || parsed.String() != batchID { |
| 359 | return fmt.Errorf("%w: %s", ErrInvalidID, batchID) |
| 360 | } |
| 361 | |
| 362 | return nil |
| 363 | } |
| 364 | |
| 365 | func ValidateIdentity(state *State, identity Identity) error { |
| 366 | switch { |