~bigbes/core-go

ref: 67e655222767f9737a564a5cba19d3c268e9b2ac core-go/model/rid.go -rw-r--r-- 1.5 KiB
0c56cc14 — Simon Martin 6 months ago
model: support unmarshalling RIDs from string

hub stores list/repo/tracker RIDs as strings in its database, and I want
to return those as GQL IDs, not strings, in the upcoming GQL API. This
is not possible without this patch since those strings are not UUIDs but
marshalled ones.

Signed-off-by: Simon Martin <simon@nasilyan.com>
34c2db68 — Drew DeVault 6 months ago
model: rename ID => RID, implement sql Valuer

As in "Resource" ID. I also changed the base32 alphabet to lowercase,
because I subjectively think it looks nicer.
39c3fd1e — Conrad Hoffmann 9 months ago
Run modernize

See https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize

It's mostly interface{} -> any, but also two quite useful applications
of slices.Contains.
e359a4d5 — Drew DeVault 9 months ago
gofmt
565df04e — Drew DeVault 10 months ago
model: introduce ID type

Based on UUIDv7 but represented to users in a more compact base32 form,
though all of that are internal implementation details.