| 1 | package store |
| 2 | |
| 3 | import "example.com/curator/internal/config" |
| 4 | |
| 5 | // ModuleResolver abstracts module lookup for the server. |
| 6 | type ModuleResolver interface { |
| 7 | ResolveModule(name string) (config.Module, bool) |
| 8 | } |
| 9 | |
| 10 | // ModuleRow represents a module stored in the database. |
| 11 | type ModuleRow struct { |
| 12 | Name string `json:"name"` |
| 13 | VCS string `json:"vcs"` |
| 14 | Repo string `json:"repo"` |
| 15 | Web string `json:"web"` |
| 16 | Private bool `json:"private"` |
| 17 | CreatedAt string `json:"created_at,omitempty"` |
| 18 | } |
| 19 | |
| 20 | // PatternRow represents a module pattern stored in the database. |
| 21 | type PatternRow struct { |
| 22 | ID int64 `json:"id"` |
| 23 | Pattern string `json:"pattern"` |
| 24 | VCS string `json:"vcs"` |
| 25 | Repo string `json:"repo"` |
| 26 | Web string `json:"web"` |
| 27 | Private bool `json:"private"` |
| 28 | Priority int `json:"priority"` |
| 29 | CreatedAt string `json:"created_at,omitempty"` |
| 30 | } |
| 31 | |