# mikhaildadaev/uuid architecture

> Architecture diagram of the GitHub repository mikhaildadaev/uuid, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mikhaildadaev/uuid
- Repository: https://github.com/mikhaildadaev/uuid

## Overview

This is a small Go UUID library, not a service: callers generate, parse, validate, inspect, and convert UUID values through its package API. Core generation uses shared runtime facilities for initialization, randomness, clocks, and sequence tracking; separate adapters provide binary/JSON/text marshaling and database/sql support. The excerpts show these relationships directly, while the README documents the complete feature set, including UUID versions whose generation code was not fully excerpted.

Main entry points: [`core.go`](https://github.com/mikhaildadaev/uuid/blob/main/core.go) (UUID Operations), [`marshal.go`](https://github.com/mikhaildadaev/uuid/blob/main/marshal.go) (Serialization), [`sql.go`](https://github.com/mikhaildadaev/uuid/blob/main/sql.go) (SQL Adapter), [`uuid.go`](https://github.com/mikhaildadaev/uuid/blob/main/uuid.go) (Generation Runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["UUID Core"]
  node_uuid_api["UUID Operations<br/>[core.go]"]
  node_runtime["Generation Runtime<br/>[uuid.go]"]
end

subgraph group_adapters["Interoperability"]
  node_marshal["Serialization<br/>[marshal.go]"]
  node_sql["SQL Adapter<br/>[sql.go]"]
end

node_caller(("Go Caller"))

node_caller -->|"generates, parses"| node_uuid_api
node_uuid_api -->|"uses initialization, clocks"| node_runtime
node_caller -->|"marshals values"| node_marshal
node_caller -->|"scans, binds"| node_sql
node_marshal -->|"parses values"| node_uuid_api
node_sql -->|"parses, formats"| node_uuid_api

click node_uuid_api "https://github.com/mikhaildadaev/uuid/blob/main/core.go"
click node_runtime "https://github.com/mikhaildadaev/uuid/blob/main/uuid.go"
click node_marshal "https://github.com/mikhaildadaev/uuid/blob/main/marshal.go"
click node_sql "https://github.com/mikhaildadaev/uuid/blob/main/sql.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_uuid_api,node_runtime toneBlue
class node_marshal,node_sql toneAmber
class node_caller toneIndigo
```

## Components

### UUID Core

- [UUID Operations](https://github.com/mikhaildadaev/uuid/blob/main/core.go): `core.go`
- [Generation Runtime](https://github.com/mikhaildadaev/uuid/blob/main/uuid.go): `uuid.go`

### Interoperability

- [Serialization](https://github.com/mikhaildadaev/uuid/blob/main/marshal.go): `marshal.go`
- [SQL Adapter](https://github.com/mikhaildadaev/uuid/blob/main/sql.go): `sql.go`

### Other components

- **Go Caller**

## Connections

- Go Caller → UUID Operations: generates, parses (evidence: `README.md`)
- UUID Operations → Generation Runtime: uses initialization, clocks (evidence: `core.go`)
- Go Caller → Serialization: marshals values (evidence: `README.md`)
- Go Caller → SQL Adapter: scans, binds (evidence: `README.md`)
- Serialization → UUID Operations: parses values (evidence: `marshal.go`)
- SQL Adapter → UUID Operations: parses, formats (evidence: `sql.go`)
