Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c97722812f | ||
|
|
df4e3c326f | ||
|
|
4eb1a2b1f4 | ||
|
|
6beb46a657 | ||
|
|
aaf58ce88f | ||
|
|
18f62452c2 | ||
|
|
a262d9a757 | ||
|
|
cd5a5fbc67 | ||
|
|
8532ab3a93 | ||
|
|
6b6f773420 | ||
|
|
8a6859d798 | ||
|
|
63a76b4598 | ||
|
|
9a110b3903 | ||
|
|
4711a1f4a6 | ||
|
|
0ef92fe728 | ||
|
|
35a9e3fc9d | ||
|
|
4d1fff6b3c | ||
|
|
b69a5d3e58 | ||
|
|
c0eee62491 | ||
|
|
9738306777 | ||
|
|
72deb97f98 | ||
|
|
13855b18b8 | ||
|
|
84b18860b5 | ||
|
|
d38f599974 | ||
|
|
bf39948c69 | ||
|
|
8a2a34373b | ||
|
|
bcdc4a4eff | ||
|
|
7a0bc04290 | ||
|
|
cbb17084f0 | ||
|
|
7ce06d8ea2 | ||
|
|
78726daad4 | ||
|
|
f0542cec0e | ||
|
|
5c500fd5ba | ||
|
|
bdcee385e7 | ||
|
|
ece1524e59 | ||
|
|
cbb025049d | ||
|
|
923ef9a82f | ||
|
|
7ff4d5769c | ||
|
|
2e4aa4ca40 | ||
|
|
016d737a1d | ||
|
|
156d19798e | ||
|
|
a88a8532cd | ||
|
|
31465de903 | ||
|
|
2a8ce08d90 | ||
|
|
6a89afb3f7 | ||
|
|
a3af630434 | ||
|
|
f5fcdeef8d | ||
|
|
717c036a23 | ||
|
|
d6790c4775 | ||
|
|
0a7c55f0c5 | ||
|
|
5ce24c722e | ||
|
|
7c5c15d9b8 | ||
|
|
72d82f5051 | ||
|
|
5c1f2ebb75 | ||
|
|
6469dd28ce | ||
|
|
318e77145a | ||
|
|
66a4d5dfdc | ||
|
|
0acb29e7fd | ||
|
|
7f15babe68 | ||
|
|
0949011ad2 | ||
|
|
e542b44ebb | ||
|
|
b1c4f41f55 | ||
|
|
01d35c720f | ||
|
|
f6b02a9fa6 | ||
|
|
ab5617035e | ||
|
|
6a8a08cdc7 | ||
|
|
6094fcdf3b | ||
|
|
4c7b0116f9 | ||
|
|
5afa1fb75d | ||
|
|
92b2b602bd | ||
|
|
b93360e8c8 | ||
|
|
e8276d7ef6 | ||
|
|
e06e3ad07c | ||
|
|
cdef725c64 | ||
|
|
5a30b635ff | ||
|
|
4daa54bd4f | ||
|
|
4d9ca08923 | ||
|
|
4763ad6511 | ||
|
|
aea60b40eb | ||
|
|
3edb19373e | ||
|
|
0b69c90722 | ||
|
|
6363040e54 | ||
|
|
b812c9875f | ||
|
|
102aaf7fb6 | ||
|
|
b57a39554b | ||
|
|
538055f951 | ||
|
|
229fddff03 | ||
|
|
1bac8afcf4 | ||
|
|
59be811bda | ||
|
|
1a620a27da | ||
|
|
3338c8d7f3 | ||
|
|
8fe1ce984d | ||
|
|
1e3a62f0ec | ||
|
|
6dd6fd61db | ||
|
|
d0188d0c26 | ||
|
|
026a3b6d09 | ||
|
|
2b85a65f3c | ||
|
|
1ce6fa895f | ||
|
|
c52fa80449 | ||
|
|
8cb76eff37 | ||
|
|
ed86526da0 | ||
|
|
cec99cb080 | ||
|
|
7d58db63b2 | ||
|
|
b021571544 | ||
|
|
3bf1255c66 | ||
|
|
a8193318ff | ||
|
|
56dabf32ec | ||
|
|
531d0b4fc1 | ||
|
|
a26dcd02ff | ||
|
|
a7b1c93cac | ||
|
|
3a1f7fbb7f | ||
|
|
eb29706040 | ||
|
|
09375dbc48 | ||
|
|
f1d493ac60 | ||
|
|
f806248829 | ||
|
|
3f22773f58 | ||
|
|
d2d053e559 | ||
|
|
7ea5624734 | ||
|
|
f8a1a5ee58 | ||
|
|
71922e8004 | ||
|
|
b2caaa6b60 | ||
|
|
3f07e99fa1 | ||
|
|
111c2e4b19 | ||
|
|
4e50a051d0 | ||
|
|
9d70c0462a | ||
|
|
39cf6fbb8c | ||
|
|
9a4b05d897 | ||
|
|
c4829cf280 | ||
|
|
43765101f5 | ||
|
|
7dddc70eda | ||
|
|
6be8e90e26 | ||
|
|
ec4c1895c8 |
No files matched your search
@@ -19,8 +19,8 @@ jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version: 'stable'
|
||||
- name: Generate and format check
|
||||
@@ -35,8 +35,8 @@ jobs:
|
||||
vulnerabilities:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version: 'stable'
|
||||
- name: Check vulnerabilities
|
||||
@@ -47,13 +47,13 @@ jobs:
|
||||
check-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: '24'
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version: 'stable'
|
||||
- name: Check goreleaser config
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
BUILDTOOLS_CONTENT: ${{ secrets.BUILDTOOLS_CONTENT }}
|
||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
- uses: buildtool/setup-buildtools-action@v1
|
||||
- name: Build and push
|
||||
run: unset GITEA_TOKEN && build && push
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||
environment: prod
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
- uses: buildtool/setup-buildtools-action@v1
|
||||
- name: Deploy to production
|
||||
run: deploy prod
|
||||
@@ -12,19 +12,19 @@ jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v6
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: '24'
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version: 'stable'
|
||||
- name: Install goreleaser
|
||||
uses: goreleaser/goreleaser-action@v7
|
||||
with:
|
||||
version: 'v2.13.3'
|
||||
version: 'v2.18.2'
|
||||
install-only: true
|
||||
- name: Release
|
||||
run: |
|
||||
|
||||
@@ -13,11 +13,11 @@ jobs:
|
||||
env:
|
||||
SKIP: no-commit-to-branch
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-go@v6
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version: 'stable'
|
||||
- uses: actions/setup-python@v6
|
||||
- uses: actions/setup-python@v7
|
||||
with:
|
||||
python-version: '3.14'
|
||||
- name: Install goimports
|
||||
|
||||
@@ -11,7 +11,7 @@ repos:
|
||||
- --allow-multiple-documents
|
||||
- id: check-added-large-files
|
||||
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
|
||||
rev: v9.25.0
|
||||
rev: v9.27.0
|
||||
hooks:
|
||||
- id: commitlint
|
||||
stages: [ commit-msg ]
|
||||
@@ -30,7 +30,7 @@ repos:
|
||||
- id: go-test
|
||||
- id: gofumpt
|
||||
- repo: https://github.com/golangci/golangci-lint
|
||||
rev: v2.12.2
|
||||
rev: v2.14.0
|
||||
hooks:
|
||||
- id: golangci-lint-full
|
||||
- repo: https://github.com/gitleaks/gitleaks
|
||||
|
||||
@@ -9,7 +9,7 @@ This is a GraphQL schema registry service that manages federated GraphQL schemas
|
||||
## Architecture
|
||||
|
||||
### Event Sourcing
|
||||
The system uses event sourcing via `gitlab.com/unboundsoftware/eventsourced`. Key domain aggregates are:
|
||||
The system uses event sourcing via `codeberg.org/eventsourced`. Key domain aggregates are:
|
||||
- **Organization** (domain/aggregates.go): Manages organizations, users, and API keys
|
||||
- **SubGraph** (domain/aggregates.go): Tracks subgraph schemas with versioning
|
||||
|
||||
|
||||
+6
-4
@@ -1,4 +1,4 @@
|
||||
FROM amd64/golang:1.26.3@sha256:f9a8afb8a11d7e9220a5e61cedf2bb34babc7618ee51838e16c120fc74e0d92f as modules
|
||||
FROM amd64/golang:1.27.1@sha256:2c9f73fbc9fe381c63ba57bcbab4ea1c9135604011985a0891bc5fe5d1febfca as modules
|
||||
WORKDIR /build
|
||||
ADD go.* /build
|
||||
RUN go mod download
|
||||
@@ -24,14 +24,16 @@ RUN GOOS=linux GOARCH=amd64 go build \
|
||||
FROM scratch as export
|
||||
COPY --from=build /build/coverage.txt /
|
||||
|
||||
FROM node:24.15.0-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f
|
||||
FROM node:24.21.0-alpine@sha256:ebfe2f90462722a7a4de65e91990e97fe0d401c70e0e762c5b53302f905ec1c1
|
||||
ENV TZ Europe/Stockholm
|
||||
|
||||
# Install wgc CLI globally for Cosmo Router composition
|
||||
RUN npm install -g wgc@latest
|
||||
|
||||
# Cap Node.js heap for runtime wgc invocations to prevent OOM
|
||||
ENV NODE_OPTIONS="--max-old-space-size=64"
|
||||
# Cap Node.js heap for runtime wgc invocations. 512MB leaves room for
|
||||
# composing supergraphs with many subgraphs; lower caps (e.g. 64MB) OOM
|
||||
# wgc as the subgraph count grows.
|
||||
ENV NODE_OPTIONS="--max-old-space-size=512"
|
||||
|
||||
# Copy timezone data and certificates
|
||||
COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo
|
||||
|
||||
Vendored
+101
-6
@@ -6,10 +6,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/sparetimecoders/goamqp"
|
||||
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
|
||||
"gitea.unbound.se/unboundsoftware/schemas/domain"
|
||||
"gitea.unbound.se/unboundsoftware/schemas/graph/model"
|
||||
"gitea.unbound.se/unboundsoftware/schemas/hash"
|
||||
)
|
||||
|
||||
@@ -21,9 +21,19 @@ type Cache struct {
|
||||
services map[string]map[string]map[string]struct{}
|
||||
subGraphs map[string]string
|
||||
lastUpdate map[string]string
|
||||
mergedSDLs map[string]*mergedSDLEntry
|
||||
schemaUpdates map[string]*model.SchemaUpdate
|
||||
logger *slog.Logger
|
||||
}
|
||||
|
||||
// mergedSDLEntry holds a precomputed merged SDL together with the lastUpdate
|
||||
// id it was computed against, so stale entries can be detected on read.
|
||||
type mergedSDLEntry struct {
|
||||
ID string
|
||||
SDL string
|
||||
SubGraphs []*model.SubGraph
|
||||
}
|
||||
|
||||
func (c *Cache) OrganizationByAPIKey(apiKey string) *domain.Organization {
|
||||
c.mu.RLock()
|
||||
defer c.mu.RUnlock()
|
||||
@@ -91,6 +101,30 @@ func (c *Cache) Services(orgId, ref, lastUpdate string) ([]string, string) {
|
||||
return services, c.lastUpdate[key]
|
||||
}
|
||||
|
||||
// OrgRef identifies a single (organizationId, ref) pair that the cache
|
||||
// tracks subgraphs for.
|
||||
type OrgRef struct {
|
||||
OrgId string
|
||||
Ref string
|
||||
}
|
||||
|
||||
// AllOrgRefs returns every (orgId, ref) pair that currently has at least
|
||||
// one subgraph in the cache. Used by startup warmup to pre-compute the
|
||||
// merged SDL and SchemaUpdate for every known ref before the pod starts
|
||||
// serving traffic.
|
||||
func (c *Cache) AllOrgRefs() []OrgRef {
|
||||
c.mu.RLock()
|
||||
defer c.mu.RUnlock()
|
||||
|
||||
var out []OrgRef
|
||||
for orgId, refs := range c.services {
|
||||
for ref := range refs {
|
||||
out = append(out, OrgRef{OrgId: orgId, Ref: ref})
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func (c *Cache) SubGraphId(orgId, ref, service string) string {
|
||||
c.mu.RLock()
|
||||
defer c.mu.RUnlock()
|
||||
@@ -98,7 +132,7 @@ func (c *Cache) SubGraphId(orgId, ref, service string) string {
|
||||
return c.subGraphs[subGraphKey(orgId, ref, service)]
|
||||
}
|
||||
|
||||
func (c *Cache) Update(msg any, _ goamqp.Headers) (any, error) {
|
||||
func (c *Cache) Update(msg any) error {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
|
||||
@@ -184,8 +218,11 @@ func (c *Cache) Update(msg any, _ goamqp.Headers) (any, error) {
|
||||
for service := range refs[ref] {
|
||||
delete(c.subGraphs, subGraphKey(orgId, ref, service))
|
||||
}
|
||||
// Remove lastUpdate for this org/ref
|
||||
delete(c.lastUpdate, refKey(orgId, ref))
|
||||
// Remove cached results for this org/ref
|
||||
rk := refKey(orgId, ref)
|
||||
delete(c.lastUpdate, rk)
|
||||
delete(c.mergedSDLs, rk)
|
||||
delete(c.schemaUpdates, rk)
|
||||
}
|
||||
delete(c.services, orgId)
|
||||
}
|
||||
@@ -212,7 +249,7 @@ func (c *Cache) Update(msg any, _ goamqp.Headers) (any, error) {
|
||||
default:
|
||||
c.logger.With("msg", msg).Warn("unexpected message received")
|
||||
}
|
||||
return nil, nil
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Cache) updateSubGraph(orgId string, ref string, subGraphId string, service string, updated time.Time) {
|
||||
@@ -253,10 +290,68 @@ func New(logger *slog.Logger) *Cache {
|
||||
services: make(map[string]map[string]map[string]struct{}),
|
||||
subGraphs: make(map[string]string),
|
||||
lastUpdate: make(map[string]string),
|
||||
mergedSDLs: make(map[string]*mergedSDLEntry),
|
||||
schemaUpdates: make(map[string]*model.SchemaUpdate),
|
||||
logger: logger,
|
||||
}
|
||||
}
|
||||
|
||||
// GetMergedSDL returns the cached merged SDL for (orgId, ref) if it was
|
||||
// computed against the current lastUpdate. Returns nil when missing or stale.
|
||||
func (c *Cache) GetMergedSDL(orgId, ref string) *mergedSDLEntry {
|
||||
c.mu.RLock()
|
||||
defer c.mu.RUnlock()
|
||||
|
||||
key := refKey(orgId, ref)
|
||||
entry := c.mergedSDLs[key]
|
||||
if entry == nil || entry.ID != c.lastUpdate[key] {
|
||||
return nil
|
||||
}
|
||||
return entry
|
||||
}
|
||||
|
||||
// MergedSDLEntry exposes the cached merged SDL fields to callers.
|
||||
func (e *mergedSDLEntry) Unpack() (id, sdl string, subGraphs []*model.SubGraph) {
|
||||
return e.ID, e.SDL, e.SubGraphs
|
||||
}
|
||||
|
||||
// SetMergedSDL stores a precomputed merged SDL for (orgId, ref). The entry
|
||||
// is only retained while c.lastUpdate[key] matches id; subsequent updates
|
||||
// invalidate it implicitly via the version mismatch in GetMergedSDL.
|
||||
func (c *Cache) SetMergedSDL(orgId, ref, id, sdl string, subGraphs []*model.SubGraph) {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
|
||||
c.mergedSDLs[refKey(orgId, ref)] = &mergedSDLEntry{
|
||||
ID: id,
|
||||
SDL: sdl,
|
||||
SubGraphs: subGraphs,
|
||||
}
|
||||
}
|
||||
|
||||
// GetSchemaUpdate returns the cached SchemaUpdate (subgraphs + cosmo router
|
||||
// config) for (orgId, ref) when its id matches the current lastUpdate.
|
||||
// Returns nil when missing or stale.
|
||||
func (c *Cache) GetSchemaUpdate(orgId, ref string) *model.SchemaUpdate {
|
||||
c.mu.RLock()
|
||||
defer c.mu.RUnlock()
|
||||
|
||||
key := refKey(orgId, ref)
|
||||
upd := c.schemaUpdates[key]
|
||||
if upd == nil || upd.ID != c.lastUpdate[key] {
|
||||
return nil
|
||||
}
|
||||
return upd
|
||||
}
|
||||
|
||||
// SetSchemaUpdate stores a precomputed SchemaUpdate for (orgId, ref).
|
||||
func (c *Cache) SetSchemaUpdate(orgId, ref string, update *model.SchemaUpdate) {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
|
||||
c.schemaUpdates[refKey(orgId, ref)] = update
|
||||
}
|
||||
|
||||
func refKey(orgId string, ref string) string {
|
||||
return fmt.Sprintf("%s<->%s", orgId, ref)
|
||||
}
|
||||
|
||||
Vendored
+10
-10
@@ -7,10 +7,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
|
||||
"gitea.unbound.se/unboundsoftware/schemas/domain"
|
||||
"gitea.unbound.se/unboundsoftware/schemas/hash"
|
||||
@@ -208,7 +208,7 @@ func TestCache_Update_OrganizationAdded(t *testing.T) {
|
||||
}
|
||||
event.ID = *eventsourced.IdFromString(orgID)
|
||||
|
||||
_, err := c.Update(event, nil)
|
||||
err := c.Update(event)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Verify organization was added
|
||||
@@ -247,7 +247,7 @@ func TestCache_Update_APIKeyAdded(t *testing.T) {
|
||||
}
|
||||
event.ID = *eventsourced.IdFromString(uuid.New().String())
|
||||
|
||||
_, err := c.Update(event, nil)
|
||||
err := c.Update(event)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Verify API key was added to cache
|
||||
@@ -281,7 +281,7 @@ func TestCache_Update_SubGraphUpdated(t *testing.T) {
|
||||
event.ID = *eventsourced.IdFromString(subGraphID)
|
||||
event.SetWhen(time.Now())
|
||||
|
||||
_, err := c.Update(event, nil)
|
||||
err := c.Update(event)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Verify subgraph was added to services
|
||||
@@ -366,7 +366,7 @@ func TestCache_ConcurrentWrites(t *testing.T) {
|
||||
Initiator: "user-" + string(rune(index)),
|
||||
}
|
||||
event.ID = *eventsourced.IdFromString(orgID)
|
||||
_, err := c.Update(event, nil)
|
||||
err := c.Update(event)
|
||||
assert.NoError(t, err)
|
||||
}(i)
|
||||
}
|
||||
@@ -423,7 +423,7 @@ func TestCache_ConcurrentReadsAndWrites(t *testing.T) {
|
||||
Initiator: "user-new-" + string(rune(index)),
|
||||
}
|
||||
event.ID = *eventsourced.IdFromString(newOrgID)
|
||||
_, err := c.Update(event, nil)
|
||||
err := c.Update(event)
|
||||
assert.NoError(t, err)
|
||||
}(i)
|
||||
}
|
||||
@@ -471,7 +471,7 @@ func TestCache_Update_APIKeyRemoved(t *testing.T) {
|
||||
}
|
||||
event.ID = *eventsourced.IdFromString(orgID)
|
||||
|
||||
_, err := c.Update(event, nil)
|
||||
err := c.Update(event)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Verify API key was removed from cache
|
||||
@@ -523,7 +523,7 @@ func TestCache_Update_APIKeyRemoved_MultipleKeys(t *testing.T) {
|
||||
}
|
||||
event.ID = *eventsourced.IdFromString(orgID)
|
||||
|
||||
_, err := c.Update(event, nil)
|
||||
err := c.Update(event)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Verify only key2 was removed
|
||||
@@ -579,7 +579,7 @@ func TestCache_Update_OrganizationRemoved(t *testing.T) {
|
||||
}
|
||||
event.ID = *eventsourced.IdFromString(orgID)
|
||||
|
||||
_, err := c.Update(event, nil)
|
||||
err := c.Update(event)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Verify organization was removed
|
||||
@@ -633,7 +633,7 @@ func TestCache_Update_OrganizationRemoved_MultipleUsers(t *testing.T) {
|
||||
}
|
||||
event.ID = *eventsourced.IdFromString(orgID)
|
||||
|
||||
_, err := c.Update(event, nil)
|
||||
err := c.Update(event)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Verify user1 still has otherOrgID but not removed orgID
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"testing"
|
||||
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
goamqp "codeberg.org/messaging/go-messaging-amqp"
|
||||
spec "codeberg.org/messaging/messaging"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitea.unbound.se/unboundsoftware/schemas/cache"
|
||||
"gitea.unbound.se/unboundsoftware/schemas/domain"
|
||||
)
|
||||
|
||||
// ownKeys is a literal list on purpose: deriving it from the code would keep a renamed key green.
|
||||
var ownKeys = []string{
|
||||
"SubGraph.Updated",
|
||||
"Organization.Added",
|
||||
"Organization.UserAdded",
|
||||
"Organization.APIKeyAdded",
|
||||
"Organization.APIKeyRemoved",
|
||||
"Organization.Removed",
|
||||
}
|
||||
|
||||
func Test_amqpSetups(t *testing.T) {
|
||||
setups := amqpSetups(slog.Default(), make(chan error, 1), goamqp.NewPublisher(), cache.New(slog.Default()))
|
||||
topology, err := goamqp.CollectTopology(serviceName, setups...)
|
||||
require.NoError(t, err)
|
||||
|
||||
var consumed, publishesTo []string
|
||||
for _, e := range topology.Endpoints {
|
||||
switch e.Direction {
|
||||
case spec.DirectionConsume:
|
||||
assert.True(t, e.Ephemeral, "cache consumers must be transient, %s is durable", e.QueueName)
|
||||
consumed = append(consumed, e.RoutingKey)
|
||||
case spec.DirectionPublish:
|
||||
publishesTo = append(publishesTo, e.ExchangeName)
|
||||
}
|
||||
}
|
||||
assert.ElementsMatch(t, ownKeys, consumed)
|
||||
assert.Equal(t, []string{"events.topic.exchange"}, publishesTo)
|
||||
}
|
||||
|
||||
type recordingPublisher struct {
|
||||
keys []string
|
||||
ctxs []context.Context
|
||||
}
|
||||
|
||||
func (r *recordingPublisher) Publish(ctx context.Context, routingKey string, _ any, _ ...goamqp.Header) error {
|
||||
r.keys = append(r.keys, routingKey)
|
||||
r.ctxs = append(r.ctxs, ctx)
|
||||
return nil
|
||||
}
|
||||
|
||||
func Test_newEventPublisher(t *testing.T) {
|
||||
rec := &recordingPublisher{}
|
||||
p, err := newEventPublisher(rec)
|
||||
require.NoError(t, err)
|
||||
|
||||
for _, e := range []eventsourced.Event{
|
||||
&domain.SubGraphUpdated{},
|
||||
&domain.OrganizationAdded{},
|
||||
&domain.UserAddedToOrganization{},
|
||||
&domain.APIKeyAdded{},
|
||||
&domain.APIKeyRemoved{},
|
||||
&domain.OrganizationRemoved{},
|
||||
} {
|
||||
require.NoError(t, p.Publish(context.Background(), e))
|
||||
}
|
||||
assert.Equal(t, ownKeys, rec.keys, "published keys must match what the cache consumers bind")
|
||||
}
|
||||
|
||||
func Test_uncancelledPublisher(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
cancel()
|
||||
rec := &recordingPublisher{}
|
||||
p, err := newEventPublisher(uncancelledPublisher{rec})
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NoError(t, p.Publish(ctx, &domain.OrganizationAdded{}))
|
||||
assert.NoError(t, rec.ctxs[0].Err(), "publish must not see the request's cancellation")
|
||||
}
|
||||
+70
-32
@@ -13,6 +13,11 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"codeberg.org/eventsourced/amqp"
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
"codeberg.org/eventsourced/pg/v2"
|
||||
goamqp "codeberg.org/messaging/go-messaging-amqp"
|
||||
spec "codeberg.org/messaging/messaging"
|
||||
"github.com/99designs/gqlgen/graphql/handler"
|
||||
"github.com/99designs/gqlgen/graphql/handler/extension"
|
||||
"github.com/99designs/gqlgen/graphql/handler/lru"
|
||||
@@ -20,11 +25,7 @@ import (
|
||||
"github.com/99designs/gqlgen/graphql/playground"
|
||||
"github.com/alecthomas/kong"
|
||||
"github.com/rs/cors"
|
||||
"github.com/sparetimecoders/goamqp"
|
||||
"github.com/vektah/gqlparser/v2/ast"
|
||||
"gitlab.com/unboundsoftware/eventsourced/amqp"
|
||||
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
"gitlab.com/unboundsoftware/eventsourced/pg"
|
||||
|
||||
"gitea.unbound.se/unboundsoftware/schemas/cache"
|
||||
"gitea.unbound.se/unboundsoftware/schemas/domain"
|
||||
@@ -57,7 +58,8 @@ func main() {
|
||||
var cli CLI
|
||||
_ = kong.Parse(&cli)
|
||||
logger := logging.SetupLogger(cli.LogLevel, cli.LogFormat, serviceName, buildVersion)
|
||||
closeEvents := make(chan error)
|
||||
// buffered: go-messaging-amqp reports a lost connection without blocking
|
||||
closeEvents := make(chan error, 1)
|
||||
|
||||
if err := start(
|
||||
closeEvents,
|
||||
@@ -66,6 +68,13 @@ func main() {
|
||||
cli,
|
||||
); err != nil {
|
||||
logger.With("error", err).Error("process error")
|
||||
// start() defers the OTel SDK shutdown, so by the time we get here the
|
||||
// log exporter may already be torn down and the line above never
|
||||
// reaches Alloy. Write to stderr too so startup failures are always
|
||||
// visible in `kubectl logs`, and exit non-zero so the container is
|
||||
// reported as failed (CrashLoopBackOff) instead of "Completed".
|
||||
fmt.Fprintf(os.Stderr, "fatal: process error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +116,7 @@ func start(closeEvents chan error, logger *slog.Logger, connectToAmqpFunc func(u
|
||||
}
|
||||
|
||||
publisher := goamqp.NewPublisher()
|
||||
eventPublisher, err := amqp.New(publisher)
|
||||
eventPublisher, err := newEventPublisher(uncancelledPublisher{publisher})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create event publisher: %v", err)
|
||||
}
|
||||
@@ -123,25 +132,7 @@ func start(closeEvents chan error, logger *slog.Logger, connectToAmqpFunc func(u
|
||||
if err := loadSubGraphs(rootCtx, eventStore, serviceCache); err != nil {
|
||||
return fmt.Errorf("caching subgraphs: %w", err)
|
||||
}
|
||||
setups := []goamqp.Setup{
|
||||
goamqp.UseLogger(func(s string) { logger.Error(s) }),
|
||||
goamqp.CloseListener(closeEvents),
|
||||
goamqp.WithPrefetchLimit(20),
|
||||
goamqp.EventStreamPublisher(publisher),
|
||||
goamqp.TransientEventStreamConsumer("SubGraph.Updated", serviceCache.Update, domain.SubGraphUpdated{}),
|
||||
goamqp.TransientEventStreamConsumer("Organization.Added", serviceCache.Update, domain.OrganizationAdded{}),
|
||||
goamqp.TransientEventStreamConsumer("Organization.UserAdded", serviceCache.Update, domain.UserAddedToOrganization{}),
|
||||
goamqp.TransientEventStreamConsumer("Organization.APIKeyAdded", serviceCache.Update, domain.APIKeyAdded{}),
|
||||
goamqp.TransientEventStreamConsumer("Organization.APIKeyRemoved", serviceCache.Update, domain.APIKeyRemoved{}),
|
||||
goamqp.TransientEventStreamConsumer("Organization.Removed", serviceCache.Update, domain.OrganizationRemoved{}),
|
||||
goamqp.WithTypeMapping("SubGraph.Updated", domain.SubGraphUpdated{}),
|
||||
goamqp.WithTypeMapping("Organization.Added", domain.OrganizationAdded{}),
|
||||
goamqp.WithTypeMapping("Organization.UserAdded", domain.UserAddedToOrganization{}),
|
||||
goamqp.WithTypeMapping("Organization.APIKeyAdded", domain.APIKeyAdded{}),
|
||||
goamqp.WithTypeMapping("Organization.APIKeyRemoved", domain.APIKeyRemoved{}),
|
||||
goamqp.WithTypeMapping("Organization.Removed", domain.OrganizationRemoved{}),
|
||||
}
|
||||
if err := conn.Start(rootCtx, setups...); err != nil {
|
||||
if err := conn.Start(rootCtx, amqpSetups(logger, closeEvents, publisher, serviceCache)...); err != nil {
|
||||
return fmt.Errorf("failed to setup AMQP: %v", err)
|
||||
}
|
||||
|
||||
@@ -174,10 +165,13 @@ func start(closeEvents chan error, logger *slog.Logger, connectToAmqpFunc func(u
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
err := <-closeEvents
|
||||
if err != nil {
|
||||
logger.With("error", err).Error("received close from AMQP")
|
||||
rootCancel()
|
||||
select {
|
||||
case err := <-closeEvents:
|
||||
if err != nil {
|
||||
logger.With("error", err).Error("received close from AMQP")
|
||||
rootCancel()
|
||||
}
|
||||
case <-rootCtx.Done():
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -193,7 +187,6 @@ func start(closeEvents chan error, logger *slog.Logger, connectToAmqpFunc func(u
|
||||
logger.With("error", err).Error("close http server")
|
||||
}
|
||||
close(sigint)
|
||||
close(closeEvents)
|
||||
}()
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
@@ -210,6 +203,8 @@ func start(closeEvents chan error, logger *slog.Logger, connectToAmqpFunc func(u
|
||||
Debouncer: graph.NewDebouncer(500 * time.Millisecond),
|
||||
}
|
||||
|
||||
resolver.WarmCache(rootCtx)
|
||||
|
||||
config := generated.Config{
|
||||
Resolvers: resolver,
|
||||
Complexity: generated.ComplexityRoot{},
|
||||
@@ -291,7 +286,7 @@ func loadOrganizations(ctx context.Context, eventStore eventsourced.EventStore,
|
||||
if _, err := eventsourced.NewHandler(ctx, organization, eventStore); err != nil {
|
||||
return err
|
||||
}
|
||||
_, err := serviceCache.Update(organization, nil)
|
||||
err := serviceCache.Update(organization)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -309,7 +304,7 @@ func loadSubGraphs(ctx context.Context, eventStore eventsourced.EventStore, serv
|
||||
if _, err := eventsourced.NewHandler(ctx, subGraph, eventStore); err != nil {
|
||||
return err
|
||||
}
|
||||
_, err := serviceCache.Update(subGraph, nil)
|
||||
err := serviceCache.Update(subGraph)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -317,6 +312,49 @@ func loadSubGraphs(ctx context.Context, eventStore eventsourced.EventStore, serv
|
||||
return nil
|
||||
}
|
||||
|
||||
func newEventPublisher(p amqp.BackingPublisher) (*amqp.Amqp, error) {
|
||||
return amqp.New(
|
||||
p,
|
||||
amqp.WithTypeMapping("SubGraph.Updated", domain.SubGraphUpdated{}),
|
||||
amqp.WithTypeMapping("Organization.Added", domain.OrganizationAdded{}),
|
||||
amqp.WithTypeMapping("Organization.UserAdded", domain.UserAddedToOrganization{}),
|
||||
amqp.WithTypeMapping("Organization.APIKeyAdded", domain.APIKeyAdded{}),
|
||||
amqp.WithTypeMapping("Organization.APIKeyRemoved", domain.APIKeyRemoved{}),
|
||||
amqp.WithTypeMapping("Organization.Removed", domain.OrganizationRemoved{}),
|
||||
)
|
||||
}
|
||||
|
||||
func amqpSetups(logger *slog.Logger, closeEvents chan error, publisher *goamqp.Publisher, serviceCache *cache.Cache) []goamqp.Setup {
|
||||
return []goamqp.Setup{
|
||||
goamqp.WithLogger(logger),
|
||||
goamqp.CloseListener(closeEvents),
|
||||
goamqp.EventStreamPublisher(publisher),
|
||||
goamqp.TransientEventStreamConsumer("SubGraph.Updated", cacheUpdater[domain.SubGraphUpdated](serviceCache)),
|
||||
goamqp.TransientEventStreamConsumer("Organization.Added", cacheUpdater[domain.OrganizationAdded](serviceCache)),
|
||||
goamqp.TransientEventStreamConsumer("Organization.UserAdded", cacheUpdater[domain.UserAddedToOrganization](serviceCache)),
|
||||
goamqp.TransientEventStreamConsumer("Organization.APIKeyAdded", cacheUpdater[domain.APIKeyAdded](serviceCache)),
|
||||
goamqp.TransientEventStreamConsumer("Organization.APIKeyRemoved", cacheUpdater[domain.APIKeyRemoved](serviceCache)),
|
||||
goamqp.TransientEventStreamConsumer("Organization.Removed", cacheUpdater[domain.OrganizationRemoved](serviceCache)),
|
||||
}
|
||||
}
|
||||
|
||||
// uncancelledPublisher detaches publishes from the request context: eventsourced publishes
|
||||
// right after storing an event, and a stored event must be published even if the client left.
|
||||
type uncancelledPublisher struct {
|
||||
amqp.BackingPublisher
|
||||
}
|
||||
|
||||
func (p uncancelledPublisher) Publish(ctx context.Context, routingKey string, msg any, headers ...goamqp.Header) error {
|
||||
return p.BackingPublisher.Publish(context.WithoutCancel(ctx), routingKey, msg, headers...)
|
||||
}
|
||||
|
||||
// cacheUpdater passes the payload as a pointer, which is what Cache.Update switches on
|
||||
func cacheUpdater[T any](c *cache.Cache) spec.EventHandler[T] {
|
||||
return func(_ context.Context, e spec.ConsumableEvent[T]) error {
|
||||
return c.Update(&e.Payload)
|
||||
}
|
||||
}
|
||||
|
||||
func ConnectAMQP(url string) (Connection, error) {
|
||||
return goamqp.NewFromURL(serviceName, url)
|
||||
}
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
"github.com/99designs/gqlgen/graphql/handler/transport"
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
|
||||
"gitea.unbound.se/unboundsoftware/schemas/domain"
|
||||
"gitea.unbound.se/unboundsoftware/schemas/hash"
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
)
|
||||
|
||||
type Organization struct {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
|
||||
"gitea.unbound.se/unboundsoftware/schemas/hash"
|
||||
)
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
|
||||
"gitea.unbound.se/unboundsoftware/schemas/hash"
|
||||
)
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package domain
|
||||
|
||||
import "gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
import "codeberg.org/eventsourced/eventsourced"
|
||||
|
||||
type OrganizationAdded struct {
|
||||
eventsourced.BaseEvent
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
)
|
||||
|
||||
func TestOrganizationAdded_UpdateOrganization(t *testing.T) {
|
||||
|
||||
@@ -1,54 +1,55 @@
|
||||
module gitea.unbound.se/unboundsoftware/schemas
|
||||
|
||||
go 1.25.7
|
||||
go 1.26.0
|
||||
|
||||
require (
|
||||
github.com/99designs/gqlgen v0.17.90
|
||||
codeberg.org/eventsourced/amqp v1.10.1
|
||||
codeberg.org/eventsourced/eventsourced v1.24.0
|
||||
codeberg.org/eventsourced/pg/v2 v2.3.0
|
||||
codeberg.org/messaging/go-messaging-amqp v0.0.6
|
||||
codeberg.org/messaging/messaging v0.0.5
|
||||
github.com/99designs/gqlgen v0.17.95
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.2
|
||||
github.com/Khan/genqlient v0.8.1
|
||||
github.com/alecthomas/kong v1.15.0
|
||||
github.com/alecthomas/kong v1.16.1
|
||||
github.com/apex/log v1.9.0
|
||||
github.com/auth0/go-jwt-middleware/v3 v3.1.0
|
||||
github.com/auth0/go-jwt-middleware/v3 v3.3.0
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/jmoiron/sqlx v1.4.0
|
||||
github.com/pressly/goose/v3 v3.27.1
|
||||
github.com/pressly/goose/v3 v3.28.0
|
||||
github.com/rs/cors v1.11.1
|
||||
github.com/sparetimecoders/goamqp v0.3.3
|
||||
github.com/stretchr/testify v1.11.1
|
||||
github.com/vektah/gqlparser/v2 v2.5.33
|
||||
github.com/wundergraph/graphql-go-tools/v2 v2.1.0
|
||||
gitlab.com/unboundsoftware/eventsourced/amqp v1.9.1
|
||||
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.19.4
|
||||
gitlab.com/unboundsoftware/eventsourced/pg v1.18.8
|
||||
go.opentelemetry.io/contrib/bridges/otelslog v0.18.0
|
||||
go.opentelemetry.io/otel v1.43.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.43.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.19.0
|
||||
go.opentelemetry.io/otel/log v0.19.0
|
||||
go.opentelemetry.io/otel/sdk v1.43.0
|
||||
go.opentelemetry.io/otel/sdk/log v0.19.0
|
||||
go.opentelemetry.io/otel/sdk/metric v1.43.0
|
||||
go.opentelemetry.io/otel/trace v1.43.0
|
||||
golang.org/x/crypto v0.51.0
|
||||
golang.org/x/sync v0.20.0
|
||||
github.com/stretchr/testify v1.12.1
|
||||
github.com/vektah/gqlparser/v2 v2.5.59
|
||||
github.com/wundergraph/graphql-go-tools/v2 v2.26.0
|
||||
go.opentelemetry.io/contrib/bridges/otelslog v0.20.1
|
||||
go.opentelemetry.io/otel v1.47.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.47.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.23.0
|
||||
go.opentelemetry.io/otel/log v1.47.0
|
||||
go.opentelemetry.io/otel/sdk v1.47.0
|
||||
go.opentelemetry.io/otel/sdk/log v1.47.0
|
||||
go.opentelemetry.io/otel/sdk/metric v1.47.0
|
||||
go.opentelemetry.io/otel/trace v1.47.0
|
||||
golang.org/x/crypto v0.57.0
|
||||
golang.org/x/sync v0.23.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/agnivade/levenshtein v1.2.1 // indirect
|
||||
github.com/buger/jsonparser v1.1.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/buger/jsonparser v1.1.2 // indirect
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/coder/websocket v1.8.15 // indirect
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
|
||||
github.com/go-logr/logr v1.4.3 // indirect
|
||||
github.com/go-logr/logr v1.4.4 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
|
||||
github.com/goccy/go-json v0.10.5 // indirect
|
||||
github.com/goccy/go-yaml v1.19.2 // indirect
|
||||
github.com/gorilla/websocket v1.5.1 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
||||
github.com/lestrrat-go/blackmagic v1.0.4 // indirect
|
||||
github.com/lestrrat-go/dsig v1.0.0 // indirect
|
||||
@@ -59,33 +60,39 @@ require (
|
||||
github.com/lestrrat-go/option/v2 v2.0.0 // indirect
|
||||
github.com/lib/pq v1.12.3 // indirect
|
||||
github.com/mfridman/interpolate v0.0.2 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/rabbitmq/amqp091-go v1.10.0 // indirect
|
||||
github.com/prometheus/client_golang v1.23.2 // indirect
|
||||
github.com/prometheus/client_model v0.6.2 // indirect
|
||||
github.com/prometheus/common v0.66.1 // indirect
|
||||
github.com/prometheus/procfs v0.22.0 // indirect
|
||||
github.com/rabbitmq/amqp091-go v1.15.0 // indirect
|
||||
github.com/segmentio/asm v1.2.1 // indirect
|
||||
github.com/sethvargo/go-retry v0.3.0 // indirect
|
||||
github.com/sethvargo/go-retry v0.4.0 // indirect
|
||||
github.com/sosodev/duration v1.4.0 // indirect
|
||||
github.com/stretchr/objx v0.5.2 // indirect
|
||||
github.com/stretchr/objx v0.5.3 // indirect
|
||||
github.com/tidwall/gjson v1.18.0 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
github.com/tidwall/pretty v1.2.1 // indirect
|
||||
github.com/tidwall/sjson v1.2.5 // indirect
|
||||
github.com/urfave/cli/v3 v3.8.0 // indirect
|
||||
github.com/urfave/cli/v3 v3.11.0 // indirect
|
||||
github.com/valyala/fastjson v1.6.7 // indirect
|
||||
github.com/wundergraph/astjson v1.1.0 // indirect
|
||||
github.com/wundergraph/go-arena v1.1.0 // indirect
|
||||
github.com/wundergraph/go-arena v1.3.0 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.43.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.47.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.11.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
golang.org/x/mod v0.35.0 // indirect
|
||||
golang.org/x/net v0.53.0 // indirect
|
||||
golang.org/x/sys v0.44.0 // indirect
|
||||
golang.org/x/text v0.37.0 // indirect
|
||||
golang.org/x/tools v0.44.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529 // indirect
|
||||
google.golang.org/grpc v1.80.0 // indirect
|
||||
google.golang.org/protobuf v1.36.11 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.2 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.5 // indirect
|
||||
golang.org/x/mod v0.41.0 // indirect
|
||||
golang.org/x/net v0.59.0 // indirect
|
||||
golang.org/x/sys v0.48.0 // indirect
|
||||
golang.org/x/text v0.42.0 // indirect
|
||||
golang.org/x/tools v0.49.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260928230214-8a89bd6388cc // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc // indirect
|
||||
google.golang.org/grpc v1.83.2 // indirect
|
||||
google.golang.org/protobuf v1.36.12 // indirect
|
||||
)
|
||||
@@ -1,26 +1,32 @@
|
||||
codeberg.org/eventsourced/amqp v1.10.1 h1:nGSG+lKbq8ibr7p8WBqSfH12uROQb+UXKg6BFnhquY4=
|
||||
codeberg.org/eventsourced/amqp v1.10.1/go.mod h1:qQLe1a9T56hrPc/lxtoXWTqU3fnsgulQ1j4luQLNpcg=
|
||||
codeberg.org/eventsourced/eventsourced v1.24.0 h1:yNB+74JNB/NHo7D8ZR/yQcTVDYrWnjFf0xUKLgViqRc=
|
||||
codeberg.org/eventsourced/eventsourced v1.24.0/go.mod h1:uy0HxejDdNFpI+Yp7VOEvjfEUFJQX1VkCZ4e4JyDp7Q=
|
||||
codeberg.org/eventsourced/pg/v2 v2.3.0 h1:g6kZ9DASeFrC8C+bDcXzbYD8409KHzWmyLOI5sCdNWI=
|
||||
codeberg.org/eventsourced/pg/v2 v2.3.0/go.mod h1:qPxl3382m7lbhbrEaxwSZ9PrAPoODj2+TqnV3tIKWzU=
|
||||
codeberg.org/messaging/go-messaging-amqp v0.0.6 h1:TAPcIspjjg44MNXwbcscW+ol1kIX49lnX2N3dsh0e0s=
|
||||
codeberg.org/messaging/go-messaging-amqp v0.0.6/go.mod h1:R4Hg1w964P7OP7vQ9AsXdd4KjgN/YlQ/9+XzXKpEVp4=
|
||||
codeberg.org/messaging/messaging v0.0.5 h1:/ueH90F4RNPUeeJIwdG9oVhDW7+XjCzwOYq8xc0kfQk=
|
||||
codeberg.org/messaging/messaging v0.0.5/go.mod h1:xyWLUcfaVzcN6GWk9uaQsxPVUC2Vm2S89mYZGdiWTWg=
|
||||
codeberg.org/messaging/messaging/tck v0.0.3 h1:a4Nr7ytFqEJloTOyVeAtMNgO9Fig1ZUirjW4FVlK0lc=
|
||||
codeberg.org/messaging/messaging/tck v0.0.3/go.mod h1:RiOsKXGAhNQK2STBVYGjhN0CFtmcrsEne1qUe15n8Q4=
|
||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||
filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo=
|
||||
filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc=
|
||||
github.com/99designs/gqlgen v0.17.90 h1:wSv6blm/PoplU6QoNw83EcQpNtC0HX3/+44vITJOzpk=
|
||||
github.com/99designs/gqlgen v0.17.90/go.mod h1:GqYrEwYsqCG8VaOsq2kJUCUKwAE1T+u2i+Nj7NtXiVI=
|
||||
github.com/99designs/gqlgen v0.17.95 h1:882h7F5iJImgtyUVttc4MOK2NbzbMYc2oyNeHqkjpP4=
|
||||
github.com/99designs/gqlgen v0.17.95/go.mod h1:kHYPrpwOXDU1OQyxIg3Z7nVXSnlUoHVWBY7CMJCAM4M=
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
|
||||
github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
|
||||
github.com/Khan/genqlient v0.8.1 h1:wtOCc8N9rNynRLXN3k3CnfzheCUNKBcvXmVv5zt6WCs=
|
||||
github.com/Khan/genqlient v0.8.1/go.mod h1:R2G6DzjBvCbhjsEajfRjbWdVglSH/73kSivC9TLWVjU=
|
||||
github.com/PuerkitoBio/goquery v1.12.0 h1:pAcL4g3WRXekcB9AU/y1mbKez2dbY2AajVhtkO8RIBo=
|
||||
github.com/PuerkitoBio/goquery v1.12.0/go.mod h1:802ej+gV2y7bbIhOIoPY5sT183ZW0YFofScC4q/hIpQ=
|
||||
github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM=
|
||||
github.com/agnivade/levenshtein v1.2.1/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU=
|
||||
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
|
||||
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
|
||||
github.com/alecthomas/kong v1.15.0 h1:BVJstKbpO73zKpmIu+m/aLRrNmWwxXPIGTNin9VmLVI=
|
||||
github.com/alecthomas/kong v1.15.0/go.mod h1:wrlbXem1CWqUV5Vbmss5ISYhsVPkBb1Yo7YKJghju2I=
|
||||
github.com/alecthomas/kong v1.16.1 h1:ixhCt93XkJ98kGposQ54+bl0IK6XwqB40AsMynU7Z8E=
|
||||
github.com/alecthomas/kong v1.16.1/go.mod h1:wrlbXem1CWqUV5Vbmss5ISYhsVPkBb1Yo7YKJghju2I=
|
||||
github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs=
|
||||
github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
|
||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
|
||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
|
||||
github.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kktS1LM=
|
||||
github.com/andybalholm/cascadia v1.3.3/go.mod h1:xNd9bqTn98Ln4DwST8/nG+H0yuB8Hmgu1YHNnWw0GeA=
|
||||
github.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0=
|
||||
github.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA=
|
||||
github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo=
|
||||
@@ -28,19 +34,24 @@ github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy
|
||||
github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys=
|
||||
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
|
||||
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
|
||||
github.com/auth0/go-jwt-middleware/v3 v3.1.0 h1:1aqVJA9K0+B6hP6qqMjTsJUk/L14sJSUjiTGW2/mY64=
|
||||
github.com/auth0/go-jwt-middleware/v3 v3.1.0/go.mod h1:BBZCQAXmqC/QfwzWyHOqF/kwN4C66eMeayy9QS6TgT4=
|
||||
github.com/auth0/go-jwt-middleware/v3 v3.3.0 h1:nRALRLGsUdWgxX0knqwp60YxiYypeZYfhr+yFCvHoGY=
|
||||
github.com/auth0/go-jwt-middleware/v3 v3.3.0/go.mod h1:WXL/zFf3nuQJWQOVj3hGUQ289ixKVSrFGwZn6LxaQsw=
|
||||
github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=
|
||||
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
|
||||
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk=
|
||||
github.com/buger/jsonparser v1.1.2/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
|
||||
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/coder/websocket v1.8.15 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNUA=
|
||||
github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 h1:NMZiJj8QnKe1LgsbDayM4UoHwbvwDRwnI3hwNaAHRnc=
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40=
|
||||
github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54 h1:SG7nF6SRlWhcT7cNTs5R6Hk4V2lcmLz2NsG2VnInyNo=
|
||||
@@ -51,13 +62,13 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8=
|
||||
github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
|
||||
github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo=
|
||||
github.com/go-sql-driver/mysql v1.9.3/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
|
||||
github.com/go-sql-driver/mysql v1.10.0 h1:Q+1LV8DkHJvSYAdR83XzuhDaTykuDx0l6fkXxoWCWfw=
|
||||
github.com/go-sql-driver/mysql v1.10.0/go.mod h1:M+cqaI7+xxXGG9swrdeUIoPG3Y3KCkF0pZej+SK+nWk=
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro=
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
|
||||
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
|
||||
@@ -73,10 +84,8 @@ github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
|
||||
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 h1:HWRh5R2+9EifMyIHV7ZV+MIZqgz+PMpZ14Jynv3O2Zs=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0/go.mod h1:JfhWUomR1baixubs02l85lZYYOm7LV6om4ceouMv45c=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 h1:/Tnpcb2E0Pz/tN9s3bfEY2Q8ePCEX9iuS+cneUwncnw=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0/go.mod h1:zOBXOsUaBSjKgmH4OGzV1esUpR3oUSCPYVd2cUBjKYY=
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
|
||||
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
|
||||
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
|
||||
@@ -89,14 +98,15 @@ github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o=
|
||||
github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY=
|
||||
github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0=
|
||||
github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE=
|
||||
github.com/klauspost/compress v1.19.2 h1:hMRETovs/pu/dVWN7zIT1PGG8t509MwT6bO7XSi26R8=
|
||||
github.com/klauspost/compress v1.19.2/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/lestrrat-go/blackmagic v1.0.4 h1:IwQibdnf8l2KoO+qC3uT4OaTWsW7tuRQXy9TRN9QanA=
|
||||
github.com/lestrrat-go/blackmagic v1.0.4/go.mod h1:6AWFyKNNj0zEXQYfTMPfZrAXUWUfTIZ5ECEUEJaijtw=
|
||||
github.com/lestrrat-go/dsig v1.0.0 h1:OE09s2r9Z81kxzJYRn07TFM9XA4akrUdoMwr0L8xj38=
|
||||
@@ -118,13 +128,21 @@ github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcncea
|
||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs=
|
||||
github.com/mattn/go-isatty v0.0.21/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
|
||||
github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI=
|
||||
github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
|
||||
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
|
||||
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||
github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY=
|
||||
github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg=
|
||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/nats-io/nats.go v1.52.0 h1:n3avV4VBsCgsdwh71TppsTwtv+QdPs7ntSKM8qJLGsc=
|
||||
github.com/nats-io/nats.go v1.52.0/go.mod h1:26HypzazeOkyO3/mqd1zZd53STJN0EjCYF9Uy2ZOBno=
|
||||
github.com/nats-io/nkeys v0.4.15 h1:JACV5jRVO9V856KOapQ7x+EY8Jo3qw1vJt/9Jpwzkk4=
|
||||
github.com/nats-io/nkeys v0.4.15/go.mod h1:CpMchTXC9fxA5zrMo4KpySxNjiDVvr8ANOSZdiNfUrs=
|
||||
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||
github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w=
|
||||
github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
@@ -132,12 +150,21 @@ github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pressly/goose/v3 v3.27.1 h1:6uEvcprBybDmW4hcz3gYujhARhye+GoWKhEWyzD5sh4=
|
||||
github.com/pressly/goose/v3 v3.27.1/go.mod h1:maruOxsPnIG2yHHyo8UqKWXYKFcH7Q76csUV7+7KYoM=
|
||||
github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzukfVhBw=
|
||||
github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pressly/goose/v3 v3.28.0 h1:D2M+iL31GmpZxSHOhX8mqyqAT3CXnokUmm0eKoSP+Vc=
|
||||
github.com/pressly/goose/v3 v3.28.0/go.mod h1:v26MOuB8bL3kzzrt3Vqhb3R0PRVsl8hFQKdrht/L6Rk=
|
||||
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
|
||||
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
|
||||
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
|
||||
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
|
||||
github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs=
|
||||
github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA=
|
||||
github.com/prometheus/procfs v0.22.0 h1:6q9+/JL9IKAPbCmBrv9n5O5Ty3NKnciV5X7YGw0oics=
|
||||
github.com/prometheus/procfs v0.22.0/go.mod h1:CvmFr/GVhIjIvWJZW3tgkODBQMRIf0EyWMQLHCHab58=
|
||||
github.com/rabbitmq/amqp091-go v1.15.0 h1:LEQL4/yp48/Wigt6A6XOu18RQRo8ZHtB5I/KZJn+gkw=
|
||||
github.com/rabbitmq/amqp091-go v1.15.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
@@ -154,23 +181,21 @@ github.com/segmentio/asm v1.2.1/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
|
||||
github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I=
|
||||
github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah2SE=
|
||||
github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas=
|
||||
github.com/sethvargo/go-retry v0.4.0 h1:9qy1OoIAxBL+gBYnkTnTnWle5wlfsXQlwRzIbbpdqPw=
|
||||
github.com/sethvargo/go-retry v0.4.0/go.mod h1:tvsjdKG6xfiCx4LSiUZ06kcv38xvdVQwv8R6/VnnVWg=
|
||||
github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=
|
||||
github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=
|
||||
github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs=
|
||||
github.com/sosodev/duration v1.4.0 h1:35ed0KiVFriGHHzZZJaZLgmTEEICIyt8Sx0RQfj9IjE=
|
||||
github.com/sosodev/duration v1.4.0/go.mod h1:RQIBBX0+fMLc/D9+Jb/fwvVmo0eZvDDEERAikUR6SDg=
|
||||
github.com/sparetimecoders/goamqp v0.3.3 h1:z/nfTPmrjeU/rIVuNOgsVLCimp3WFoNFvS3ZzXRJ6HE=
|
||||
github.com/sparetimecoders/goamqp v0.3.3/go.mod h1:W9NRCpWLE+Vruv2dcRSbszNil2O826d2Nv6kAkETW5o=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4=
|
||||
github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE=
|
||||
github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg=
|
||||
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
|
||||
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
|
||||
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
|
||||
@@ -188,95 +213,95 @@ github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj
|
||||
github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0=
|
||||
github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao=
|
||||
github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=
|
||||
github.com/urfave/cli/v3 v3.8.0 h1:XqKPrm0q4P0q5JpoclYoCAv0/MIvH/jZ2umzuf8pNTI=
|
||||
github.com/urfave/cli/v3 v3.8.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
|
||||
github.com/urfave/cli/v3 v3.11.0 h1:P/euJp99kb9p0tlVY+iYTLYYTAQlfl0hR2gUO1Img1Q=
|
||||
github.com/urfave/cli/v3 v3.11.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
|
||||
github.com/valyala/fastjson v1.6.7 h1:ZE4tRy0CIkh+qDc5McjatheGX2czdn8slQjomexVpBM=
|
||||
github.com/valyala/fastjson v1.6.7/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=
|
||||
github.com/vektah/gqlparser/v2 v2.5.33 h1:lRp8aIeNUNbimf/axZd7ETg24q06hBtPaas+TcvI/7E=
|
||||
github.com/vektah/gqlparser/v2 v2.5.33/go.mod h1:c1I28gSOVNzlfc4WuDlqU7voQnsqI6OG2amkBAFmgts=
|
||||
github.com/vektah/gqlparser/v2 v2.5.59 h1:7BfPIupBJ2yIKxD91/zv30d6chKQkerS4ylKmVy8r4g=
|
||||
github.com/vektah/gqlparser/v2 v2.5.59/go.mod h1:JNK+plRwKdXLsF/qPFPe5tE0z4s1WeroD9S5LR8um/Q=
|
||||
github.com/wundergraph/astjson v1.1.0 h1:xORDosrZ87zQFJwNGe/HIHXqzpdHOFmqWgykCLVL040=
|
||||
github.com/wundergraph/astjson v1.1.0/go.mod h1:h12D/dxxnedtLzsKyBLK7/Oe4TAoGpRVC9nDpDrZSWw=
|
||||
github.com/wundergraph/go-arena v1.1.0 h1:9+wSRkJAkA2vbYHp6s8tEGhPViRGQNGXqPHT0QzhdIc=
|
||||
github.com/wundergraph/go-arena v1.1.0/go.mod h1:ROOysEHWJjLQ8FSfNxZCziagb7Qw2nXY3/vgKRh7eWw=
|
||||
github.com/wundergraph/graphql-go-tools/v2 v2.1.0 h1:V1MU/uo+oc5b+aIh3SpCr0rJgLHuhonWg2fhN1sfMdY=
|
||||
github.com/wundergraph/graphql-go-tools/v2 v2.1.0/go.mod h1:UG/grnPEHumtD82H8FC+3dokiCGK8GF0b5IJc00lSbM=
|
||||
gitlab.com/unboundsoftware/eventsourced/amqp v1.9.1 h1:X6269JoAzHIKCVmtgMHZH3m7xOpACSp37ca3eODe9iU=
|
||||
gitlab.com/unboundsoftware/eventsourced/amqp v1.9.1/go.mod h1:EAs0d6Eh0aDiQkUJlSWErHqgHFQdxx0e8I7aG/2FarY=
|
||||
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.19.4 h1:+yZkhi9/sTyBEN5vJTfvycyXgGrm07QKGSh3jiWiQdM=
|
||||
gitlab.com/unboundsoftware/eventsourced/eventsourced v1.19.4/go.mod h1:LrA7I7etRmhIC1PjO8c26BHm+gWsy2rC3eSMe5+XUWE=
|
||||
gitlab.com/unboundsoftware/eventsourced/pg v1.18.8 h1:vEFD8pe8flZtigHnWQwUFVkeKusQKgp0P3zBNf/bx5I=
|
||||
gitlab.com/unboundsoftware/eventsourced/pg v1.18.8/go.mod h1:ozKUdZWa72YJsI1R2PlQkZyDXTjV0d/1qSM38bM31tw=
|
||||
github.com/wundergraph/go-arena v1.3.0 h1:n0ng5a1vbd8YGq1u3rMr0vPU5f6AZ1BXIiUhL1UIok8=
|
||||
github.com/wundergraph/go-arena v1.3.0/go.mod h1:ROOysEHWJjLQ8FSfNxZCziagb7Qw2nXY3/vgKRh7eWw=
|
||||
github.com/wundergraph/graphql-go-tools/v2 v2.26.0 h1:LkBu77I+Mp7lAfHulnHgug7W+nGnR6OeRD/YnBSUxeU=
|
||||
github.com/wundergraph/graphql-go-tools/v2 v2.26.0/go.mod h1:2+FpG5/GRCFYw+fU8jmid4bF+362KtCio5Fo7fzNvhU=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
|
||||
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
|
||||
go.opentelemetry.io/contrib/bridges/otelslog v0.18.0 h1:hhPGP3zvvy1xWT9RTy970wlniSxFttBIsAK1gvMguJM=
|
||||
go.opentelemetry.io/contrib/bridges/otelslog v0.18.0/go.mod h1:twJF7inoMza6kxMcF8JOdL3mPmtOZu7GEr34CUNE6Dg=
|
||||
go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
|
||||
go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.43.0 h1:w1K+pCJoPpQifuVpsKamUdn9U0zM3xUziVOqsGksUrY=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.43.0/go.mod h1:HBy4BjzgVE8139ieRI75oXm3EcDN+6GhD88JT1Kjvxg=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 h1:88Y4s2C8oTui1LGM6bTWkw0ICGcOLCAI5l6zsD1j20k=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0/go.mod h1:Vl1/iaggsuRlrHf/hfPJPvVag77kKyvrLeD10kpMl+A=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 h1:3iZJKlCZufyRzPzlQhUIWVmfltrXuGyfjREgGP3UUjc=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0/go.mod h1:/G+nUPfhq2e+qiXMGxMwumDrP5jtzU+mWN7/sjT2rak=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.19.0 h1:GJkybS+crDMdExT/BUNCEgfrmfboztcS6PhvSo88HKM=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.19.0/go.mod h1:NuAyxRYIG2lKX3YQkB+83StTxM7s52PUUkRRiC0wnYI=
|
||||
go.opentelemetry.io/otel/log v0.19.0 h1:KUZs/GOsw79TBBMfDWsXS+KZ4g2Ckzksd1ymzsIEbo4=
|
||||
go.opentelemetry.io/otel/log v0.19.0/go.mod h1:5DQYeGmxVIr4n0/BcJvF4upsraHjg6vudJJpnkL6Ipk=
|
||||
go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=
|
||||
go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY=
|
||||
go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg=
|
||||
go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg=
|
||||
go.opentelemetry.io/otel/sdk/log v0.19.0 h1:scYVLqT22D2gqXItnWiocLUKGH9yvkkeql5dBDiXyko=
|
||||
go.opentelemetry.io/otel/sdk/log v0.19.0/go.mod h1:vFBowwXGLlW9AvpuF7bMgnNI95LiW10szrOdvzBHlAg=
|
||||
go.opentelemetry.io/otel/sdk/log/logtest v0.19.0 h1:BEbF7ZBB6qQloV/Ub1+3NQoOUnVtcGkU3XX4Ws3GQfk=
|
||||
go.opentelemetry.io/otel/sdk/log/logtest v0.19.0/go.mod h1:Lua81/3yM0wOmoHTokLj9y9ADeA02v1naRrVrkAZuKk=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A=
|
||||
go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A=
|
||||
go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0=
|
||||
go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g=
|
||||
go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk=
|
||||
go.opentelemetry.io/contrib/bridges/otelslog v0.20.1 h1:5sHc4ToTFjfSZCtGAAM6jPunICAmJX73htv372T4ipc=
|
||||
go.opentelemetry.io/contrib/bridges/otelslog v0.20.1/go.mod h1:oa6kgvyz/3GYW04dohd0++xJIH4xdQY8PAbpeCMaM8M=
|
||||
go.opentelemetry.io/otel v1.47.0 h1:j7ALJ/zgkS7Z6aeJW09p8VC9804bC+PpeTfCD4XPnOM=
|
||||
go.opentelemetry.io/otel v1.47.0/go.mod h1:8wS9O2qfXrYrzp6hIF/HOYJJf/wIhFPhR2xLuP+iXQU=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.47.0 h1:7kszRN4Ze5GeAkUnBjBSUIunVBMA+mZIG04auueqguM=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.47.0/go.mod h1:CLzakYy8jOdkBfcveCWYkeKJxujcF4xPhh2Z7IfE98U=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0 h1:julhjPeUH/q/7hinbSdDdqt5h7Zw9YWmRlWRhI0jd54=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.47.0/go.mod h1:Ao2mz688LH/tFf0yMAenidq6k2YNSx6SIY2q6jDACck=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0 h1:aXZXsZ012wOgVkqaiQv+Z/d8V0xKjmg70F6m4CE94lc=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.47.0/go.mod h1:ziu1gUIJhAaxM3EV1e3Ralk5AAyL1UOYz3lJJ4VSI38=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.23.0 h1:PW/E9Tw6ZykC88pey0MZY8hKOUeEw+hX6PU+oXA4A9o=
|
||||
go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.23.0/go.mod h1:hUw4VNfiOnQ/yzGgy6ZdWVnudXw7iRfImhd6FjXOnvI=
|
||||
go.opentelemetry.io/otel/log v1.47.0 h1:cOTS1CcLbSQeZKanGJ+0JpF/+t4PELi3O3bbl2lqCcI=
|
||||
go.opentelemetry.io/otel/log v1.47.0/go.mod h1:9byitSQ5pLC6PpqwGXjqdMKya6ZTswHRZh2vvXT33nw=
|
||||
go.opentelemetry.io/otel/metric v1.47.0 h1:4PptaldXx3Eat1XjMZ68pPJEs5wrhlemctZE9a3UdWY=
|
||||
go.opentelemetry.io/otel/metric v1.47.0/go.mod h1:ADGSXxRrXM6bjbvLo535EstVFlPpPYZm4LBKixjDHwU=
|
||||
go.opentelemetry.io/otel/metric/x v0.69.0 h1:DjRLr15H83v+hCW7JA9NoJvOkYTtmq5YoDRbe9deYpM=
|
||||
go.opentelemetry.io/otel/metric/x v0.69.0/go.mod h1:uVvsMPMFFyj/HUQfrUnH3JjnOQ1dwFDorgFLRBasM0k=
|
||||
go.opentelemetry.io/otel/sdk v1.47.0 h1:zWXEr4j2lFefG87TU6Yg8a7ngfohIKFZHKp0Hf5hC6I=
|
||||
go.opentelemetry.io/otel/sdk v1.47.0/go.mod h1:VUc24kiOeoGsxG8G9ULx3fWKvB7jMhnGE8Oi607lgR0=
|
||||
go.opentelemetry.io/otel/sdk/log v1.47.0 h1:W4N/ZfgpkRRnmARnqYoQ6BrWA0mrj8IzVDNLlpmUJZY=
|
||||
go.opentelemetry.io/otel/sdk/log v1.47.0/go.mod h1:Wu74Z2EmOKXi2FleSNAb0Hyau2G+r5kubSEMJw5aAMs=
|
||||
go.opentelemetry.io/otel/sdk/log/logtest v0.23.0 h1:j3pm42QCrKYYLLkI6OrV1QHFkUfDA6/4EP+Y1PzggLg=
|
||||
go.opentelemetry.io/otel/sdk/log/logtest v0.23.0/go.mod h1:zt0gEnuTZgDvqvczHwYswz93eqMaIr6upTTsdV/HUlU=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.47.0 h1:lfISg2j93VT6yqdk9OfUaZmw/GfcZqCCV3jdXtsPnKw=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.47.0/go.mod h1:ypLp+mW1Nt2x+Szt3b5/i1syodyts49lMOwxpDI3VGw=
|
||||
go.opentelemetry.io/otel/trace v1.47.0 h1:JOjX/Oci8K94QHddo+bbfya/Ai/nf6/dt9ZfrFNWSrM=
|
||||
go.opentelemetry.io/otel/trace v1.47.0/go.mod h1:jNaSLa2PZEYFG6fRjJABAu+bw4FS08uDmPg28lTghu0=
|
||||
go.opentelemetry.io/proto/otlp v1.11.0 h1:5rrYs0Ykyj50sdU/JU0x8etU+LubXWb+gED6TbEdMIk=
|
||||
go.opentelemetry.io/proto/otlp v1.11.0/go.mod h1:SmVizdCOAm3XBtG1g1NnOdhW6jtddT72hLMhv8VwA8E=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
|
||||
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
|
||||
go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
|
||||
go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.51.0 h1:IBPXwPfKxY7cWQZ38ZCIRPI50YLeevDLlLnyC5wRGTI=
|
||||
golang.org/x/crypto v0.51.0/go.mod h1:8AdwkbraGNABw2kOX6YFPs3WM22XqI4EXEd8g+x7Oc8=
|
||||
golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM=
|
||||
golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU=
|
||||
golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M=
|
||||
golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA=
|
||||
golang.org/x/mod v0.41.0 h1:qJmnOUb4YB+FsEuM3HcWucdZASCPGhsX6uljO6pog0c=
|
||||
golang.org/x/mod v0.41.0/go.mod h1:Ek9pY8RKWXwsWvd3rQiHYtMqkjSUV+s1Rj7j4H5Ur6o=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA=
|
||||
golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs=
|
||||
golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues=
|
||||
golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4=
|
||||
golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||
golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk=
|
||||
golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ=
|
||||
golang.org/x/sys v0.44.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo=
|
||||
golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc=
|
||||
golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38=
|
||||
golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI=
|
||||
golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c=
|
||||
golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI=
|
||||
golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI=
|
||||
golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo=
|
||||
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
|
||||
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 h1:VPWxll4HlMw1Vs/qXtN7BvhZqsS9cdAittCNvVENElA=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:7QBABkRtR8z+TEnmXTqIqwJLlzrZKVfAUm7tY3yGv0M=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529 h1:XF8+t6QQiS0o9ArVan/HW8Q7cycNPGsJf6GA2nXxYAg=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8=
|
||||
google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM=
|
||||
google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4=
|
||||
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
|
||||
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260928230214-8a89bd6388cc h1:rZHRz0ogq4Pid1IKtA/ivHi8XONVF5tqUQXA2TtgpkE=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20260928230214-8a89bd6388cc/go.mod h1:K/n0XLazCJHjD73YuMyNJsN38BPPy1kfFnKxUXaThFU=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc h1:4bNTbnb44EqGVy9HaQxSY2jnafSUdgV3qHtedvNpDKg=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260928230214-8a89bd6388cc/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc=
|
||||
google.golang.org/grpc v1.83.2 h1:EManeRomTObA0BU7I8vXgg/78uE5MJ9M8B39EX2WscU=
|
||||
google.golang.org/grpc v1.83.2/go.mod h1:YPI1hK3kDked6iHvgX3tR0y+nX/qpMFKhPgFsokw1S8=
|
||||
google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc=
|
||||
google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
@@ -289,11 +314,11 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C
|
||||
gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
modernc.org/libc v1.72.1 h1:db1xwJ6u1kE3KHTFTTbe2GCrczHPKzlURP0aDC4NGD0=
|
||||
modernc.org/libc v1.72.1/go.mod h1:HRMiC/PhPGLIPM7GzAFCbI+oSgE3dhZ8FWftmRrHVlY=
|
||||
modernc.org/libc v1.75.6 h1:yKk8qo+Di4gkmvRboK8ocCqH22FiUCR6jRy2OwtCRus=
|
||||
modernc.org/libc v1.75.6/go.mod h1:bO5o2ztHxBb2rjz0PgdHN0sSMw57CgxGFLZ3Qd/QpVQ=
|
||||
modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU=
|
||||
modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg=
|
||||
modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI=
|
||||
modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
|
||||
modernc.org/sqlite v1.49.1 h1:dYGHTKcX1sJ+EQDnUzvz4TJ5GbuvhNJa8Fg6ElGx73U=
|
||||
modernc.org/sqlite v1.49.1/go.mod h1:m0w8xhwYUVY3H6pSDwc3gkJ/irZT/0YEXwBlhaxQEew=
|
||||
modernc.org/memory v1.12.1 h1:nFMiWrpStgZczNl6XI9GnIk/rWhYIyHGUaR04pGbp9g=
|
||||
modernc.org/memory v1.12.1/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw=
|
||||
modernc.org/sqlite v1.57.0 h1:qNQP6xnx5M0ISNtlnxoOX0+cD5bJ0/gr9aMmndFczzg=
|
||||
modernc.org/sqlite v1.57.0/go.mod h1:yCJ2cmAaIkHQ25oXWrF8H4O1lIfPYPR26yCEDj2P3pQ=
|
||||
+228
-176
@@ -20,7 +20,7 @@ import (
|
||||
"gitea.unbound.se/unboundsoftware/schemas/graph/model"
|
||||
)
|
||||
|
||||
// region ************************** generated!.gotpl **************************
|
||||
// region ***************************** api!.gotpl *****************************
|
||||
|
||||
// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
|
||||
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
|
||||
@@ -111,6 +111,10 @@ type ComplexityRoot struct {
|
||||
}
|
||||
}
|
||||
|
||||
// endregion ***************************** api!.gotpl *****************************
|
||||
|
||||
// region ************************** generated!.gotpl **************************
|
||||
|
||||
type MutationResolver interface {
|
||||
AddOrganization(ctx context.Context, name string) (*model.Organization, error)
|
||||
AddUserToOrganization(ctx context.Context, organizationID string, userID string) (*model.Organization, error)
|
||||
@@ -129,6 +133,10 @@ type SubscriptionResolver interface {
|
||||
SchemaUpdates(ctx context.Context, ref string) (<-chan *model.SchemaUpdate, error)
|
||||
}
|
||||
|
||||
// endregion ************************** generated!.gotpl **************************
|
||||
|
||||
// region ************************** internal!.gotpl ***************************
|
||||
|
||||
type executableSchema graphql.ExecutableSchemaState[ResolverRoot, DirectiveRoot, ComplexityRoot]
|
||||
|
||||
func (e *executableSchema) Schema() *ast.Schema {
|
||||
@@ -828,7 +836,7 @@ func (ec *executionContext) childFields___Type(ctx context.Context, field graphq
|
||||
return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name)
|
||||
}
|
||||
|
||||
// endregion ************************** generated!.gotpl **************************
|
||||
// endregion ************************** internal!.gotpl ***************************
|
||||
|
||||
// region ***************************** args.gotpl *****************************
|
||||
|
||||
@@ -1076,10 +1084,6 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg
|
||||
|
||||
// endregion ***************************** args.gotpl *****************************
|
||||
|
||||
// region ************************** directives.gotpl **************************
|
||||
|
||||
// endregion ************************** directives.gotpl **************************
|
||||
|
||||
// region **************************** field.gotpl *****************************
|
||||
|
||||
func (ec *executionContext) _APIKey_id(ctx context.Context, field graphql.CollectedField, obj *model.APIKey) (ret graphql.Marshaler) {
|
||||
@@ -3754,7 +3758,8 @@ func (ec *executionContext) _APIKey(ctx context.Context, sel ast.SelectionSet, o
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, aPIKeyImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
@@ -3771,6 +3776,9 @@ func (ec *executionContext) _APIKey(ctx context.Context, sel ast.SelectionSet, o
|
||||
}
|
||||
case "key":
|
||||
out.Values[i] = ec._APIKey_key(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "organization":
|
||||
out.Values[i] = ec._APIKey_organization(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
@@ -3800,16 +3808,14 @@ func (ec *executionContext) _APIKey(ctx context.Context, sel ast.SelectionSet, o
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -3823,7 +3829,8 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet)
|
||||
})
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
|
||||
Object: field.Name,
|
||||
@@ -3884,16 +3891,14 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet)
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -3904,7 +3909,8 @@ func (ec *executionContext) _Organization(ctx context.Context, sel ast.Selection
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, organizationImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
@@ -3938,16 +3944,14 @@ func (ec *executionContext) _Organization(ctx context.Context, sel ast.Selection
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -3961,7 +3965,8 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
||||
})
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{
|
||||
Object: field.Name,
|
||||
@@ -4063,10 +4068,16 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
||||
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
|
||||
return ec._Query___type(ctx, field)
|
||||
})
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
case "__schema":
|
||||
out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
|
||||
return ec._Query___schema(ctx, field)
|
||||
})
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
atomic.AddUint32(&out.Invalids, 1)
|
||||
}
|
||||
default:
|
||||
panic("unknown field " + strconv.Quote(field.Name))
|
||||
}
|
||||
@@ -4076,16 +4087,14 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -4096,7 +4105,8 @@ func (ec *executionContext) _SchemaUpdate(ctx context.Context, sel ast.Selection
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, schemaUpdateImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
@@ -4118,6 +4128,9 @@ func (ec *executionContext) _SchemaUpdate(ctx context.Context, sel ast.Selection
|
||||
}
|
||||
case "cosmoRouterConfig":
|
||||
out.Values[i] = ec._SchemaUpdate_cosmoRouterConfig(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
default:
|
||||
panic("unknown field " + strconv.Quote(field.Name))
|
||||
}
|
||||
@@ -4127,16 +4140,14 @@ func (ec *executionContext) _SchemaUpdate(ctx context.Context, sel ast.Selection
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -4147,7 +4158,8 @@ func (ec *executionContext) _SubGraph(ctx context.Context, sel ast.SelectionSet,
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, subGraphImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
@@ -4164,8 +4176,14 @@ func (ec *executionContext) _SubGraph(ctx context.Context, sel ast.SelectionSet,
|
||||
}
|
||||
case "url":
|
||||
out.Values[i] = ec._SubGraph_url(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "wsUrl":
|
||||
out.Values[i] = ec._SubGraph_wsUrl(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "sdl":
|
||||
out.Values[i] = ec._SubGraph_sdl(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
@@ -4190,16 +4208,14 @@ func (ec *executionContext) _SubGraph(ctx context.Context, sel ast.SelectionSet,
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -4210,7 +4226,8 @@ func (ec *executionContext) _SubGraphs(ctx context.Context, sel ast.SelectionSet
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, subGraphsImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
@@ -4244,16 +4261,14 @@ func (ec *executionContext) _SubGraphs(ctx context.Context, sel ast.SelectionSet
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -4284,7 +4299,8 @@ func (ec *executionContext) _Unchanged(ctx context.Context, sel ast.SelectionSet
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, unchangedImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
@@ -4308,16 +4324,14 @@ func (ec *executionContext) _Unchanged(ctx context.Context, sel ast.SelectionSet
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -4328,7 +4342,8 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, userImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
@@ -4347,16 +4362,14 @@ func (ec *executionContext) _User(ctx context.Context, sel ast.SelectionSet, obj
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -4367,7 +4380,8 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
@@ -4379,6 +4393,9 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS
|
||||
}
|
||||
case "description":
|
||||
out.Values[i] = ec.___Directive_description(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "isRepeatable":
|
||||
out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
@@ -4403,16 +4420,14 @@ func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionS
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -4423,7 +4438,8 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
@@ -4435,6 +4451,9 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS
|
||||
}
|
||||
case "description":
|
||||
out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "isDeprecated":
|
||||
out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
@@ -4442,6 +4461,9 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS
|
||||
}
|
||||
case "deprecationReason":
|
||||
out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
default:
|
||||
panic("unknown field " + strconv.Quote(field.Name))
|
||||
}
|
||||
@@ -4451,16 +4473,14 @@ func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionS
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -4471,7 +4491,8 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet,
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
@@ -4483,6 +4504,9 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet,
|
||||
}
|
||||
case "description":
|
||||
out.Values[i] = ec.___Field_description(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "args":
|
||||
out.Values[i] = ec.___Field_args(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
@@ -4500,6 +4524,9 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet,
|
||||
}
|
||||
case "deprecationReason":
|
||||
out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
default:
|
||||
panic("unknown field " + strconv.Quote(field.Name))
|
||||
}
|
||||
@@ -4509,16 +4536,14 @@ func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet,
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -4529,7 +4554,8 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
@@ -4541,6 +4567,9 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection
|
||||
}
|
||||
case "description":
|
||||
out.Values[i] = ec.___InputValue_description(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "type":
|
||||
out.Values[i] = ec.___InputValue_type(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
@@ -4548,6 +4577,9 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection
|
||||
}
|
||||
case "defaultValue":
|
||||
out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "isDeprecated":
|
||||
out.Values[i] = ec.___InputValue_isDeprecated(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
@@ -4555,6 +4587,9 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection
|
||||
}
|
||||
case "deprecationReason":
|
||||
out.Values[i] = ec.___InputValue_deprecationReason(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
default:
|
||||
panic("unknown field " + strconv.Quote(field.Name))
|
||||
}
|
||||
@@ -4564,16 +4599,14 @@ func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.Selection
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -4584,13 +4617,17 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet,
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
out.Values[i] = graphql.MarshalString("__Schema")
|
||||
case "description":
|
||||
out.Values[i] = ec.___Schema_description(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "types":
|
||||
out.Values[i] = ec.___Schema_types(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
@@ -4603,8 +4640,14 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet,
|
||||
}
|
||||
case "mutationType":
|
||||
out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "subscriptionType":
|
||||
out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "directives":
|
||||
out.Values[i] = ec.___Schema_directives(ctx, field, obj)
|
||||
if out.Values[i] == graphql.Null {
|
||||
@@ -4619,16 +4662,14 @@ func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet,
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -4639,7 +4680,8 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)
|
||||
|
||||
out := graphql.NewFieldSet(fields)
|
||||
deferred := make(map[string]*graphql.FieldSet)
|
||||
deferredFieldSet := graphql.NewFieldSet(nil)
|
||||
deferLabelToView := make(map[string]*graphql.FieldSetView)
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
@@ -4651,24 +4693,54 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o
|
||||
}
|
||||
case "name":
|
||||
out.Values[i] = ec.___Type_name(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "description":
|
||||
out.Values[i] = ec.___Type_description(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "specifiedByURL":
|
||||
out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "fields":
|
||||
out.Values[i] = ec.___Type_fields(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "interfaces":
|
||||
out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "possibleTypes":
|
||||
out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "enumValues":
|
||||
out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "inputFields":
|
||||
out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "ofType":
|
||||
out.Values[i] = ec.___Type_ofType(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
case "isOneOf":
|
||||
out.Values[i] = ec.___Type_isOneOf(ctx, field, obj)
|
||||
if out.Values[i] == graphql.RequiredNull {
|
||||
out.Invalids++
|
||||
}
|
||||
default:
|
||||
panic("unknown field " + strconv.Quote(field.Name))
|
||||
}
|
||||
@@ -4678,16 +4750,14 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o
|
||||
return graphql.Null
|
||||
}
|
||||
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferred), math.MaxInt32)))
|
||||
atomic.AddInt32(&ec.Deferred, int32(min(len(deferLabelToView), math.MaxInt32)))
|
||||
|
||||
for label, dfs := range deferred {
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Label: label,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: dfs,
|
||||
Context: ctx,
|
||||
})
|
||||
}
|
||||
ec.ProcessDeferredGroup(graphql.DeferredGroup{
|
||||
Defers: deferLabelToView,
|
||||
Path: graphql.GetPath(ctx),
|
||||
FieldSet: deferredFieldSet,
|
||||
Context: ctx,
|
||||
})
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -4696,10 +4766,6 @@ func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, o
|
||||
|
||||
// region ***************************** type.gotpl *****************************
|
||||
|
||||
func (ec *executionContext) marshalNAPIKey2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKey(ctx context.Context, sel ast.SelectionSet, v model.APIKey) graphql.Marshaler {
|
||||
return ec._APIKey(ctx, sel, &v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNAPIKey2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐAPIKeyᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.APIKey) graphql.Marshaler {
|
||||
ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler {
|
||||
fc := graphql.GetFieldContext(ctx)
|
||||
@@ -4779,10 +4845,6 @@ func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.Selecti
|
||||
return res
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNOrganization2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganization(ctx context.Context, sel ast.SelectionSet, v model.Organization) graphql.Marshaler {
|
||||
return ec._Organization(ctx, sel, &v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNOrganization2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐOrganizationᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Organization) graphql.Marshaler {
|
||||
ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler {
|
||||
fc := graphql.GetFieldContext(ctx)
|
||||
@@ -4809,10 +4871,6 @@ func (ec *executionContext) marshalNOrganization2ᚖgiteaᚗunboundᚗseᚋunbou
|
||||
return ec._Organization(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNSchemaUpdate2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate(ctx context.Context, sel ast.SelectionSet, v model.SchemaUpdate) graphql.Marshaler {
|
||||
return ec._SchemaUpdate(ctx, sel, &v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNSchemaUpdate2ᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSchemaUpdate(ctx context.Context, sel ast.SelectionSet, v *model.SchemaUpdate) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
@@ -4840,8 +4898,7 @@ func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.S
|
||||
}
|
||||
|
||||
func (ec *executionContext) unmarshalNString2ᚕstringᚄ(ctx context.Context, v any) ([]string, error) {
|
||||
var vSlice []any
|
||||
vSlice = graphql.CoerceList(v)
|
||||
vSlice := graphql.CoerceList(v)
|
||||
var err error
|
||||
res := make([]string, len(vSlice))
|
||||
for i := range vSlice {
|
||||
@@ -4869,10 +4926,6 @@ func (ec *executionContext) marshalNString2ᚕstringᚄ(ctx context.Context, sel
|
||||
return ret
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNSubGraph2giteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraph(ctx context.Context, sel ast.SelectionSet, v model.SubGraph) graphql.Marshaler {
|
||||
return ec._SubGraph(ctx, sel, &v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNSubGraph2ᚕᚖgiteaᚗunboundᚗseᚋunboundsoftwareᚋschemasᚋgraphᚋmodelᚐSubGraphᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.SubGraph) graphql.Marshaler {
|
||||
ret := graphql.MarshalSliceConcurrently(ctx, len(v), 0, false, func(ctx context.Context, i int) graphql.Marshaler {
|
||||
fc := graphql.GetFieldContext(ctx)
|
||||
@@ -4988,8 +5041,7 @@ func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Conte
|
||||
}
|
||||
|
||||
func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v any) ([]string, error) {
|
||||
var vSlice []any
|
||||
vSlice = graphql.CoerceList(v)
|
||||
vSlice := graphql.CoerceList(v)
|
||||
var err error
|
||||
res := make([]string, len(vSlice))
|
||||
for i := range vSlice {
|
||||
|
||||
+60
-1
@@ -5,10 +5,12 @@ import (
|
||||
"fmt"
|
||||
"log/slog"
|
||||
|
||||
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
|
||||
"gitea.unbound.se/unboundsoftware/schemas/cache"
|
||||
"gitea.unbound.se/unboundsoftware/schemas/graph/model"
|
||||
"gitea.unbound.se/unboundsoftware/schemas/middleware"
|
||||
"gitea.unbound.se/unboundsoftware/schemas/sdlmerge"
|
||||
)
|
||||
|
||||
//go:generate go run github.com/99designs/gqlgen
|
||||
@@ -60,3 +62,60 @@ func (r *Resolver) handler(ctx context.Context, aggregate eventsourced.Aggregate
|
||||
func apiKeyId(orgId, name string) string {
|
||||
return fmt.Sprintf("%s-%s", orgId, name)
|
||||
}
|
||||
|
||||
// WarmCache precomputes the merged SDL and SchemaUpdate (cosmo router
|
||||
// config) for every (orgId, ref) tracked in the cache. Intended to run
|
||||
// once at startup, after the event-sourced caches have been populated
|
||||
// but before the pod accepts traffic, so the first request per ref does
|
||||
// not pay the cold-start cost of running sdlmerge + wgc compose.
|
||||
//
|
||||
// Errors per ref are logged and skipped rather than aborting the whole
|
||||
// warmup: a single bad ref must not block the pod from serving the
|
||||
// remaining refs.
|
||||
func (r *Resolver) WarmCache(ctx context.Context) {
|
||||
refs := r.Cache.AllOrgRefs()
|
||||
r.Logger.Info("Warming schema cache on startup", "refCount", len(refs))
|
||||
|
||||
for _, or := range refs {
|
||||
services, lastUpdate := r.Cache.Services(or.OrgId, or.Ref, "")
|
||||
if len(services) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
subGraphs := make([]*model.SubGraph, len(services))
|
||||
serviceSDLs := make([]string, len(services))
|
||||
for i, id := range services {
|
||||
sg, err := r.fetchSubGraph(ctx, id)
|
||||
if err != nil {
|
||||
r.Logger.Error("warmup: fetch subgraph", "error", err, "orgId", or.OrgId, "ref", or.Ref, "id", id)
|
||||
subGraphs = nil
|
||||
break
|
||||
}
|
||||
subGraphs[i] = r.toGqlSubGraph(sg)
|
||||
serviceSDLs[i] = sg.Sdl
|
||||
}
|
||||
if subGraphs == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if sdl, err := sdlmerge.MergeSDLs(serviceSDLs...); err != nil {
|
||||
r.Logger.Error("warmup: merge SDLs", "error", err, "orgId", or.OrgId, "ref", or.Ref)
|
||||
} else {
|
||||
r.Cache.SetMergedSDL(or.OrgId, or.Ref, lastUpdate, sdl, subGraphs)
|
||||
}
|
||||
|
||||
cosmoConfig, err := r.CosmoGenerator.Generate(ctx, subGraphs)
|
||||
if err != nil {
|
||||
r.Logger.Error("warmup: generate cosmo config", "error", err, "orgId", or.OrgId, "ref", or.Ref)
|
||||
continue
|
||||
}
|
||||
r.Cache.SetSchemaUpdate(or.OrgId, or.Ref, &model.SchemaUpdate{
|
||||
Ref: or.Ref,
|
||||
ID: lastUpdate,
|
||||
SubGraphs: subGraphs,
|
||||
CosmoRouterConfig: &cosmoConfig,
|
||||
})
|
||||
}
|
||||
|
||||
r.Logger.Info("Schema cache warmup complete", "refCount", len(refs))
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package graph
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
|
||||
"gitea.unbound.se/unboundsoftware/schemas/domain"
|
||||
"gitea.unbound.se/unboundsoftware/schemas/graph/model"
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
|
||||
"gitea.unbound.se/unboundsoftware/schemas/domain"
|
||||
"gitea.unbound.se/unboundsoftware/schemas/graph/generated"
|
||||
@@ -210,6 +210,7 @@ func (r *mutationResolver) UpdateSubGraph(ctx context.Context, input model.Input
|
||||
SubGraphs: subGraphs,
|
||||
CosmoRouterConfig: &cosmoConfig,
|
||||
}
|
||||
r.Cache.SetSchemaUpdate(orgId, input.Ref, update)
|
||||
|
||||
r.Logger.Info(
|
||||
"Publishing schema update to subscribers",
|
||||
@@ -280,13 +281,25 @@ func (r *queryResolver) Supergraph(ctx context.Context, ref string, isAfter *str
|
||||
if isAfter != nil {
|
||||
after = *isAfter
|
||||
}
|
||||
services, lastUpdate := r.Cache.Services(orgId, ref, after)
|
||||
_, lastUpdate := r.Cache.Services(orgId, ref, after)
|
||||
if after == lastUpdate {
|
||||
return &model.Unchanged{
|
||||
ID: lastUpdate,
|
||||
MinDelaySeconds: 10,
|
||||
}, nil
|
||||
}
|
||||
|
||||
if cached := r.Cache.GetMergedSDL(orgId, ref); cached != nil {
|
||||
id, sdl, subGraphs := cached.Unpack()
|
||||
return &model.SubGraphs{
|
||||
ID: id,
|
||||
SubGraphs: subGraphs,
|
||||
Sdl: sdl,
|
||||
MinDelaySeconds: 10,
|
||||
}, nil
|
||||
}
|
||||
|
||||
services, _ := r.Cache.Services(orgId, ref, "")
|
||||
subGraphs := make([]*model.SubGraph, len(services))
|
||||
serviceSDLs := make([]string, len(services))
|
||||
for i, id := range services {
|
||||
@@ -302,6 +315,7 @@ func (r *queryResolver) Supergraph(ctx context.Context, ref string, isAfter *str
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
r.Cache.SetMergedSDL(orgId, ref, lastUpdate, sdl, subGraphs)
|
||||
return &model.SubGraphs{
|
||||
ID: lastUpdate,
|
||||
SubGraphs: subGraphs,
|
||||
@@ -344,6 +358,16 @@ func (r *queryResolver) LatestSchema(ctx context.Context, ref string) (*model.Sc
|
||||
return nil, fmt.Errorf("no authentication provided")
|
||||
}
|
||||
|
||||
if cached := r.Cache.GetSchemaUpdate(orgId, ref); cached != nil {
|
||||
r.Logger.Info(
|
||||
"Latest schema served from cache",
|
||||
"ref", ref,
|
||||
"orgId", orgId,
|
||||
"id", cached.ID,
|
||||
)
|
||||
return cached, nil
|
||||
}
|
||||
|
||||
// Get current services and schema
|
||||
services, lastUpdate := r.Cache.Services(orgId, ref, "")
|
||||
r.Logger.Info(
|
||||
@@ -385,6 +409,7 @@ func (r *queryResolver) LatestSchema(ctx context.Context, ref string) (*model.Sc
|
||||
SubGraphs: subGraphs,
|
||||
CosmoRouterConfig: &cosmoConfig,
|
||||
}
|
||||
r.Cache.SetSchemaUpdate(orgId, ref, update)
|
||||
|
||||
r.Logger.Info(
|
||||
"Latest schema fetched",
|
||||
|
||||
@@ -18,3 +18,23 @@ spec:
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 60
|
||||
behavior:
|
||||
scaleUp:
|
||||
# Wait 2min of sustained high CPU before scaling up. Schemas is
|
||||
# event-driven and the per-request work is bursty even with the
|
||||
# cache + warmup, so single spikes shouldn't pull replicas up.
|
||||
stabilizationWindowSeconds: 120
|
||||
policies:
|
||||
- type: Pods
|
||||
value: 1
|
||||
periodSeconds: 60
|
||||
scaleDown:
|
||||
# Default 300s window kept pods pinned at maxReplicas long after
|
||||
# the triggering spike had subsided. 120s is long enough to avoid
|
||||
# flapping but lets the deployment return to minReplicas quickly
|
||||
# once the workload calms.
|
||||
stabilizationWindowSeconds: 120
|
||||
policies:
|
||||
- type: Pods
|
||||
value: 1
|
||||
periodSeconds: 60
|
||||
+6
-4
@@ -42,8 +42,10 @@ spec:
|
||||
- name: schemas
|
||||
resources:
|
||||
requests:
|
||||
cpu: "20m"
|
||||
memory: "20Mi"
|
||||
cpu: "100m"
|
||||
memory: "128Mi"
|
||||
limits:
|
||||
memory: "768Mi"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health/live
|
||||
@@ -61,13 +63,13 @@ spec:
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
imagePullPolicy: IfNotPresent
|
||||
image: oci.unbound.se/unboundsoftware/schemas:${COMMIT}
|
||||
image: ${IMAGE}
|
||||
ports:
|
||||
- name: api
|
||||
containerPort: 8080
|
||||
env:
|
||||
- name: OTEL_EXPORTER_OTLP_ENDPOINT
|
||||
value: http://k8s-monitoring-alloy-receiver.monitoring.svc.cluster.local:4318
|
||||
value: http://k8s-monitoring-alloy.monitoring.svc.cluster.local:4318
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: schemas
|
||||
|
||||
@@ -6,13 +6,13 @@ import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"codeberg.org/eventsourced/eventsourced"
|
||||
"github.com/auth0/go-jwt-middleware/v3/core"
|
||||
"github.com/auth0/go-jwt-middleware/v3/validator"
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gitlab.com/unboundsoftware/eventsourced/eventsourced"
|
||||
|
||||
"gitea.unbound.se/unboundsoftware/schemas/domain"
|
||||
)
|
||||
|
||||
+2
-1
@@ -16,7 +16,8 @@
|
||||
{
|
||||
"groupName": "Eventsourced",
|
||||
"matchPackageNames": [
|
||||
"gitlab.com/unboundsoftware/eventsourced/**"
|
||||
"codeberg.org/eventsourced/**",
|
||||
"codeberg.org/messaging/**"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -50,12 +50,12 @@ func MergeSDLs(SDLs ...string) (string, error) {
|
||||
|
||||
doc, report := astparser.ParseGraphqlDocumentString(strings.Join(rawDocs, "\n"))
|
||||
if report.HasErrors() {
|
||||
return "", fmt.Errorf("parse graphql document string: %w", report)
|
||||
return "", fmt.Errorf("parse graphql document string: %w", &report)
|
||||
}
|
||||
|
||||
astnormalization.NormalizeSubgraphSDL(&doc, &report)
|
||||
if report.HasErrors() {
|
||||
return "", fmt.Errorf("merge ast: %w", report)
|
||||
return "", fmt.Errorf("merge ast: %w", &report)
|
||||
}
|
||||
|
||||
if err := MergeAST(&doc); err != nil {
|
||||
@@ -81,11 +81,11 @@ func validateSubgraphs(subgraphs []string) error {
|
||||
return err
|
||||
}
|
||||
if report.HasErrors() {
|
||||
return fmt.Errorf(parseDocumentError, report)
|
||||
return fmt.Errorf(parseDocumentError, &report)
|
||||
}
|
||||
validator.Validate(&doc, &report)
|
||||
if report.HasErrors() {
|
||||
return fmt.Errorf("validate schema: %w", report)
|
||||
return fmt.Errorf("validate schema: %w", &report)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
@@ -96,11 +96,11 @@ func normalizeSubgraphs(subgraphs []string) error {
|
||||
for i, subgraph := range subgraphs {
|
||||
doc, report := astparser.ParseGraphqlDocumentString(subgraph)
|
||||
if report.HasErrors() {
|
||||
return fmt.Errorf(parseDocumentError, report)
|
||||
return fmt.Errorf(parseDocumentError, &report)
|
||||
}
|
||||
subgraphNormalizer.NormalizeDefinition(&doc, &report)
|
||||
if report.HasErrors() {
|
||||
return fmt.Errorf("normalize schema: %w", report)
|
||||
return fmt.Errorf("normalize schema: %w", &report)
|
||||
}
|
||||
out, err := astprinter.PrintString(&doc)
|
||||
if err != nil {
|
||||
@@ -160,7 +160,7 @@ func (m *normalizer) normalize(operation *ast.Document) error {
|
||||
for _, walker := range m.walkers {
|
||||
walker.Walk(operation, nil, &report)
|
||||
if report.HasErrors() {
|
||||
return fmt.Errorf("walk: %w", report)
|
||||
return fmt.Errorf("walk: %w", &report)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user