Compare commits
16 Commits
int
...
compose-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
0b71386bf8
|
|||
| 08753d36b4 | |||
|
5dce0f2017
|
|||
|
d196da949c
|
|||
|
b0c723be1b
|
|||
| 48314f5d18 | |||
|
1e4e513dc1
|
|||
|
f9455e7317
|
|||
|
69ebef5fb8
|
|||
| a9258136da | |||
|
ac05f4acdc
|
|||
|
061b7b2a01
|
|||
|
b4a0041fb5
|
|||
| 692c915af8 | |||
|
d35c331b76
|
|||
|
9ce8b75f0f
|
111
.drone.yml
111
.drone.yml
@@ -7,7 +7,45 @@ platform:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: api
|
- name: build-backend
|
||||||
|
image: golang:1.24.0
|
||||||
|
environment:
|
||||||
|
GIT_USER:
|
||||||
|
from_secret: GIT_USER
|
||||||
|
GIT_PASS:
|
||||||
|
from_secret: GIT_PASS
|
||||||
|
commands:
|
||||||
|
- echo "machine git.itzana.me login $${GIT_USER} password $${GIT_PASS}" > ~/.netrc
|
||||||
|
- chmod 600 ~/.netrc
|
||||||
|
- make build-backend
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
- staging
|
||||||
|
|
||||||
|
- name: build-validator
|
||||||
|
image: clux/muslrust:1.86.0-stable
|
||||||
|
commands:
|
||||||
|
- make build-validator
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
- staging
|
||||||
|
|
||||||
|
- name: build-frontend
|
||||||
|
image: oven/bun:1.2.8
|
||||||
|
commands:
|
||||||
|
- apt-get update
|
||||||
|
- apt-get install make
|
||||||
|
- make build-frontend
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
- staging
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
- name: image-backend
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.itzana.me
|
registry: registry.itzana.me
|
||||||
@@ -19,8 +57,10 @@ steps:
|
|||||||
from_secret: REGISTRY_USER
|
from_secret: REGISTRY_USER
|
||||||
password:
|
password:
|
||||||
from_secret: REGISTRY_PASS
|
from_secret: REGISTRY_PASS
|
||||||
dockerfile: Containerfile
|
dockerfile: Dockerfile
|
||||||
context: .
|
context: .
|
||||||
|
depends_on:
|
||||||
|
- build-backend
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
@@ -28,7 +68,7 @@ steps:
|
|||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
- name: frontend
|
- name: image-frontend
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.itzana.me
|
registry: registry.itzana.me
|
||||||
@@ -49,7 +89,7 @@ steps:
|
|||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
|
||||||
- name: validator
|
- name: image-validator
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.itzana.me
|
registry: registry.itzana.me
|
||||||
@@ -62,7 +102,9 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: REGISTRY_PASS
|
from_secret: REGISTRY_PASS
|
||||||
dockerfile: validation/Containerfile
|
dockerfile: validation/Containerfile
|
||||||
context: validation
|
context: .
|
||||||
|
depends_on:
|
||||||
|
- build-validator
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
@@ -83,9 +125,9 @@ steps:
|
|||||||
PASSWORD:
|
PASSWORD:
|
||||||
from_secret: ARGO_PASS
|
from_secret: ARGO_PASS
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- image-backend
|
||||||
- frontend
|
- image-frontend
|
||||||
- validator
|
- image-validator
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
@@ -94,64 +136,19 @@ steps:
|
|||||||
- push
|
- push
|
||||||
|
|
||||||
# pr dry run
|
# pr dry run
|
||||||
- name: api-pr
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
registry: registry.itzana.me
|
|
||||||
repo: registry.itzana.me/strafesnet/maptest-validator
|
|
||||||
tags:
|
|
||||||
- ${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
|
|
||||||
- ${DRONE_BRANCH}
|
|
||||||
dockerfile: Containerfile
|
|
||||||
context: .
|
|
||||||
dry_run: true
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
- name: frontend-pr
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
registry: registry.itzana.me
|
|
||||||
repo: registry.itzana.me/strafesnet/maptest-validator
|
|
||||||
tags:
|
|
||||||
- ${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
|
|
||||||
- ${DRONE_BRANCH}
|
|
||||||
dockerfile: web/Containerfile
|
|
||||||
context: web
|
|
||||||
dry_run: true
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
- name: validator-pr
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
registry: registry.itzana.me
|
|
||||||
repo: registry.itzana.me/strafesnet/maptest-validator
|
|
||||||
tags:
|
|
||||||
- ${DRONE_BRANCH}-${DRONE_BUILD_NUMBER}
|
|
||||||
- ${DRONE_BRANCH}
|
|
||||||
dockerfile: validation/Containerfile
|
|
||||||
context: validation
|
|
||||||
dry_run: true
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- pull_request
|
|
||||||
|
|
||||||
- name: build-pr
|
- name: build-pr
|
||||||
image: alpine
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
- echo "Success!"
|
- echo "Success!"
|
||||||
depends_on:
|
depends_on:
|
||||||
- api-pr
|
- build-backend
|
||||||
- frontend-pr
|
- build-validator
|
||||||
- validator-pr
|
- build-frontend
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- pull_request
|
- pull_request
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 11e6d7f1eb839d3798fdcb642ca5523c011bd14c1f3a0343a9c3106bab9ef142
|
hmac: cc7f2f8dac4285b5fa1df163bd92115f1a51a92050687cd08169e17803a2de4c
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
|
build
|
||||||
.idea
|
.idea
|
||||||
/target
|
/target
|
||||||
|
|||||||
550
Cargo.lock
generated
550
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,33 +0,0 @@
|
|||||||
# Stage 1: Build
|
|
||||||
FROM registry.itzana.me/docker-proxy/golang:1.24 AS builder
|
|
||||||
|
|
||||||
# Set the working directory in the container
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Copy go.mod and go.sum files
|
|
||||||
COPY go.mod go.sum ./
|
|
||||||
|
|
||||||
# Copy the entire project
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Build the Go application
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -o service ./cmd/maps-service/service.go
|
|
||||||
|
|
||||||
# Stage 2: Run
|
|
||||||
FROM registry.itzana.me/docker-proxy/alpine:3.21
|
|
||||||
|
|
||||||
# Set up a non-root user for security
|
|
||||||
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
|
||||||
USER appuser
|
|
||||||
|
|
||||||
# Set the working directory in the container
|
|
||||||
WORKDIR /home/appuser
|
|
||||||
|
|
||||||
# Copy the built application from the builder stage
|
|
||||||
COPY --from=builder /app/service .
|
|
||||||
|
|
||||||
# Expose application port (adjust if needed)
|
|
||||||
EXPOSE 8081
|
|
||||||
|
|
||||||
# Command to run the application
|
|
||||||
ENTRYPOINT ["./service"]
|
|
||||||
3
Dockerfile
Normal file
3
Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM alpine
|
||||||
|
COPY build/server /
|
||||||
|
ENTRYPOINT ["/server"]
|
||||||
46
Makefile
46
Makefile
@@ -1,12 +1,42 @@
|
|||||||
submissions:
|
clean:
|
||||||
DOCKER_BUILDKIT=1 docker build . -f Containerfile -t maps-service-submissions
|
rm -rf build
|
||||||
|
rm -rf web/build
|
||||||
|
|
||||||
web:
|
# build
|
||||||
docker build web -f web/Containerfile -t maps-service-web
|
build-backend:
|
||||||
|
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o build/server cmd/maps-service/service.go
|
||||||
|
|
||||||
validation:
|
build-validator:
|
||||||
docker build validation -f validation/Containerfile -t maps-service-validation
|
cargo build --release --target x86_64-unknown-linux-musl --bin maps-validation
|
||||||
|
|
||||||
all: submissions web validation
|
build-frontend:
|
||||||
|
rm -rf web/build
|
||||||
|
cd web && bun install --frozen-lockfile
|
||||||
|
cd web && bun run build
|
||||||
|
|
||||||
.PHONY: submissions web validation
|
build: build-backend build-validator build-frontend
|
||||||
|
|
||||||
|
# image
|
||||||
|
image-backend:
|
||||||
|
docker build . -t maptest-api
|
||||||
|
|
||||||
|
image-validator:
|
||||||
|
docker build . -f validation/Containerfile -t maptest-validator
|
||||||
|
|
||||||
|
image-frontend:
|
||||||
|
docker build web -f web/Containerfile -t maptest-frontend
|
||||||
|
|
||||||
|
# docker
|
||||||
|
docker-backend:
|
||||||
|
make build-backend
|
||||||
|
make image-backend
|
||||||
|
docker-validator:
|
||||||
|
make build-validator
|
||||||
|
make image-validator
|
||||||
|
docker-frontend:
|
||||||
|
make build-frontend
|
||||||
|
make image-frontend
|
||||||
|
|
||||||
|
docker: docker-backend docker-validator docker-frontend
|
||||||
|
|
||||||
|
.PHONY: clean build-backend build-validator build-frontend build image-backend image-validator image-frontend docker-backend docker-validator docker-frontend docker
|
||||||
|
|||||||
@@ -7,6 +7,16 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// @title StrafesNET Maps API
|
||||||
|
// @version 1.0
|
||||||
|
// @description Obtain an api key at https://dev.strafes.net
|
||||||
|
// @description Requires Maps:Read permission
|
||||||
|
// @BasePath /public-api/v1
|
||||||
|
|
||||||
|
// @securityDefinitions.apikey ApiKeyAuth
|
||||||
|
// @in header
|
||||||
|
// @name X-API-Key
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
log.SetLevel(log.InfoLevel)
|
log.SetLevel(log.InfoLevel)
|
||||||
log.SetFormatter(&log.JSONFormatter{})
|
log.SetFormatter(&log.JSONFormatter{})
|
||||||
|
|||||||
26
compose.yaml
26
compose.yaml
@@ -13,7 +13,7 @@ services:
|
|||||||
|
|
||||||
submissions:
|
submissions:
|
||||||
image:
|
image:
|
||||||
maps-service-submissions
|
maptest-api
|
||||||
container_name: submissions
|
container_name: submissions
|
||||||
command: [
|
command: [
|
||||||
# debug
|
# debug
|
||||||
@@ -45,7 +45,7 @@ services:
|
|||||||
|
|
||||||
web:
|
web:
|
||||||
image:
|
image:
|
||||||
maps-service-web
|
maptest-frontend
|
||||||
networks:
|
networks:
|
||||||
- maps-service-network
|
- maps-service-network
|
||||||
ports:
|
ports:
|
||||||
@@ -56,7 +56,7 @@ services:
|
|||||||
|
|
||||||
validation:
|
validation:
|
||||||
image:
|
image:
|
||||||
maps-service-validation
|
maptest-validator
|
||||||
container_name: validation
|
container_name: validation
|
||||||
env_file:
|
env_file:
|
||||||
- ../auth-compose/strafesnet_staging.env
|
- ../auth-compose/strafesnet_staging.env
|
||||||
@@ -73,6 +73,26 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- maps-service-network
|
- maps-service-network
|
||||||
|
|
||||||
|
public_api:
|
||||||
|
image:
|
||||||
|
maptest-api
|
||||||
|
container_name: public_api
|
||||||
|
command: [
|
||||||
|
# debug
|
||||||
|
"--debug","api",
|
||||||
|
# http service port
|
||||||
|
"--port","8084",
|
||||||
|
"--dev-rpc-host","dev-service:8081",
|
||||||
|
"--maps-rpc-host","maptest-api:8081",
|
||||||
|
]
|
||||||
|
depends_on:
|
||||||
|
- submissions
|
||||||
|
- dev_service
|
||||||
|
networks:
|
||||||
|
- maps-service-network
|
||||||
|
ports:
|
||||||
|
- "8084:8084"
|
||||||
|
|
||||||
dataservice:
|
dataservice:
|
||||||
image: registry.itzana.me/strafesnet/data-service:master
|
image: registry.itzana.me/strafesnet/data-service:master
|
||||||
container_name: dataservice
|
container_name: dataservice
|
||||||
|
|||||||
242
docs/docs.go
Normal file
242
docs/docs.go
Normal file
@@ -0,0 +1,242 @@
|
|||||||
|
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
||||||
|
package docs
|
||||||
|
|
||||||
|
import "github.com/swaggo/swag"
|
||||||
|
|
||||||
|
const docTemplate = `{
|
||||||
|
"schemes": {{ marshal .Schemes }},
|
||||||
|
"swagger": "2.0",
|
||||||
|
"info": {
|
||||||
|
"description": "{{escape .Description}}",
|
||||||
|
"title": "{{.Title}}",
|
||||||
|
"contact": {},
|
||||||
|
"version": "{{.Version}}"
|
||||||
|
},
|
||||||
|
"host": "{{.Host}}",
|
||||||
|
"basePath": "{{.BasePath}}",
|
||||||
|
"paths": {
|
||||||
|
"/map": {
|
||||||
|
"get": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKeyAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Get a list of maps",
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"maps"
|
||||||
|
],
|
||||||
|
"summary": "List maps",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"maximum": 100,
|
||||||
|
"minimum": 1,
|
||||||
|
"type": "integer",
|
||||||
|
"default": 10,
|
||||||
|
"description": "Page size (max 100)",
|
||||||
|
"name": "page_size",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"minimum": 1,
|
||||||
|
"type": "integer",
|
||||||
|
"default": 1,
|
||||||
|
"description": "Page number",
|
||||||
|
"name": "page_number",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"name": "game_id",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/PagedResponse-Map"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"description": "General error response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/map/{id}": {
|
||||||
|
"get": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKeyAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Get a specific map by its ID",
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"maps"
|
||||||
|
],
|
||||||
|
"summary": "Get map by ID",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Map ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/Response-Map"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Map not found",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/Error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"description": "General error response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"definitions": {
|
||||||
|
"Error": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"error": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Map": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"asset_version": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"display_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"game_id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"load_count": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"modes": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"submitter": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"thumbnail": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PagedResponse-Map": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"description": "Data contains the actual response payload",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/Map"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pagination": {
|
||||||
|
"description": "Pagination contains information about paging",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Pagination"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Pagination": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"page": {
|
||||||
|
"description": "Current page number",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"page_size": {
|
||||||
|
"description": "Number of items per page",
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Response-Map": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"description": "Data contains the actual response payload",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Map"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"securityDefinitions": {
|
||||||
|
"ApiKeyAuth": {
|
||||||
|
"type": "apiKey",
|
||||||
|
"name": "X-API-Key",
|
||||||
|
"in": "header"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}`
|
||||||
|
|
||||||
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||||
|
var SwaggerInfo = &swag.Spec{
|
||||||
|
Version: "1.0",
|
||||||
|
Host: "",
|
||||||
|
BasePath: "/public-api/v1",
|
||||||
|
Schemes: []string{},
|
||||||
|
Title: "StrafesNET Maps API",
|
||||||
|
Description: "Obtain an api key at https://dev.strafes.net\nRequires Data:Read permission",
|
||||||
|
InfoInstanceName: "swagger",
|
||||||
|
SwaggerTemplate: docTemplate,
|
||||||
|
LeftDelim: "{{",
|
||||||
|
RightDelim: "}}",
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||||||
|
}
|
||||||
217
docs/swagger.json
Normal file
217
docs/swagger.json
Normal file
@@ -0,0 +1,217 @@
|
|||||||
|
{
|
||||||
|
"swagger": "2.0",
|
||||||
|
"info": {
|
||||||
|
"description": "Obtain an api key at https://dev.strafes.net\nRequires Data:Read permission",
|
||||||
|
"title": "StrafesNET Maps API",
|
||||||
|
"contact": {},
|
||||||
|
"version": "1.0"
|
||||||
|
},
|
||||||
|
"basePath": "/public-api/v1",
|
||||||
|
"paths": {
|
||||||
|
"/map": {
|
||||||
|
"get": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKeyAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Get a list of maps",
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"maps"
|
||||||
|
],
|
||||||
|
"summary": "List maps",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"maximum": 100,
|
||||||
|
"minimum": 1,
|
||||||
|
"type": "integer",
|
||||||
|
"default": 10,
|
||||||
|
"description": "Page size (max 100)",
|
||||||
|
"name": "page_size",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"minimum": 1,
|
||||||
|
"type": "integer",
|
||||||
|
"default": 1,
|
||||||
|
"description": "Page number",
|
||||||
|
"name": "page_number",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"name": "game_id",
|
||||||
|
"in": "query"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/PagedResponse-Map"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"description": "General error response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/map/{id}": {
|
||||||
|
"get": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKeyAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Get a specific map by its ID",
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"maps"
|
||||||
|
],
|
||||||
|
"summary": "Get map by ID",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "Map ID",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/Response-Map"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"404": {
|
||||||
|
"description": "Map not found",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/Error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"description": "General error response",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"definitions": {
|
||||||
|
"Error": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"error": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Map": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"asset_version": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"display_name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"game_id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"load_count": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"modes": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"submitter": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"thumbnail": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"updated_at": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"PagedResponse-Map": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"description": "Data contains the actual response payload",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/Map"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pagination": {
|
||||||
|
"description": "Pagination contains information about paging",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Pagination"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Pagination": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"page": {
|
||||||
|
"description": "Current page number",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"page_size": {
|
||||||
|
"description": "Number of items per page",
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Response-Map": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"description": "Data contains the actual response payload",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/Map"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"securityDefinitions": {
|
||||||
|
"ApiKeyAuth": {
|
||||||
|
"type": "apiKey",
|
||||||
|
"name": "X-API-Key",
|
||||||
|
"in": "header"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
141
docs/swagger.yaml
Normal file
141
docs/swagger.yaml
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
basePath: /public-api/v1
|
||||||
|
definitions:
|
||||||
|
Error:
|
||||||
|
properties:
|
||||||
|
error:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
Map:
|
||||||
|
properties:
|
||||||
|
asset_version:
|
||||||
|
type: integer
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
creator:
|
||||||
|
type: string
|
||||||
|
date:
|
||||||
|
type: string
|
||||||
|
display_name:
|
||||||
|
type: string
|
||||||
|
game_id:
|
||||||
|
type: integer
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
load_count:
|
||||||
|
type: integer
|
||||||
|
modes:
|
||||||
|
type: integer
|
||||||
|
submitter:
|
||||||
|
type: integer
|
||||||
|
thumbnail:
|
||||||
|
type: integer
|
||||||
|
updated_at:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
PagedResponse-Map:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
description: Data contains the actual response payload
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/Map'
|
||||||
|
type: array
|
||||||
|
pagination:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/Pagination'
|
||||||
|
description: Pagination contains information about paging
|
||||||
|
type: object
|
||||||
|
Pagination:
|
||||||
|
properties:
|
||||||
|
page:
|
||||||
|
description: Current page number
|
||||||
|
type: integer
|
||||||
|
page_size:
|
||||||
|
description: Number of items per page
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
Response-Map:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/Map'
|
||||||
|
description: Data contains the actual response payload
|
||||||
|
type: object
|
||||||
|
info:
|
||||||
|
contact: {}
|
||||||
|
description: |-
|
||||||
|
Obtain an api key at https://dev.strafes.net
|
||||||
|
Requires Data:Read permission
|
||||||
|
title: StrafesNET Maps API
|
||||||
|
version: "1.0"
|
||||||
|
paths:
|
||||||
|
/map:
|
||||||
|
get:
|
||||||
|
description: Get a list of maps
|
||||||
|
parameters:
|
||||||
|
- default: 10
|
||||||
|
description: Page size (max 100)
|
||||||
|
in: query
|
||||||
|
maximum: 100
|
||||||
|
minimum: 1
|
||||||
|
name: page_size
|
||||||
|
type: integer
|
||||||
|
- default: 1
|
||||||
|
description: Page number
|
||||||
|
in: query
|
||||||
|
minimum: 1
|
||||||
|
name: page_number
|
||||||
|
type: integer
|
||||||
|
- in: query
|
||||||
|
name: game_id
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/PagedResponse-Map'
|
||||||
|
default:
|
||||||
|
description: General error response
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Error'
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: List maps
|
||||||
|
tags:
|
||||||
|
- maps
|
||||||
|
/map/{id}:
|
||||||
|
get:
|
||||||
|
description: Get a specific map by its ID
|
||||||
|
parameters:
|
||||||
|
- description: Map ID
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Response-Map'
|
||||||
|
"404":
|
||||||
|
description: Map not found
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Error'
|
||||||
|
default:
|
||||||
|
description: General error response
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/Error'
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get map by ID
|
||||||
|
tags:
|
||||||
|
- maps
|
||||||
|
securityDefinitions:
|
||||||
|
ApiKeyAuth:
|
||||||
|
in: header
|
||||||
|
name: X-API-Key
|
||||||
|
type: apiKey
|
||||||
|
swagger: "2.0"
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
|
//go:generate swag init -g ./cmd/maps-service/service.go
|
||||||
//go:generate go run github.com/ogen-go/ogen/cmd/ogen@latest --target pkg/api --clean openapi.yaml
|
//go:generate go run github.com/ogen-go/ogen/cmd/ogen@latest --target pkg/api --clean openapi.yaml
|
||||||
|
|||||||
66
go.mod
66
go.mod
@@ -1,44 +1,80 @@
|
|||||||
module git.itzana.me/strafesnet/maps-service
|
module git.itzana.me/strafesnet/maps-service
|
||||||
|
|
||||||
go 1.22
|
go 1.24.0
|
||||||
|
|
||||||
toolchain go1.23.3
|
toolchain go1.24.5
|
||||||
|
|
||||||
require (
|
require (
|
||||||
git.itzana.me/strafesnet/go-grpc v0.0.0-20250724030029-845bea991815
|
git.itzana.me/StrafesNET/dev-service v0.0.0-20250628052121-92af8193b5ed
|
||||||
|
git.itzana.me/strafesnet/go-grpc v0.0.0-20250807005013-301d35b914ef
|
||||||
git.itzana.me/strafesnet/utils v0.0.0-20220716194944-d8ca164052f9
|
git.itzana.me/strafesnet/utils v0.0.0-20220716194944-d8ca164052f9
|
||||||
github.com/dchest/siphash v1.2.3
|
github.com/dchest/siphash v1.2.3
|
||||||
|
github.com/gin-gonic/gin v1.10.1
|
||||||
github.com/go-faster/errors v0.7.1
|
github.com/go-faster/errors v0.7.1
|
||||||
github.com/go-faster/jx v1.1.0
|
github.com/go-faster/jx v1.1.0
|
||||||
github.com/nats-io/nats.go v1.37.0
|
github.com/nats-io/nats.go v1.37.0
|
||||||
github.com/ogen-go/ogen v1.2.1
|
github.com/ogen-go/ogen v1.2.1
|
||||||
github.com/sirupsen/logrus v1.9.3
|
github.com/sirupsen/logrus v1.9.3
|
||||||
github.com/urfave/cli/v2 v2.27.5
|
github.com/swaggo/files v1.0.1
|
||||||
|
github.com/swaggo/gin-swagger v1.6.0
|
||||||
|
github.com/swaggo/swag v1.16.6
|
||||||
|
github.com/urfave/cli/v2 v2.27.6
|
||||||
go.opentelemetry.io/otel v1.32.0
|
go.opentelemetry.io/otel v1.32.0
|
||||||
go.opentelemetry.io/otel/metric v1.32.0
|
go.opentelemetry.io/otel/metric v1.32.0
|
||||||
go.opentelemetry.io/otel/trace v1.32.0
|
go.opentelemetry.io/otel/trace v1.32.0
|
||||||
google.golang.org/grpc v1.48.0
|
google.golang.org/grpc v1.48.0
|
||||||
gorm.io/driver/postgres v1.5.10
|
gorm.io/driver/postgres v1.6.0
|
||||||
gorm.io/gorm v1.25.10
|
gorm.io/gorm v1.25.12
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/KyleBanks/depth v1.2.1 // indirect
|
||||||
|
github.com/PuerkitoBio/purell v1.1.1 // indirect
|
||||||
|
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
|
||||||
|
github.com/bytedance/sonic v1.11.6 // indirect
|
||||||
|
github.com/bytedance/sonic/loader v0.1.1 // indirect
|
||||||
|
github.com/cloudwego/base64x v0.1.4 // indirect
|
||||||
|
github.com/cloudwego/iasm v0.2.0 // indirect
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
|
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
|
||||||
|
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
|
||||||
|
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||||
|
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||||
|
github.com/go-openapi/jsonreference v0.19.6 // indirect
|
||||||
|
github.com/go-openapi/spec v0.20.4 // indirect
|
||||||
|
github.com/go-openapi/swag v0.19.15 // indirect
|
||||||
|
github.com/go-playground/locales v0.14.1 // indirect
|
||||||
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||||
|
github.com/go-playground/validator/v10 v10.20.0 // indirect
|
||||||
|
github.com/goccy/go-json v0.10.2 // indirect
|
||||||
github.com/golang/protobuf v1.5.2 // indirect
|
github.com/golang/protobuf v1.5.2 // indirect
|
||||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
|
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
|
||||||
github.com/jackc/pgx/v5 v5.5.5 // indirect
|
github.com/jackc/pgx/v5 v5.6.0 // indirect
|
||||||
github.com/jackc/puddle/v2 v2.2.1 // indirect
|
github.com/jackc/puddle/v2 v2.2.2 // indirect
|
||||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||||
github.com/jinzhu/now v1.1.5 // indirect
|
github.com/jinzhu/now v1.1.5 // indirect
|
||||||
|
github.com/josharian/intern v1.0.0 // indirect
|
||||||
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
github.com/klauspost/compress v1.17.6 // indirect
|
github.com/klauspost/compress v1.17.6 // indirect
|
||||||
|
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
|
||||||
|
github.com/leodido/go-urn v1.4.0 // indirect
|
||||||
|
github.com/mailru/easyjson v0.7.6 // indirect
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
github.com/nats-io/nkeys v0.4.7 // indirect
|
github.com/nats-io/nkeys v0.4.7 // indirect
|
||||||
github.com/nats-io/nuid v1.0.1 // indirect
|
github.com/nats-io/nuid v1.0.1 // indirect
|
||||||
|
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||||
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||||
|
github.com/ugorji/go/codec v1.2.12 // indirect
|
||||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
|
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
|
||||||
golang.org/x/crypto v0.23.0 // indirect
|
golang.org/x/arch v0.8.0 // indirect
|
||||||
|
golang.org/x/crypto v0.32.0 // indirect
|
||||||
|
golang.org/x/mod v0.17.0 // indirect
|
||||||
|
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
|
||||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
|
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
|
||||||
google.golang.org/protobuf v1.28.0 // indirect
|
google.golang.org/protobuf v1.34.1 // indirect
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
@@ -56,9 +92,9 @@ require (
|
|||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.11.0 // indirect
|
||||||
go.uber.org/zap v1.27.0 // indirect
|
go.uber.org/zap v1.27.0 // indirect
|
||||||
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect
|
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect
|
||||||
golang.org/x/net v0.25.0 // indirect
|
golang.org/x/net v0.34.0 // indirect
|
||||||
golang.org/x/sync v0.7.0 // indirect
|
golang.org/x/sync v0.12.0 // indirect
|
||||||
golang.org/x/sys v0.20.0 // indirect
|
golang.org/x/sys v0.29.0 // indirect
|
||||||
golang.org/x/text v0.15.0 // indirect
|
golang.org/x/text v0.23.0 // indirect
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
181
go.sum
181
go.sum
@@ -1,14 +1,30 @@
|
|||||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||||
git.itzana.me/strafesnet/go-grpc v0.0.0-20250724030029-845bea991815 h1:hkuOnehphRXUq/2z2UYgoqTq5MJj1GsWfshyc7bXda8=
|
git.itzana.me/StrafesNET/dev-service v0.0.0-20250628052121-92af8193b5ed h1:eGWIQx2AOrSsLC2dieuSs8MCliRE60tvpZnmxsTBtKc=
|
||||||
git.itzana.me/strafesnet/go-grpc v0.0.0-20250724030029-845bea991815/go.mod h1:X7XTRUScRkBWq8q8bplbeso105RPDlnY7J6Wy1IwBMs=
|
git.itzana.me/StrafesNET/dev-service v0.0.0-20250628052121-92af8193b5ed/go.mod h1:KJal0K++M6HEzSry6JJ2iDPZtOQn5zSstNlDbU3X4Jg=
|
||||||
|
git.itzana.me/strafesnet/go-grpc v0.0.0-20250807005013-301d35b914ef h1:SJi4V4+xzScFnbMRN1gkZxcqR1xKfiT7CaXanLltEzw=
|
||||||
|
git.itzana.me/strafesnet/go-grpc v0.0.0-20250807005013-301d35b914ef/go.mod h1:X7XTRUScRkBWq8q8bplbeso105RPDlnY7J6Wy1IwBMs=
|
||||||
git.itzana.me/strafesnet/utils v0.0.0-20220716194944-d8ca164052f9 h1:7lU6jyR7S7Rhh1dnUp7GyIRHUTBXZagw8F4n4hOyxLw=
|
git.itzana.me/strafesnet/utils v0.0.0-20220716194944-d8ca164052f9 h1:7lU6jyR7S7Rhh1dnUp7GyIRHUTBXZagw8F4n4hOyxLw=
|
||||||
git.itzana.me/strafesnet/utils v0.0.0-20220716194944-d8ca164052f9/go.mod h1:uyYerSieEt4v0MJCdPLppG0LtJ4Yj035vuTetWGsxjY=
|
git.itzana.me/strafesnet/utils v0.0.0-20220716194944-d8ca164052f9/go.mod h1:uyYerSieEt4v0MJCdPLppG0LtJ4Yj035vuTetWGsxjY=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
|
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
|
||||||
|
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
|
||||||
|
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
|
||||||
|
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||||
|
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||||
|
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||||
|
github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
|
||||||
|
github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
|
||||||
|
github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
|
||||||
|
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
|
||||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||||
|
github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
|
||||||
|
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
|
||||||
|
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
|
||||||
|
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
|
||||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||||
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||||
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||||
@@ -17,6 +33,7 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH
|
|||||||
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
|
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
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 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.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@@ -32,8 +49,16 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.
|
|||||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||||
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
|
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
|
||||||
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
|
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
|
||||||
|
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
|
||||||
|
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
|
||||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||||
|
github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4=
|
||||||
|
github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk=
|
||||||
|
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
|
||||||
|
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
|
||||||
|
github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ=
|
||||||
|
github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
|
||||||
github.com/go-faster/errors v0.7.1 h1:MkJTnDoEdi9pDabt1dpWf7AA8/BaSYZqibYyhZ20AYg=
|
github.com/go-faster/errors v0.7.1 h1:MkJTnDoEdi9pDabt1dpWf7AA8/BaSYZqibYyhZ20AYg=
|
||||||
github.com/go-faster/errors v0.7.1/go.mod h1:5ySTjWFiphBs07IKuiL69nxdfd5+fzh1u7FPGZP2quo=
|
github.com/go-faster/errors v0.7.1/go.mod h1:5ySTjWFiphBs07IKuiL69nxdfd5+fzh1u7FPGZP2quo=
|
||||||
github.com/go-faster/jx v1.1.0 h1:ZsW3wD+snOdmTDy9eIVgQdjUpXRRV4rqW8NS3t+20bg=
|
github.com/go-faster/jx v1.1.0 h1:ZsW3wD+snOdmTDy9eIVgQdjUpXRRV4rqW8NS3t+20bg=
|
||||||
@@ -45,6 +70,26 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
|||||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
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-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||||
|
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||||
|
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
|
||||||
|
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
|
||||||
|
github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs=
|
||||||
|
github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns=
|
||||||
|
github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M=
|
||||||
|
github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I=
|
||||||
|
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||||
|
github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
|
||||||
|
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
|
||||||
|
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||||
|
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||||
|
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||||
|
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
|
||||||
|
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
|
||||||
|
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
|
||||||
|
github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8=
|
||||||
|
github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
|
||||||
|
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
|
||||||
|
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
|
||||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
@@ -70,6 +115,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|||||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||||
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.3.0/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 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||||
@@ -77,42 +123,67 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
|
|||||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
||||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
||||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
|
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
|
||||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
|
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
|
||||||
github.com/jackc/pgx/v5 v5.5.5 h1:amBjrZVmksIdNjxGW/IiIMzxMKZFelXbUoPNb+8sjQw=
|
github.com/jackc/pgx/v5 v5.6.0 h1:SWJzexBzPL5jb0GEsrPMLIsi/3jOo7RHlzTjcAeDrPY=
|
||||||
github.com/jackc/pgx/v5 v5.5.5/go.mod h1:ez9gk+OAat140fv9ErkZDYFWmXLfV+++K0uAOiwgm1A=
|
github.com/jackc/pgx/v5 v5.6.0/go.mod h1:DNZ/vlrUnhWCoFGxHAG8U2ljioxukquj7utPDgtQdTw=
|
||||||
github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk=
|
github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo=
|
||||||
github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
|
||||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
|
||||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||||
github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||||
|
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||||
|
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
|
||||||
|
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||||
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI=
|
github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI=
|
||||||
github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
|
github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
|
||||||
|
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||||
|
github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
|
||||||
|
github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
|
||||||
|
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
|
||||||
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
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/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 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||||
|
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
||||||
|
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
|
||||||
|
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||||
|
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
|
||||||
|
github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA=
|
||||||
|
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||||
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
|
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||||
|
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||||
github.com/nats-io/nats.go v1.37.0 h1:07rauXbVnnJvv1gfIyghFEo6lUcYRY0WXc3x7x0vUxE=
|
github.com/nats-io/nats.go v1.37.0 h1:07rauXbVnnJvv1gfIyghFEo6lUcYRY0WXc3x7x0vUxE=
|
||||||
github.com/nats-io/nats.go v1.37.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
|
github.com/nats-io/nats.go v1.37.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8=
|
||||||
github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=
|
github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI=
|
||||||
github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc=
|
github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc=
|
||||||
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
|
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/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||||
|
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||||
github.com/ogen-go/ogen v1.2.1 h1:C5A0lvUMu2wl+eWIxnpXMWnuOJ26a2FyzR1CIC2qG0M=
|
github.com/ogen-go/ogen v1.2.1 h1:C5A0lvUMu2wl+eWIxnpXMWnuOJ26a2FyzR1CIC2qG0M=
|
||||||
github.com/ogen-go/ogen v1.2.1/go.mod h1:P2zQdEu8UqaVRfD5GEFvl+9q63VjMLvDquq1wVbyInM=
|
github.com/ogen-go/ogen v1.2.1/go.mod h1:P2zQdEu8UqaVRfD5GEFvl+9q63VjMLvDquq1wVbyInM=
|
||||||
|
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
|
||||||
|
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
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/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||||
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
|
||||||
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
|
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
|
||||||
@@ -121,16 +192,35 @@ github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic
|
|||||||
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||||
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
|
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||||
|
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||||
|
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||||
|
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
|
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||||
|
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
|
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||||
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
|
||||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w=
|
github.com/swaggo/files v1.0.1 h1:J1bVJ4XHZNq0I46UU90611i9/YzdrF7x92oX1ig5IdE=
|
||||||
github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
|
github.com/swaggo/files v1.0.1/go.mod h1:0qXmMNH6sXNf+73t65aKeB+ApmgxdnkQzVTAj2uaMUg=
|
||||||
|
github.com/swaggo/gin-swagger v1.6.0 h1:y8sxvQ3E20/RCyrXeFfg60r6H0Z+SwpTjMYsMm+zy8M=
|
||||||
|
github.com/swaggo/gin-swagger v1.6.0/go.mod h1:BG00cCEy294xtVpyIAHG6+e2Qzj/xKlRdOqDkvq0uzo=
|
||||||
|
github.com/swaggo/swag v1.16.6 h1:qBNcx53ZaX+M5dxVyTrgQ0PJ/ACK+NzhwcbieTt+9yI=
|
||||||
|
github.com/swaggo/swag v1.16.6/go.mod h1:ngP2etMK5a0P3QBizic5MEwpRmluJZPHjXcMoj4Xesg=
|
||||||
|
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
||||||
|
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||||
|
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
|
||||||
|
github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
|
||||||
|
github.com/urfave/cli/v2 v2.27.6 h1:VdRdS98FNhKZ8/Az8B7MTyGQmpIr36O1EHybx/LaZ4g=
|
||||||
|
github.com/urfave/cli/v2 v2.27.6/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ=
|
||||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
|
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
|
||||||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
|
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
|
||||||
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U=
|
go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U=
|
||||||
go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg=
|
go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg=
|
||||||
go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M=
|
go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M=
|
||||||
@@ -144,55 +234,85 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
|||||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
||||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||||
|
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
|
||||||
|
golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
|
||||||
|
golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
|
||||||
|
golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||||
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc h1:O9NuF4s+E/PvMIy+9IUZB9znFwUIXEWSstNjek6VpVg=
|
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc h1:O9NuF4s+E/PvMIy+9IUZB9znFwUIXEWSstNjek6VpVg=
|
||||||
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
|
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
|
||||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
|
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
|
||||||
|
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
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.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM=
|
||||||
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
|
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||||
|
golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
|
||||||
|
golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
|
||||||
|
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
|
||||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
|
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
|
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
|
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
|
||||||
|
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||||
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
|
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
|
||||||
|
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
||||||
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||||
@@ -222,9 +342,11 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
|
|||||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
|
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
|
||||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
@@ -232,12 +354,15 @@ gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gorm.io/driver/postgres v1.5.10 h1:7Lggqempgy496c0WfHXsYWxk3Th+ZcW66/21QhVFdeE=
|
gorm.io/driver/postgres v1.6.0 h1:2dxzU8xJ+ivvqTRph34QX+WrRaJlmfyPqXmoGVjMBa4=
|
||||||
gorm.io/driver/postgres v1.5.10/go.mod h1:DX3GReXH+3FPWGrrgffdvCk3DQ1dwDPdmbenSkweRGI=
|
gorm.io/driver/postgres v1.6.0/go.mod h1:vUw0mrGgrTK+uPHEhAdV4sfFELrByKVGnaVRkXDhtWo=
|
||||||
gorm.io/gorm v1.21.11/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
|
gorm.io/gorm v1.21.11/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
|
||||||
gorm.io/gorm v1.25.10 h1:dQpO+33KalOA+aFYGlK+EfxcI5MbO7EP2yYygwh9h+s=
|
gorm.io/gorm v1.25.12 h1:I0u8i2hWQItBq1WfE0o2+WuL9+8L21K9e2HHSTE/0f8=
|
||||||
gorm.io/gorm v1.25.10/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
gorm.io/gorm v1.25.12/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ=
|
||||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||||
|
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
|
||||||
|
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||||
|
|||||||
129
openapi.yaml
129
openapi.yaml
@@ -80,21 +80,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/Error"
|
$ref: "#/components/schemas/Error"
|
||||||
/migrate-maps:
|
|
||||||
post:
|
|
||||||
summary: Perform maps migration
|
|
||||||
operationId: migrateMaps
|
|
||||||
tags:
|
|
||||||
- Maps
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: Successful response
|
|
||||||
default:
|
|
||||||
description: General Error
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: "#/components/schemas/Error"
|
|
||||||
/maps:
|
/maps:
|
||||||
get:
|
get:
|
||||||
summary: Get list of maps
|
summary: Get list of maps
|
||||||
@@ -119,14 +104,14 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 1
|
minimum: 1
|
||||||
maximum: 5
|
maximum: 5
|
||||||
- name: Sort
|
- name: Sort
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 4
|
maximum: 4
|
||||||
description: >
|
description: >
|
||||||
@@ -225,7 +210,7 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 1
|
minimum: 1
|
||||||
maximum: 5
|
maximum: 5
|
||||||
description: >
|
description: >
|
||||||
@@ -237,7 +222,7 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 4
|
maximum: 4
|
||||||
description: >
|
description: >
|
||||||
@@ -251,25 +236,25 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
- name: AssetID
|
- name: AssetID
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
- name: TargetAssetID
|
- name: TargetAssetID
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
- name: StatusID
|
- name: StatusID
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 9
|
maximum: 9
|
||||||
description: >
|
description: >
|
||||||
@@ -412,14 +397,14 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
- name: ModelVersion
|
- name: ModelVersion
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
responses:
|
responses:
|
||||||
"204":
|
"204":
|
||||||
@@ -679,7 +664,7 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 1
|
minimum: 1
|
||||||
maximum: 5
|
maximum: 5
|
||||||
description: >
|
description: >
|
||||||
@@ -691,7 +676,7 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 4
|
maximum: 4
|
||||||
description: >
|
description: >
|
||||||
@@ -705,25 +690,25 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
- name: AssetID
|
- name: AssetID
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
- name: UploadedAssetID
|
- name: UploadedAssetID
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
- name: StatusID
|
- name: StatusID
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 10
|
maximum: 10
|
||||||
description: >
|
description: >
|
||||||
@@ -892,14 +877,14 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
- name: ModelVersion
|
- name: ModelVersion
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
responses:
|
responses:
|
||||||
"204":
|
"204":
|
||||||
@@ -1165,7 +1150,7 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
@@ -1296,7 +1281,7 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
- name: ResourceID
|
- name: ResourceID
|
||||||
in: query
|
in: query
|
||||||
@@ -1470,7 +1455,7 @@ components:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 1
|
minimum: 1
|
||||||
Limit:
|
Limit:
|
||||||
name: Limit
|
name: Limit
|
||||||
@@ -1478,7 +1463,7 @@ components:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 100
|
maximum: 100
|
||||||
schemas:
|
schemas:
|
||||||
@@ -1502,20 +1487,20 @@ components:
|
|||||||
format: int64
|
format: int64
|
||||||
User:
|
User:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
Username:
|
Username:
|
||||||
type: string
|
type: string
|
||||||
maxLength: 64
|
maxLength: 64
|
||||||
ResourceType:
|
ResourceType:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
description: Is this a submission or is it a mapfix
|
description: Is this a submission or is it a mapfix
|
||||||
ResourceID:
|
ResourceID:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
EventType:
|
EventType:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
EventData:
|
EventData:
|
||||||
type: object
|
type: object
|
||||||
description: Arbitrary event data
|
description: Arbitrary event data
|
||||||
@@ -1554,7 +1539,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
Roles:
|
Roles:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
User:
|
User:
|
||||||
required:
|
required:
|
||||||
@@ -1565,7 +1550,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
UserID:
|
UserID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
Username:
|
Username:
|
||||||
type: string
|
type: string
|
||||||
@@ -1601,7 +1586,7 @@ components:
|
|||||||
maxLength: 128
|
maxLength: 128
|
||||||
GameID:
|
GameID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
Date:
|
Date:
|
||||||
type: integer
|
type: integer
|
||||||
@@ -1657,7 +1642,7 @@ components:
|
|||||||
maxLength: 128
|
maxLength: 128
|
||||||
GameID:
|
GameID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
CreatedAt:
|
CreatedAt:
|
||||||
type: integer
|
type: integer
|
||||||
@@ -1669,25 +1654,25 @@ components:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
Submitter:
|
Submitter:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
AssetID:
|
AssetID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
AssetVersion:
|
AssetVersion:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
Completed:
|
Completed:
|
||||||
type: boolean
|
type: boolean
|
||||||
TargetAssetID:
|
TargetAssetID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
StatusID:
|
StatusID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
Description:
|
Description:
|
||||||
type: string
|
type: string
|
||||||
@@ -1700,7 +1685,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
Total:
|
Total:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
Mapfixes:
|
Mapfixes:
|
||||||
type: array
|
type: array
|
||||||
@@ -1715,11 +1700,11 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
AssetID:
|
AssetID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
TargetAssetID:
|
TargetAssetID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
Description:
|
Description:
|
||||||
type: string
|
type: string
|
||||||
@@ -1744,11 +1729,11 @@ components:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
Owner:
|
Owner:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
Status:
|
Status:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
StatusMessage:
|
StatusMessage:
|
||||||
type: string
|
type: string
|
||||||
@@ -1786,7 +1771,7 @@ components:
|
|||||||
maxLength: 128
|
maxLength: 128
|
||||||
GameID:
|
GameID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
CreatedAt:
|
CreatedAt:
|
||||||
type: integer
|
type: integer
|
||||||
@@ -1798,33 +1783,33 @@ components:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
Submitter:
|
Submitter:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
AssetID:
|
AssetID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
AssetVersion:
|
AssetVersion:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
ValidatedAssetID:
|
ValidatedAssetID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
ValidatedAssetVersion:
|
ValidatedAssetVersion:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
Completed:
|
Completed:
|
||||||
type: boolean
|
type: boolean
|
||||||
UploadedAssetID:
|
UploadedAssetID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
StatusID:
|
StatusID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
Submissions:
|
Submissions:
|
||||||
required:
|
required:
|
||||||
@@ -1834,7 +1819,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
Total:
|
Total:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
Submissions:
|
Submissions:
|
||||||
type: array
|
type: array
|
||||||
@@ -1850,7 +1835,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
AssetID:
|
AssetID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint64
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
DisplayName:
|
DisplayName:
|
||||||
type: string
|
type: string
|
||||||
@@ -1860,7 +1845,7 @@ components:
|
|||||||
maxLength: 128
|
maxLength: 128
|
||||||
GameID:
|
GameID:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
ReleaseInfo:
|
ReleaseInfo:
|
||||||
required:
|
required:
|
||||||
@@ -1901,7 +1886,7 @@ components:
|
|||||||
maxLength: 1048576
|
maxLength: 1048576
|
||||||
ResourceType:
|
ResourceType:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
ResourceID:
|
ResourceID:
|
||||||
type: integer
|
type: integer
|
||||||
@@ -1923,7 +1908,7 @@ components:
|
|||||||
maxLength: 1048576
|
maxLength: 1048576
|
||||||
ResourceType:
|
ResourceType:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
ResourceID:
|
ResourceID:
|
||||||
type: integer
|
type: integer
|
||||||
@@ -1946,7 +1931,7 @@ components:
|
|||||||
maxLength: 1048576
|
maxLength: 1048576
|
||||||
ResourceType:
|
ResourceType:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
ResourceID:
|
ResourceID:
|
||||||
type: integer
|
type: integer
|
||||||
@@ -1974,7 +1959,7 @@ components:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
Policy:
|
Policy:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
ScriptPolicyCreate:
|
ScriptPolicyCreate:
|
||||||
required:
|
required:
|
||||||
@@ -1993,7 +1978,7 @@ components:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
Policy:
|
Policy:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
ScriptPolicyUpdate:
|
ScriptPolicyUpdate:
|
||||||
required:
|
required:
|
||||||
@@ -2014,7 +1999,7 @@ components:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
Policy:
|
Policy:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
Error:
|
Error:
|
||||||
description: Represents error object
|
description: Represents error object
|
||||||
@@ -2022,7 +2007,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
code:
|
code:
|
||||||
type: integer
|
type: integer
|
||||||
format: uint32
|
format: int64
|
||||||
minimum: 0
|
minimum: 0
|
||||||
message:
|
message:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -301,12 +301,6 @@ type Invoker interface {
|
|||||||
//
|
//
|
||||||
// GET /submissions
|
// GET /submissions
|
||||||
ListSubmissions(ctx context.Context, params ListSubmissionsParams) (*Submissions, error)
|
ListSubmissions(ctx context.Context, params ListSubmissionsParams) (*Submissions, error)
|
||||||
// MigrateMaps invokes migrateMaps operation.
|
|
||||||
//
|
|
||||||
// Perform maps migration.
|
|
||||||
//
|
|
||||||
// POST /migrate-maps
|
|
||||||
MigrateMaps(ctx context.Context) error
|
|
||||||
// ReleaseSubmissions invokes releaseSubmissions operation.
|
// ReleaseSubmissions invokes releaseSubmissions operation.
|
||||||
//
|
//
|
||||||
// Release a set of uploaded maps.
|
// Release a set of uploaded maps.
|
||||||
@@ -6127,111 +6121,6 @@ func (c *Client) sendListSubmissions(ctx context.Context, params ListSubmissions
|
|||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// MigrateMaps invokes migrateMaps operation.
|
|
||||||
//
|
|
||||||
// Perform maps migration.
|
|
||||||
//
|
|
||||||
// POST /migrate-maps
|
|
||||||
func (c *Client) MigrateMaps(ctx context.Context) error {
|
|
||||||
_, err := c.sendMigrateMaps(ctx)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Client) sendMigrateMaps(ctx context.Context) (res *MigrateMapsOK, err error) {
|
|
||||||
otelAttrs := []attribute.KeyValue{
|
|
||||||
otelogen.OperationID("migrateMaps"),
|
|
||||||
semconv.HTTPRequestMethodKey.String("POST"),
|
|
||||||
semconv.HTTPRouteKey.String("/migrate-maps"),
|
|
||||||
}
|
|
||||||
|
|
||||||
// Run stopwatch.
|
|
||||||
startTime := time.Now()
|
|
||||||
defer func() {
|
|
||||||
// Use floating point division here for higher precision (instead of Millisecond method).
|
|
||||||
elapsedDuration := time.Since(startTime)
|
|
||||||
c.duration.Record(ctx, float64(elapsedDuration)/float64(time.Millisecond), metric.WithAttributes(otelAttrs...))
|
|
||||||
}()
|
|
||||||
|
|
||||||
// Increment request counter.
|
|
||||||
c.requests.Add(ctx, 1, metric.WithAttributes(otelAttrs...))
|
|
||||||
|
|
||||||
// Start a span for this request.
|
|
||||||
ctx, span := c.cfg.Tracer.Start(ctx, MigrateMapsOperation,
|
|
||||||
trace.WithAttributes(otelAttrs...),
|
|
||||||
clientSpanKind,
|
|
||||||
)
|
|
||||||
// Track stage for error reporting.
|
|
||||||
var stage string
|
|
||||||
defer func() {
|
|
||||||
if err != nil {
|
|
||||||
span.RecordError(err)
|
|
||||||
span.SetStatus(codes.Error, stage)
|
|
||||||
c.errors.Add(ctx, 1, metric.WithAttributes(otelAttrs...))
|
|
||||||
}
|
|
||||||
span.End()
|
|
||||||
}()
|
|
||||||
|
|
||||||
stage = "BuildURL"
|
|
||||||
u := uri.Clone(c.requestURL(ctx))
|
|
||||||
var pathParts [1]string
|
|
||||||
pathParts[0] = "/migrate-maps"
|
|
||||||
uri.AddPathParts(u, pathParts[:]...)
|
|
||||||
|
|
||||||
stage = "EncodeRequest"
|
|
||||||
r, err := ht.NewRequest(ctx, "POST", u)
|
|
||||||
if err != nil {
|
|
||||||
return res, errors.Wrap(err, "create request")
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
type bitset = [1]uint8
|
|
||||||
var satisfied bitset
|
|
||||||
{
|
|
||||||
stage = "Security:CookieAuth"
|
|
||||||
switch err := c.securityCookieAuth(ctx, MigrateMapsOperation, r); {
|
|
||||||
case err == nil: // if NO error
|
|
||||||
satisfied[0] |= 1 << 0
|
|
||||||
case errors.Is(err, ogenerrors.ErrSkipClientSecurity):
|
|
||||||
// Skip this security.
|
|
||||||
default:
|
|
||||||
return res, errors.Wrap(err, "security \"CookieAuth\"")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ok := func() bool {
|
|
||||||
nextRequirement:
|
|
||||||
for _, requirement := range []bitset{
|
|
||||||
{0b00000001},
|
|
||||||
} {
|
|
||||||
for i, mask := range requirement {
|
|
||||||
if satisfied[i]&mask != mask {
|
|
||||||
continue nextRequirement
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}(); !ok {
|
|
||||||
return res, ogenerrors.ErrSecurityRequirementIsNotSatisfied
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage = "SendRequest"
|
|
||||||
resp, err := c.cfg.Client.Do(r)
|
|
||||||
if err != nil {
|
|
||||||
return res, errors.Wrap(err, "do request")
|
|
||||||
}
|
|
||||||
defer resp.Body.Close()
|
|
||||||
|
|
||||||
stage = "DecodeResponse"
|
|
||||||
result, err := decodeMigrateMapsResponse(resp)
|
|
||||||
if err != nil {
|
|
||||||
return res, errors.Wrap(err, "decode response")
|
|
||||||
}
|
|
||||||
|
|
||||||
return result, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReleaseSubmissions invokes releaseSubmissions operation.
|
// ReleaseSubmissions invokes releaseSubmissions operation.
|
||||||
//
|
//
|
||||||
// Release a set of uploaded maps.
|
// Release a set of uploaded maps.
|
||||||
|
|||||||
@@ -8433,186 +8433,6 @@ func (s *Server) handleListSubmissionsRequest(args [0]string, argsEscaped bool,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// handleMigrateMapsRequest handles migrateMaps operation.
|
|
||||||
//
|
|
||||||
// Perform maps migration.
|
|
||||||
//
|
|
||||||
// POST /migrate-maps
|
|
||||||
func (s *Server) handleMigrateMapsRequest(args [0]string, argsEscaped bool, w http.ResponseWriter, r *http.Request) {
|
|
||||||
statusWriter := &codeRecorder{ResponseWriter: w}
|
|
||||||
w = statusWriter
|
|
||||||
otelAttrs := []attribute.KeyValue{
|
|
||||||
otelogen.OperationID("migrateMaps"),
|
|
||||||
semconv.HTTPRequestMethodKey.String("POST"),
|
|
||||||
semconv.HTTPRouteKey.String("/migrate-maps"),
|
|
||||||
}
|
|
||||||
|
|
||||||
// Start a span for this request.
|
|
||||||
ctx, span := s.cfg.Tracer.Start(r.Context(), MigrateMapsOperation,
|
|
||||||
trace.WithAttributes(otelAttrs...),
|
|
||||||
serverSpanKind,
|
|
||||||
)
|
|
||||||
defer span.End()
|
|
||||||
|
|
||||||
// Add Labeler to context.
|
|
||||||
labeler := &Labeler{attrs: otelAttrs}
|
|
||||||
ctx = contextWithLabeler(ctx, labeler)
|
|
||||||
|
|
||||||
// Run stopwatch.
|
|
||||||
startTime := time.Now()
|
|
||||||
defer func() {
|
|
||||||
elapsedDuration := time.Since(startTime)
|
|
||||||
|
|
||||||
attrSet := labeler.AttributeSet()
|
|
||||||
attrs := attrSet.ToSlice()
|
|
||||||
code := statusWriter.status
|
|
||||||
if code != 0 {
|
|
||||||
codeAttr := semconv.HTTPResponseStatusCode(code)
|
|
||||||
attrs = append(attrs, codeAttr)
|
|
||||||
span.SetAttributes(codeAttr)
|
|
||||||
}
|
|
||||||
attrOpt := metric.WithAttributes(attrs...)
|
|
||||||
|
|
||||||
// Increment request counter.
|
|
||||||
s.requests.Add(ctx, 1, attrOpt)
|
|
||||||
|
|
||||||
// Use floating point division here for higher precision (instead of Millisecond method).
|
|
||||||
s.duration.Record(ctx, float64(elapsedDuration)/float64(time.Millisecond), attrOpt)
|
|
||||||
}()
|
|
||||||
|
|
||||||
var (
|
|
||||||
recordError = func(stage string, err error) {
|
|
||||||
span.RecordError(err)
|
|
||||||
|
|
||||||
// https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status
|
|
||||||
// Span Status MUST be left unset if HTTP status code was in the 1xx, 2xx or 3xx ranges,
|
|
||||||
// unless there was another error (e.g., network error receiving the response body; or 3xx codes with
|
|
||||||
// max redirects exceeded), in which case status MUST be set to Error.
|
|
||||||
code := statusWriter.status
|
|
||||||
if code >= 100 && code < 500 {
|
|
||||||
span.SetStatus(codes.Error, stage)
|
|
||||||
}
|
|
||||||
|
|
||||||
attrSet := labeler.AttributeSet()
|
|
||||||
attrs := attrSet.ToSlice()
|
|
||||||
if code != 0 {
|
|
||||||
attrs = append(attrs, semconv.HTTPResponseStatusCode(code))
|
|
||||||
}
|
|
||||||
|
|
||||||
s.errors.Add(ctx, 1, metric.WithAttributes(attrs...))
|
|
||||||
}
|
|
||||||
err error
|
|
||||||
opErrContext = ogenerrors.OperationContext{
|
|
||||||
Name: MigrateMapsOperation,
|
|
||||||
ID: "migrateMaps",
|
|
||||||
}
|
|
||||||
)
|
|
||||||
{
|
|
||||||
type bitset = [1]uint8
|
|
||||||
var satisfied bitset
|
|
||||||
{
|
|
||||||
sctx, ok, err := s.securityCookieAuth(ctx, MigrateMapsOperation, r)
|
|
||||||
if err != nil {
|
|
||||||
err = &ogenerrors.SecurityError{
|
|
||||||
OperationContext: opErrContext,
|
|
||||||
Security: "CookieAuth",
|
|
||||||
Err: err,
|
|
||||||
}
|
|
||||||
if encodeErr := encodeErrorResponse(s.h.NewError(ctx, err), w, span); encodeErr != nil {
|
|
||||||
defer recordError("Security:CookieAuth", err)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok {
|
|
||||||
satisfied[0] |= 1 << 0
|
|
||||||
ctx = sctx
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ok := func() bool {
|
|
||||||
nextRequirement:
|
|
||||||
for _, requirement := range []bitset{
|
|
||||||
{0b00000001},
|
|
||||||
} {
|
|
||||||
for i, mask := range requirement {
|
|
||||||
if satisfied[i]&mask != mask {
|
|
||||||
continue nextRequirement
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}(); !ok {
|
|
||||||
err = &ogenerrors.SecurityError{
|
|
||||||
OperationContext: opErrContext,
|
|
||||||
Err: ogenerrors.ErrSecurityRequirementIsNotSatisfied,
|
|
||||||
}
|
|
||||||
if encodeErr := encodeErrorResponse(s.h.NewError(ctx, err), w, span); encodeErr != nil {
|
|
||||||
defer recordError("Security", err)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var response *MigrateMapsOK
|
|
||||||
if m := s.cfg.Middleware; m != nil {
|
|
||||||
mreq := middleware.Request{
|
|
||||||
Context: ctx,
|
|
||||||
OperationName: MigrateMapsOperation,
|
|
||||||
OperationSummary: "Perform maps migration",
|
|
||||||
OperationID: "migrateMaps",
|
|
||||||
Body: nil,
|
|
||||||
Params: middleware.Parameters{},
|
|
||||||
Raw: r,
|
|
||||||
}
|
|
||||||
|
|
||||||
type (
|
|
||||||
Request = struct{}
|
|
||||||
Params = struct{}
|
|
||||||
Response = *MigrateMapsOK
|
|
||||||
)
|
|
||||||
response, err = middleware.HookMiddleware[
|
|
||||||
Request,
|
|
||||||
Params,
|
|
||||||
Response,
|
|
||||||
](
|
|
||||||
m,
|
|
||||||
mreq,
|
|
||||||
nil,
|
|
||||||
func(ctx context.Context, request Request, params Params) (response Response, err error) {
|
|
||||||
err = s.h.MigrateMaps(ctx)
|
|
||||||
return response, err
|
|
||||||
},
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
err = s.h.MigrateMaps(ctx)
|
|
||||||
}
|
|
||||||
if err != nil {
|
|
||||||
if errRes, ok := errors.Into[*ErrorStatusCode](err); ok {
|
|
||||||
if err := encodeErrorResponse(errRes, w, span); err != nil {
|
|
||||||
defer recordError("Internal", err)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if errors.Is(err, ht.ErrNotImplemented) {
|
|
||||||
s.cfg.ErrorHandler(ctx, w, r, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if err := encodeErrorResponse(s.h.NewError(ctx, err), w, span); err != nil {
|
|
||||||
defer recordError("Internal", err)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := encodeMigrateMapsResponse(response, w, span); err != nil {
|
|
||||||
defer recordError("EncodeResponse", err)
|
|
||||||
if !errors.Is(err, ht.ErrInternalServerErrorResponse) {
|
|
||||||
s.cfg.ErrorHandler(ctx, w, r, err)
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// handleReleaseSubmissionsRequest handles releaseSubmissions operation.
|
// handleReleaseSubmissionsRequest handles releaseSubmissions operation.
|
||||||
//
|
//
|
||||||
// Release a set of uploaded maps.
|
// Release a set of uploaded maps.
|
||||||
|
|||||||
@@ -426,14 +426,49 @@ func (s *Map) encodeFields(e *jx.Encoder) {
|
|||||||
e.FieldStart("Date")
|
e.FieldStart("Date")
|
||||||
e.Int64(s.Date)
|
e.Int64(s.Date)
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
e.FieldStart("CreatedAt")
|
||||||
|
e.Int64(s.CreatedAt)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
e.FieldStart("UpdatedAt")
|
||||||
|
e.Int64(s.UpdatedAt)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
e.FieldStart("Submitter")
|
||||||
|
e.UInt64(s.Submitter)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
e.FieldStart("Thumbnail")
|
||||||
|
e.UInt64(s.Thumbnail)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
e.FieldStart("AssetVersion")
|
||||||
|
e.UInt64(s.AssetVersion)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
e.FieldStart("LoadCount")
|
||||||
|
e.UInt32(s.LoadCount)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
e.FieldStart("Modes")
|
||||||
|
e.UInt32(s.Modes)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var jsonFieldsNameOfMap = [5]string{
|
var jsonFieldsNameOfMap = [12]string{
|
||||||
0: "ID",
|
0: "ID",
|
||||||
1: "DisplayName",
|
1: "DisplayName",
|
||||||
2: "Creator",
|
2: "Creator",
|
||||||
3: "GameID",
|
3: "GameID",
|
||||||
4: "Date",
|
4: "Date",
|
||||||
|
5: "CreatedAt",
|
||||||
|
6: "UpdatedAt",
|
||||||
|
7: "Submitter",
|
||||||
|
8: "Thumbnail",
|
||||||
|
9: "AssetVersion",
|
||||||
|
10: "LoadCount",
|
||||||
|
11: "Modes",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decode decodes Map from json.
|
// Decode decodes Map from json.
|
||||||
@@ -441,7 +476,7 @@ func (s *Map) Decode(d *jx.Decoder) error {
|
|||||||
if s == nil {
|
if s == nil {
|
||||||
return errors.New("invalid: unable to decode Map to nil")
|
return errors.New("invalid: unable to decode Map to nil")
|
||||||
}
|
}
|
||||||
var requiredBitSet [1]uint8
|
var requiredBitSet [2]uint8
|
||||||
|
|
||||||
if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
|
if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error {
|
||||||
switch string(k) {
|
switch string(k) {
|
||||||
@@ -505,6 +540,90 @@ func (s *Map) Decode(d *jx.Decoder) error {
|
|||||||
}(); err != nil {
|
}(); err != nil {
|
||||||
return errors.Wrap(err, "decode field \"Date\"")
|
return errors.Wrap(err, "decode field \"Date\"")
|
||||||
}
|
}
|
||||||
|
case "CreatedAt":
|
||||||
|
requiredBitSet[0] |= 1 << 5
|
||||||
|
if err := func() error {
|
||||||
|
v, err := d.Int64()
|
||||||
|
s.CreatedAt = int64(v)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}(); err != nil {
|
||||||
|
return errors.Wrap(err, "decode field \"CreatedAt\"")
|
||||||
|
}
|
||||||
|
case "UpdatedAt":
|
||||||
|
requiredBitSet[0] |= 1 << 6
|
||||||
|
if err := func() error {
|
||||||
|
v, err := d.Int64()
|
||||||
|
s.UpdatedAt = int64(v)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}(); err != nil {
|
||||||
|
return errors.Wrap(err, "decode field \"UpdatedAt\"")
|
||||||
|
}
|
||||||
|
case "Submitter":
|
||||||
|
requiredBitSet[0] |= 1 << 7
|
||||||
|
if err := func() error {
|
||||||
|
v, err := d.UInt64()
|
||||||
|
s.Submitter = uint64(v)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}(); err != nil {
|
||||||
|
return errors.Wrap(err, "decode field \"Submitter\"")
|
||||||
|
}
|
||||||
|
case "Thumbnail":
|
||||||
|
requiredBitSet[1] |= 1 << 0
|
||||||
|
if err := func() error {
|
||||||
|
v, err := d.UInt64()
|
||||||
|
s.Thumbnail = uint64(v)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}(); err != nil {
|
||||||
|
return errors.Wrap(err, "decode field \"Thumbnail\"")
|
||||||
|
}
|
||||||
|
case "AssetVersion":
|
||||||
|
requiredBitSet[1] |= 1 << 1
|
||||||
|
if err := func() error {
|
||||||
|
v, err := d.UInt64()
|
||||||
|
s.AssetVersion = uint64(v)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}(); err != nil {
|
||||||
|
return errors.Wrap(err, "decode field \"AssetVersion\"")
|
||||||
|
}
|
||||||
|
case "LoadCount":
|
||||||
|
requiredBitSet[1] |= 1 << 2
|
||||||
|
if err := func() error {
|
||||||
|
v, err := d.UInt32()
|
||||||
|
s.LoadCount = uint32(v)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}(); err != nil {
|
||||||
|
return errors.Wrap(err, "decode field \"LoadCount\"")
|
||||||
|
}
|
||||||
|
case "Modes":
|
||||||
|
requiredBitSet[1] |= 1 << 3
|
||||||
|
if err := func() error {
|
||||||
|
v, err := d.UInt32()
|
||||||
|
s.Modes = uint32(v)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}(); err != nil {
|
||||||
|
return errors.Wrap(err, "decode field \"Modes\"")
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return d.Skip()
|
return d.Skip()
|
||||||
}
|
}
|
||||||
@@ -514,8 +633,9 @@ func (s *Map) Decode(d *jx.Decoder) error {
|
|||||||
}
|
}
|
||||||
// Validate required fields.
|
// Validate required fields.
|
||||||
var failures []validate.FieldError
|
var failures []validate.FieldError
|
||||||
for i, mask := range [1]uint8{
|
for i, mask := range [2]uint8{
|
||||||
0b00011111,
|
0b11111111,
|
||||||
|
0b00001111,
|
||||||
} {
|
} {
|
||||||
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
|
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
|
||||||
// Mask only required fields and check equality to mask using XOR.
|
// Mask only required fields and check equality to mask using XOR.
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ const (
|
|||||||
ListScriptsOperation OperationName = "ListScripts"
|
ListScriptsOperation OperationName = "ListScripts"
|
||||||
ListSubmissionAuditEventsOperation OperationName = "ListSubmissionAuditEvents"
|
ListSubmissionAuditEventsOperation OperationName = "ListSubmissionAuditEvents"
|
||||||
ListSubmissionsOperation OperationName = "ListSubmissions"
|
ListSubmissionsOperation OperationName = "ListSubmissions"
|
||||||
MigrateMapsOperation OperationName = "MigrateMaps"
|
|
||||||
ReleaseSubmissionsOperation OperationName = "ReleaseSubmissions"
|
ReleaseSubmissionsOperation OperationName = "ReleaseSubmissions"
|
||||||
SessionRolesOperation OperationName = "SessionRoles"
|
SessionRolesOperation OperationName = "SessionRoles"
|
||||||
SessionUserOperation OperationName = "SessionUser"
|
SessionUserOperation OperationName = "SessionUser"
|
||||||
|
|||||||
@@ -3595,66 +3595,6 @@ func decodeListSubmissionsResponse(resp *http.Response) (res *Submissions, _ err
|
|||||||
return res, errors.Wrap(defRes, "error")
|
return res, errors.Wrap(defRes, "error")
|
||||||
}
|
}
|
||||||
|
|
||||||
func decodeMigrateMapsResponse(resp *http.Response) (res *MigrateMapsOK, _ error) {
|
|
||||||
switch resp.StatusCode {
|
|
||||||
case 200:
|
|
||||||
// Code 200.
|
|
||||||
return &MigrateMapsOK{}, nil
|
|
||||||
}
|
|
||||||
// Convenient error response.
|
|
||||||
defRes, err := func() (res *ErrorStatusCode, err error) {
|
|
||||||
ct, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type"))
|
|
||||||
if err != nil {
|
|
||||||
return res, errors.Wrap(err, "parse media type")
|
|
||||||
}
|
|
||||||
switch {
|
|
||||||
case ct == "application/json":
|
|
||||||
buf, err := io.ReadAll(resp.Body)
|
|
||||||
if err != nil {
|
|
||||||
return res, err
|
|
||||||
}
|
|
||||||
d := jx.DecodeBytes(buf)
|
|
||||||
|
|
||||||
var response Error
|
|
||||||
if err := func() error {
|
|
||||||
if err := response.Decode(d); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := d.Skip(); err != io.EOF {
|
|
||||||
return errors.New("unexpected trailing data")
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}(); err != nil {
|
|
||||||
err = &ogenerrors.DecodeBodyError{
|
|
||||||
ContentType: ct,
|
|
||||||
Body: buf,
|
|
||||||
Err: err,
|
|
||||||
}
|
|
||||||
return res, err
|
|
||||||
}
|
|
||||||
// Validate response.
|
|
||||||
if err := func() error {
|
|
||||||
if err := response.Validate(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}(); err != nil {
|
|
||||||
return res, errors.Wrap(err, "validate")
|
|
||||||
}
|
|
||||||
return &ErrorStatusCode{
|
|
||||||
StatusCode: resp.StatusCode,
|
|
||||||
Response: response,
|
|
||||||
}, nil
|
|
||||||
default:
|
|
||||||
return res, validate.InvalidContentType(ct)
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
if err != nil {
|
|
||||||
return res, errors.Wrapf(err, "default (code %d)", resp.StatusCode)
|
|
||||||
}
|
|
||||||
return res, errors.Wrap(defRes, "error")
|
|
||||||
}
|
|
||||||
|
|
||||||
func decodeReleaseSubmissionsResponse(resp *http.Response) (res *ReleaseSubmissionsCreated, _ error) {
|
func decodeReleaseSubmissionsResponse(resp *http.Response) (res *ReleaseSubmissionsCreated, _ error) {
|
||||||
switch resp.StatusCode {
|
switch resp.StatusCode {
|
||||||
case 201:
|
case 201:
|
||||||
|
|||||||
@@ -484,13 +484,6 @@ func encodeListSubmissionsResponse(response *Submissions, w http.ResponseWriter,
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeMigrateMapsResponse(response *MigrateMapsOK, w http.ResponseWriter, span trace.Span) error {
|
|
||||||
w.WriteHeader(200)
|
|
||||||
span.SetStatus(codes.Ok, http.StatusText(200))
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func encodeReleaseSubmissionsResponse(response *ReleaseSubmissionsCreated, w http.ResponseWriter, span trace.Span) error {
|
func encodeReleaseSubmissionsResponse(response *ReleaseSubmissionsCreated, w http.ResponseWriter, span trace.Span) error {
|
||||||
w.WriteHeader(201)
|
w.WriteHeader(201)
|
||||||
span.SetStatus(codes.Ok, http.StatusText(201))
|
span.SetStatus(codes.Ok, http.StatusText(201))
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -320,11 +320,18 @@ func (s *ErrorStatusCode) SetResponse(val Error) {
|
|||||||
|
|
||||||
// Ref: #/components/schemas/Map
|
// Ref: #/components/schemas/Map
|
||||||
type Map struct {
|
type Map struct {
|
||||||
ID int64 `json:"ID"`
|
ID int64 `json:"ID"`
|
||||||
DisplayName string `json:"DisplayName"`
|
DisplayName string `json:"DisplayName"`
|
||||||
Creator string `json:"Creator"`
|
Creator string `json:"Creator"`
|
||||||
GameID int32 `json:"GameID"`
|
GameID int32 `json:"GameID"`
|
||||||
Date int64 `json:"Date"`
|
Date int64 `json:"Date"`
|
||||||
|
CreatedAt int64 `json:"CreatedAt"`
|
||||||
|
UpdatedAt int64 `json:"UpdatedAt"`
|
||||||
|
Submitter uint64 `json:"Submitter"`
|
||||||
|
Thumbnail uint64 `json:"Thumbnail"`
|
||||||
|
AssetVersion uint64 `json:"AssetVersion"`
|
||||||
|
LoadCount uint32 `json:"LoadCount"`
|
||||||
|
Modes uint32 `json:"Modes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetID returns the value of ID.
|
// GetID returns the value of ID.
|
||||||
@@ -352,6 +359,41 @@ func (s *Map) GetDate() int64 {
|
|||||||
return s.Date
|
return s.Date
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetCreatedAt returns the value of CreatedAt.
|
||||||
|
func (s *Map) GetCreatedAt() int64 {
|
||||||
|
return s.CreatedAt
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetUpdatedAt returns the value of UpdatedAt.
|
||||||
|
func (s *Map) GetUpdatedAt() int64 {
|
||||||
|
return s.UpdatedAt
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSubmitter returns the value of Submitter.
|
||||||
|
func (s *Map) GetSubmitter() uint64 {
|
||||||
|
return s.Submitter
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetThumbnail returns the value of Thumbnail.
|
||||||
|
func (s *Map) GetThumbnail() uint64 {
|
||||||
|
return s.Thumbnail
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetAssetVersion returns the value of AssetVersion.
|
||||||
|
func (s *Map) GetAssetVersion() uint64 {
|
||||||
|
return s.AssetVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetLoadCount returns the value of LoadCount.
|
||||||
|
func (s *Map) GetLoadCount() uint32 {
|
||||||
|
return s.LoadCount
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetModes returns the value of Modes.
|
||||||
|
func (s *Map) GetModes() uint32 {
|
||||||
|
return s.Modes
|
||||||
|
}
|
||||||
|
|
||||||
// SetID sets the value of ID.
|
// SetID sets the value of ID.
|
||||||
func (s *Map) SetID(val int64) {
|
func (s *Map) SetID(val int64) {
|
||||||
s.ID = val
|
s.ID = val
|
||||||
@@ -377,6 +419,41 @@ func (s *Map) SetDate(val int64) {
|
|||||||
s.Date = val
|
s.Date = val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetCreatedAt sets the value of CreatedAt.
|
||||||
|
func (s *Map) SetCreatedAt(val int64) {
|
||||||
|
s.CreatedAt = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetUpdatedAt sets the value of UpdatedAt.
|
||||||
|
func (s *Map) SetUpdatedAt(val int64) {
|
||||||
|
s.UpdatedAt = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSubmitter sets the value of Submitter.
|
||||||
|
func (s *Map) SetSubmitter(val uint64) {
|
||||||
|
s.Submitter = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetThumbnail sets the value of Thumbnail.
|
||||||
|
func (s *Map) SetThumbnail(val uint64) {
|
||||||
|
s.Thumbnail = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetAssetVersion sets the value of AssetVersion.
|
||||||
|
func (s *Map) SetAssetVersion(val uint64) {
|
||||||
|
s.AssetVersion = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetLoadCount sets the value of LoadCount.
|
||||||
|
func (s *Map) SetLoadCount(val uint32) {
|
||||||
|
s.LoadCount = val
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetModes sets the value of Modes.
|
||||||
|
func (s *Map) SetModes(val uint32) {
|
||||||
|
s.Modes = val
|
||||||
|
}
|
||||||
|
|
||||||
// Ref: #/components/schemas/Mapfix
|
// Ref: #/components/schemas/Mapfix
|
||||||
type Mapfix struct {
|
type Mapfix struct {
|
||||||
ID int64 `json:"ID"`
|
ID int64 `json:"ID"`
|
||||||
@@ -587,9 +664,6 @@ func (s *Mapfixes) SetMapfixes(val []Mapfix) {
|
|||||||
s.Mapfixes = val
|
s.Mapfixes = val
|
||||||
}
|
}
|
||||||
|
|
||||||
// MigrateMapsOK is response for MigrateMaps operation.
|
|
||||||
type MigrateMapsOK struct{}
|
|
||||||
|
|
||||||
// Ref: #/components/schemas/Operation
|
// Ref: #/components/schemas/Operation
|
||||||
type Operation struct {
|
type Operation struct {
|
||||||
OperationID int32 `json:"OperationID"`
|
OperationID int32 `json:"OperationID"`
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ var operationRolesCookieAuth = map[string][]string{
|
|||||||
DeleteScriptPolicyOperation: []string{},
|
DeleteScriptPolicyOperation: []string{},
|
||||||
DownloadMapAssetOperation: []string{},
|
DownloadMapAssetOperation: []string{},
|
||||||
GetOperationOperation: []string{},
|
GetOperationOperation: []string{},
|
||||||
MigrateMapsOperation: []string{},
|
|
||||||
ReleaseSubmissionsOperation: []string{},
|
ReleaseSubmissionsOperation: []string{},
|
||||||
SessionRolesOperation: []string{},
|
SessionRolesOperation: []string{},
|
||||||
SessionUserOperation: []string{},
|
SessionUserOperation: []string{},
|
||||||
|
|||||||
@@ -280,12 +280,6 @@ type Handler interface {
|
|||||||
//
|
//
|
||||||
// GET /submissions
|
// GET /submissions
|
||||||
ListSubmissions(ctx context.Context, params ListSubmissionsParams) (*Submissions, error)
|
ListSubmissions(ctx context.Context, params ListSubmissionsParams) (*Submissions, error)
|
||||||
// MigrateMaps implements migrateMaps operation.
|
|
||||||
//
|
|
||||||
// Perform maps migration.
|
|
||||||
//
|
|
||||||
// POST /migrate-maps
|
|
||||||
MigrateMaps(ctx context.Context) error
|
|
||||||
// ReleaseSubmissions implements releaseSubmissions operation.
|
// ReleaseSubmissions implements releaseSubmissions operation.
|
||||||
//
|
//
|
||||||
// Release a set of uploaded maps.
|
// Release a set of uploaded maps.
|
||||||
|
|||||||
@@ -420,15 +420,6 @@ func (UnimplementedHandler) ListSubmissions(ctx context.Context, params ListSubm
|
|||||||
return r, ht.ErrNotImplemented
|
return r, ht.ErrNotImplemented
|
||||||
}
|
}
|
||||||
|
|
||||||
// MigrateMaps implements migrateMaps operation.
|
|
||||||
//
|
|
||||||
// Perform maps migration.
|
|
||||||
//
|
|
||||||
// POST /migrate-maps
|
|
||||||
func (UnimplementedHandler) MigrateMaps(ctx context.Context) error {
|
|
||||||
return ht.ErrNotImplemented
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReleaseSubmissions implements releaseSubmissions operation.
|
// ReleaseSubmissions implements releaseSubmissions operation.
|
||||||
//
|
//
|
||||||
// Release a set of uploaded maps.
|
// Release a set of uploaded maps.
|
||||||
|
|||||||
57
pkg/cmds/api.go
Normal file
57
pkg/cmds/api.go
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
package cmds
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.itzana.me/strafesnet/maps-service/pkg/public_api"
|
||||||
|
"github.com/urfave/cli/v2"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
|
)
|
||||||
|
|
||||||
|
func NewApiCommand() *cli.Command {
|
||||||
|
return &cli.Command{
|
||||||
|
Name: "api",
|
||||||
|
Usage: "Run api service",
|
||||||
|
Action: runAPI,
|
||||||
|
Flags: []cli.Flag{
|
||||||
|
&cli.IntFlag{
|
||||||
|
Name: "port",
|
||||||
|
Usage: "Listen port",
|
||||||
|
EnvVars: []string{"PORT"},
|
||||||
|
Value: 8080,
|
||||||
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "dev-rpc-host",
|
||||||
|
Usage: "Host of dev rpc",
|
||||||
|
EnvVars: []string{"DEV_RPC_HOST"},
|
||||||
|
Value: "dev-service:8081",
|
||||||
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "maps-rpc-host",
|
||||||
|
Usage: "Host of maps rpc",
|
||||||
|
EnvVars: []string{"MAPS_RPC_HOST"},
|
||||||
|
Value: "maptest-api:8081",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func runAPI(ctx *cli.Context) error {
|
||||||
|
// Dev service client
|
||||||
|
devConn, err := grpc.Dial(ctx.String("dev-rpc-host"), grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Data service client
|
||||||
|
mapsConn, err := grpc.Dial(ctx.String("maps-rpc-host"), grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return api.NewRouter(
|
||||||
|
api.WithContext(ctx),
|
||||||
|
api.WithPort(ctx.Int("port")),
|
||||||
|
api.WithDevClient(devConn),
|
||||||
|
api.WithMapsClient(mapsConn),
|
||||||
|
)
|
||||||
|
}
|
||||||
47
pkg/public_api/dto/map.go
Normal file
47
pkg/public_api/dto/map.go
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
package dto
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.itzana.me/strafesnet/go-grpc/maps_extended"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type MapFilter struct {
|
||||||
|
GameID *uint32 `json:"game_id" form:"game_id"`
|
||||||
|
} // @name MapFilter
|
||||||
|
|
||||||
|
type Map struct {
|
||||||
|
ID int64 `json:"id"`
|
||||||
|
DisplayName string `json:"display_name"`
|
||||||
|
Creator string `json:"creator"`
|
||||||
|
GameID uint32 `json:"game_id"`
|
||||||
|
Date time.Time `json:"date"`
|
||||||
|
CreatedAt time.Time `json:"created_at"`
|
||||||
|
UpdatedAt time.Time `json:"updated_at"`
|
||||||
|
Submitter uint64 `json:"submitter"`
|
||||||
|
Thumbnail uint64 `json:"thumbnail"`
|
||||||
|
AssetVersion uint64 `json:"asset_version"`
|
||||||
|
LoadCount uint32 `json:"load_count"`
|
||||||
|
Modes uint32 `json:"modes"`
|
||||||
|
} // @name Map
|
||||||
|
|
||||||
|
// FromGRPC converts a maps.MapResponse protobuf message to a Map domain object
|
||||||
|
func (m *Map) FromGRPC(resp *maps_extended.MapResponse) *Map {
|
||||||
|
if resp == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
m.ID = resp.ID
|
||||||
|
m.DisplayName = resp.DisplayName
|
||||||
|
m.Creator = resp.Creator
|
||||||
|
m.Date = time.Unix(resp.Date, 0)
|
||||||
|
m.GameID = resp.GameID
|
||||||
|
m.CreatedAt = time.Unix(resp.CreatedAt, 0)
|
||||||
|
m.UpdatedAt = time.Unix(resp.UpdatedAt, 0)
|
||||||
|
m.Submitter = resp.Submitter
|
||||||
|
m.Thumbnail = resp.Thumbnail
|
||||||
|
m.AssetVersion = resp.AssetVersion
|
||||||
|
m.LoadCount = resp.LoadCount
|
||||||
|
m.Modes = resp.Modes
|
||||||
|
|
||||||
|
return m
|
||||||
|
}
|
||||||
52
pkg/public_api/dto/response.go
Normal file
52
pkg/public_api/dto/response.go
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
package dto
|
||||||
|
|
||||||
|
// @Description Generic response
|
||||||
|
type Response[T any] struct {
|
||||||
|
// Data contains the actual response payload
|
||||||
|
Data T `json:"data"`
|
||||||
|
} // @name Response
|
||||||
|
|
||||||
|
type PagedTotalResponse[T any] struct {
|
||||||
|
// Data contains the actual response payload
|
||||||
|
Data []T `json:"data"`
|
||||||
|
|
||||||
|
// Pagination contains information about paging
|
||||||
|
Pagination PaginationWithTotal `json:"pagination"`
|
||||||
|
} // @name PagedTotalResponse
|
||||||
|
|
||||||
|
// PaginationWithTotal holds information about the current page, total items, etc.
|
||||||
|
type PaginationWithTotal struct {
|
||||||
|
// Current page number
|
||||||
|
Page int `json:"page"`
|
||||||
|
|
||||||
|
// Number of items per page
|
||||||
|
PageSize int `json:"page_size"`
|
||||||
|
|
||||||
|
// Total number of items across all pages
|
||||||
|
TotalItems int `json:"total_items"`
|
||||||
|
|
||||||
|
// Total number of pages
|
||||||
|
TotalPages int `json:"total_pages"`
|
||||||
|
} // @name PaginationWithTotal
|
||||||
|
|
||||||
|
type PagedResponse[T any] struct {
|
||||||
|
// Data contains the actual response payload
|
||||||
|
Data []T `json:"data"`
|
||||||
|
|
||||||
|
// Pagination contains information about paging
|
||||||
|
Pagination Pagination `json:"pagination"`
|
||||||
|
} // @name PagedResponse
|
||||||
|
|
||||||
|
// Pagination holds information about the current page.
|
||||||
|
type Pagination struct {
|
||||||
|
// Current page number
|
||||||
|
Page int `json:"page"`
|
||||||
|
|
||||||
|
// Number of items per page
|
||||||
|
PageSize int `json:"page_size"`
|
||||||
|
} // @name Pagination
|
||||||
|
|
||||||
|
// Error holds error responses
|
||||||
|
type Error struct {
|
||||||
|
Error string `json:"error"`
|
||||||
|
} // @name Error
|
||||||
98
pkg/public_api/handlers/handler.go
Normal file
98
pkg/public_api/handlers/handler.go
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
package handlers
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
"strconv"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
ErrMsgDataClient = "data client is required"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Handler is a base handler that provides common functionality for all HTTP handlers.
|
||||||
|
type Handler struct {
|
||||||
|
mapsClient *grpc.ClientConn
|
||||||
|
}
|
||||||
|
|
||||||
|
// HandlerOption defines a functional option for configuring a Handler
|
||||||
|
type HandlerOption func(*Handler)
|
||||||
|
|
||||||
|
// WithMapsClient sets the data client for the Handler
|
||||||
|
func WithMapsClient(mapsClient *grpc.ClientConn) HandlerOption {
|
||||||
|
return func(h *Handler) {
|
||||||
|
h.mapsClient = mapsClient
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewHandler creates a new Handler with the provided options.
|
||||||
|
// It requires both a datastore and an authentication service to function properly.
|
||||||
|
func NewHandler(options ...HandlerOption) (*Handler, error) {
|
||||||
|
handler := &Handler{}
|
||||||
|
|
||||||
|
// Apply all provided options
|
||||||
|
for _, option := range options {
|
||||||
|
option(handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate required dependencies
|
||||||
|
if err := handler.validateDependencies(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return handler, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// validateDependencies ensures all required dependencies are properly set
|
||||||
|
func (h *Handler) validateDependencies() error {
|
||||||
|
if h.mapsClient == nil {
|
||||||
|
return fmt.Errorf(ErrMsgDataClient)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// validateRange ensures a value is within the specified range, returning defaultValue if outside
|
||||||
|
func validateRange(value, min, max, defaultValue int) int {
|
||||||
|
if value < min {
|
||||||
|
return defaultValue
|
||||||
|
}
|
||||||
|
if value > max {
|
||||||
|
return max
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|
||||||
|
// validateMin ensures a value is at least the minimum, returning defaultValue if below
|
||||||
|
func validateMin(value, min, defaultValue int) int {
|
||||||
|
if value < min {
|
||||||
|
return defaultValue
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|
||||||
|
// getPagination extracts pagination parameters from query string.
|
||||||
|
// It applies validation rules to ensure parameters are within acceptable ranges.
|
||||||
|
func getPagination(ctx *gin.Context, defaultPageSize, minPageSize, maxPageSize int) (pageSize, pageNumber int) {
|
||||||
|
// Get page size from query string, parse to integer
|
||||||
|
pageSizeStr := ctx.Query("page_size")
|
||||||
|
if pageSizeStr != "" {
|
||||||
|
pageSize, _ = strconv.Atoi(pageSizeStr)
|
||||||
|
} else {
|
||||||
|
pageSize = defaultPageSize
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get page number from query string, parse to integer
|
||||||
|
pageNumberStr := ctx.Query("page_number")
|
||||||
|
if pageNumberStr != "" {
|
||||||
|
pageNumber, _ = strconv.Atoi(pageNumberStr)
|
||||||
|
} else {
|
||||||
|
pageNumber = 1 // Default to first page
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply validation rules
|
||||||
|
pageSize = validateRange(pageSize, minPageSize, maxPageSize, defaultPageSize)
|
||||||
|
pageNumber = validateMin(pageNumber, 1, 1)
|
||||||
|
|
||||||
|
return pageSize, pageNumber
|
||||||
|
}
|
||||||
153
pkg/public_api/handlers/maps.go
Normal file
153
pkg/public_api/handlers/maps.go
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
package handlers
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.itzana.me/strafesnet/go-grpc/maps_extended"
|
||||||
|
"git.itzana.me/strafesnet/maps-service/pkg/public_api/dto"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
"google.golang.org/grpc/codes"
|
||||||
|
"google.golang.org/grpc/status"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MapHandler handles HTTP requests related to maps.
|
||||||
|
type MapHandler struct {
|
||||||
|
*Handler
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewMapHandler creates a new MapHandler with the provided options.
|
||||||
|
func NewMapHandler(options ...HandlerOption) (*MapHandler, error) {
|
||||||
|
baseHandler, err := NewHandler(options...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &MapHandler{
|
||||||
|
Handler: baseHandler,
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Summary Get map by ID
|
||||||
|
// @Description Get a specific map by its ID
|
||||||
|
// @Tags maps
|
||||||
|
// @Produce json
|
||||||
|
// @Security ApiKeyAuth
|
||||||
|
// @Param id path int true "Map ID"
|
||||||
|
// @Success 200 {object} dto.Response[dto.Map]
|
||||||
|
// @Failure 404 {object} dto.Error "Map not found"
|
||||||
|
// @Failure default {object} dto.Error "General error response"
|
||||||
|
// @Router /map/{id} [get]
|
||||||
|
func (h *MapHandler) Get(ctx *gin.Context) {
|
||||||
|
// Extract map ID from path parameter
|
||||||
|
id := ctx.Param("id")
|
||||||
|
mapID, err := strconv.ParseInt(id, 10, 64)
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusBadRequest, dto.Error{
|
||||||
|
Error: "Invalid map ID format",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call the gRPC service
|
||||||
|
mapData, err := maps_extended.NewMapsServiceClient(h.mapsClient).Get(ctx, &maps_extended.MapId{
|
||||||
|
ID: mapID,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
statusCode := http.StatusInternalServerError
|
||||||
|
errorMessage := "Failed to get map"
|
||||||
|
|
||||||
|
// Check if it's a "not found" error
|
||||||
|
if status.Code(err) == codes.NotFound {
|
||||||
|
statusCode = http.StatusNotFound
|
||||||
|
errorMessage = "Map not found"
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.JSON(statusCode, dto.Error{
|
||||||
|
Error: errorMessage,
|
||||||
|
})
|
||||||
|
log.WithError(err).Error(
|
||||||
|
"Failed to get map",
|
||||||
|
)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert gRPC MapResponse object to dto.Map object
|
||||||
|
var mapDto dto.Map
|
||||||
|
result := mapDto.FromGRPC(mapData)
|
||||||
|
|
||||||
|
// Return the map data
|
||||||
|
ctx.JSON(http.StatusOK, dto.Response[dto.Map]{
|
||||||
|
Data: *result,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Summary List maps
|
||||||
|
// @Description Get a list of maps
|
||||||
|
// @Tags maps
|
||||||
|
// @Produce json
|
||||||
|
// @Security ApiKeyAuth
|
||||||
|
// @Param page_size query int false "Page size (max 100)" default(10) minimum(1) maximum(100)
|
||||||
|
// @Param page_number query int false "Page number" default(1) minimum(1)
|
||||||
|
// @Param filter query dto.MapFilter false "Map filter parameters"
|
||||||
|
// @Success 200 {object} dto.PagedResponse[dto.Map]
|
||||||
|
// @Failure default {object} dto.Error "General error response"
|
||||||
|
// @Router /map [get]
|
||||||
|
func (h *MapHandler) List(ctx *gin.Context) {
|
||||||
|
// Extract and constrain pagination parameters
|
||||||
|
query := struct {
|
||||||
|
PageSize int `form:"page_size,default=10" binding:"min=1,max=100"`
|
||||||
|
PageNumber int `form:"page_number,default=1" binding:"min=1"`
|
||||||
|
SortBy int `form:"sort_by,default=0" binding:"min=0,max=3"`
|
||||||
|
}{}
|
||||||
|
if err := ctx.ShouldBindQuery(&query); err != nil {
|
||||||
|
ctx.JSON(http.StatusBadRequest, dto.Error{
|
||||||
|
Error: err.Error(),
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get list filter
|
||||||
|
var filter dto.MapFilter
|
||||||
|
if err := ctx.ShouldBindQuery(&filter); err != nil {
|
||||||
|
ctx.JSON(http.StatusBadRequest, dto.Error{
|
||||||
|
Error: err.Error(),
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call the gRPC service
|
||||||
|
mapList, err := maps_extended.NewMapsServiceClient(h.mapsClient).List(ctx, &maps_extended.ListRequest{
|
||||||
|
Filter: &maps_extended.MapFilter{
|
||||||
|
GameID: filter.GameID,
|
||||||
|
},
|
||||||
|
Page: &maps_extended.Pagination{
|
||||||
|
Size: uint32(query.PageSize),
|
||||||
|
Number: uint32(query.PageNumber),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ctx.JSON(http.StatusInternalServerError, dto.Error{
|
||||||
|
Error: "Failed to list maps",
|
||||||
|
})
|
||||||
|
log.WithError(err).Error(
|
||||||
|
"Failed to list maps",
|
||||||
|
)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert gRPC MapResponse objects to dto.Map objects
|
||||||
|
dtoMaps := make([]dto.Map, len(mapList.Maps))
|
||||||
|
for i, m := range mapList.Maps {
|
||||||
|
var mapDto dto.Map
|
||||||
|
dtoMaps[i] = *mapDto.FromGRPC(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return the paged response
|
||||||
|
ctx.JSON(http.StatusOK, dto.PagedResponse[dto.Map]{
|
||||||
|
Data: dtoMaps,
|
||||||
|
Pagination: dto.Pagination{
|
||||||
|
Page: query.PageNumber,
|
||||||
|
PageSize: query.PageSize,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
159
pkg/public_api/router.go
Normal file
159
pkg/public_api/router.go
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"git.itzana.me/StrafesNET/dev-service/pkg/api/middleware"
|
||||||
|
"git.itzana.me/strafesnet/maps-service/docs"
|
||||||
|
"git.itzana.me/strafesnet/maps-service/pkg/public_api/handlers"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
swaggerfiles "github.com/swaggo/files"
|
||||||
|
ginSwagger "github.com/swaggo/gin-swagger"
|
||||||
|
"github.com/urfave/cli/v2"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
"net/http"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Option defines a function that configures a Router
|
||||||
|
type Option func(*RouterConfig)
|
||||||
|
|
||||||
|
// RouterConfig holds all router configuration
|
||||||
|
type RouterConfig struct {
|
||||||
|
port int
|
||||||
|
devClient *grpc.ClientConn
|
||||||
|
mapsClient *grpc.ClientConn
|
||||||
|
context *cli.Context
|
||||||
|
shutdownTimeout time.Duration
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithPort sets the port for the server£
|
||||||
|
func WithPort(port int) Option {
|
||||||
|
return func(cfg *RouterConfig) {
|
||||||
|
cfg.port = port
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithContext sets the context for the server
|
||||||
|
func WithContext(ctx *cli.Context) Option {
|
||||||
|
return func(cfg *RouterConfig) {
|
||||||
|
cfg.context = ctx
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithDevClient sets the dev gRPC client
|
||||||
|
func WithDevClient(conn *grpc.ClientConn) Option {
|
||||||
|
return func(cfg *RouterConfig) {
|
||||||
|
cfg.devClient = conn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithMapsClient sets the data gRPC client
|
||||||
|
func WithMapsClient(conn *grpc.ClientConn) Option {
|
||||||
|
return func(cfg *RouterConfig) {
|
||||||
|
cfg.mapsClient = conn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithShutdownTimeout sets the graceful shutdown timeout
|
||||||
|
func WithShutdownTimeout(timeout time.Duration) Option {
|
||||||
|
return func(cfg *RouterConfig) {
|
||||||
|
cfg.shutdownTimeout = timeout
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func setupRoutes(cfg *RouterConfig) (*gin.Engine, error) {
|
||||||
|
r := gin.Default()
|
||||||
|
r.ForwardedByClientIP = true
|
||||||
|
r.Use(gin.Logger())
|
||||||
|
r.Use(gin.Recovery())
|
||||||
|
|
||||||
|
handlerOptions := []handlers.HandlerOption{
|
||||||
|
handlers.WithMapsClient(cfg.mapsClient),
|
||||||
|
}
|
||||||
|
|
||||||
|
// Maps handler
|
||||||
|
mapsHandler, err := handlers.NewMapHandler(handlerOptions...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
docs.SwaggerInfo.BasePath = "/public-api/v1"
|
||||||
|
public_api := r.Group("/public-api")
|
||||||
|
{
|
||||||
|
v1 := public_api.Group("/v1")
|
||||||
|
{
|
||||||
|
// Auth middleware
|
||||||
|
v1.Use(middleware.ValidateRequest("Maps", "Read", cfg.devClient))
|
||||||
|
|
||||||
|
// Maps
|
||||||
|
v1.GET("/map", mapsHandler.List)
|
||||||
|
v1.GET("/map/:id", mapsHandler.Get)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Docs
|
||||||
|
public_api.GET("/docs/*any", ginSwagger.WrapHandler(swaggerfiles.Handler))
|
||||||
|
public_api.GET("/", func(ctx *gin.Context) {
|
||||||
|
ctx.Redirect(http.StatusPermanentRedirect, "/docs/index.html")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return r, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRouter creates a new router with the given options
|
||||||
|
func NewRouter(options ...Option) error {
|
||||||
|
// Default configuration
|
||||||
|
cfg := &RouterConfig{
|
||||||
|
port: 8080, // Default port
|
||||||
|
context: nil,
|
||||||
|
shutdownTimeout: 5 * time.Second,
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply options
|
||||||
|
for _, option := range options {
|
||||||
|
option(cfg)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate configuration
|
||||||
|
if cfg.context == nil {
|
||||||
|
return errors.New("context is required")
|
||||||
|
}
|
||||||
|
|
||||||
|
if cfg.devClient == nil {
|
||||||
|
return errors.New("dev client is required")
|
||||||
|
}
|
||||||
|
|
||||||
|
routes, err := setupRoutes(cfg)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Info("Starting server")
|
||||||
|
|
||||||
|
return runServer(cfg.context.Context, fmt.Sprint(":", cfg.port), routes, cfg.shutdownTimeout)
|
||||||
|
}
|
||||||
|
|
||||||
|
func runServer(ctx context.Context, addr string, r *gin.Engine, shutdownTimeout time.Duration) error {
|
||||||
|
srv := &http.Server{
|
||||||
|
Addr: addr,
|
||||||
|
Handler: r,
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run the server in a separate goroutine
|
||||||
|
go func() {
|
||||||
|
if err := srv.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
|
||||||
|
log.WithError(err).Fatal("web server exit")
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
// Wait for a shutdown signal
|
||||||
|
<-ctx.Done()
|
||||||
|
|
||||||
|
// Shutdown server gracefully
|
||||||
|
ctxShutdown, cancel := context.WithTimeout(context.Background(), shutdownTimeout)
|
||||||
|
defer cancel()
|
||||||
|
return srv.Shutdown(ctxShutdown)
|
||||||
|
}
|
||||||
@@ -2,7 +2,6 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"time"
|
|
||||||
|
|
||||||
"git.itzana.me/strafesnet/go-grpc/maps"
|
"git.itzana.me/strafesnet/go-grpc/maps"
|
||||||
"git.itzana.me/strafesnet/maps-service/pkg/datastore"
|
"git.itzana.me/strafesnet/maps-service/pkg/datastore"
|
||||||
@@ -47,16 +46,12 @@ func (update MapUpdate) GetDisplayName() (string, bool) {
|
|||||||
value, ok := datastore.OptionalMap(update).Map()["display_name"].(string)
|
value, ok := datastore.OptionalMap(update).Map()["display_name"].(string)
|
||||||
return value, ok
|
return value, ok
|
||||||
}
|
}
|
||||||
func (update MapUpdate) GetCreator() (string, bool) {
|
|
||||||
value, ok := datastore.OptionalMap(update).Map()["creator"].(string)
|
|
||||||
return value, ok
|
|
||||||
}
|
|
||||||
func (update MapUpdate) GetGameID() (uint32, bool) {
|
func (update MapUpdate) GetGameID() (uint32, bool) {
|
||||||
value, ok := datastore.OptionalMap(update).Map()["game_id"].(uint32)
|
value, ok := datastore.OptionalMap(update).Map()["game_id"].(uint32)
|
||||||
return value, ok
|
return value, ok
|
||||||
}
|
}
|
||||||
func (update MapUpdate) GetDate() (int64, bool) {
|
func (update MapUpdate) GetThumbnail() (uint64, bool) {
|
||||||
value, ok := datastore.OptionalMap(update).Map()["date"].(int64)
|
value, ok := datastore.OptionalMap(update).Map()["thumbnail"].(uint64)
|
||||||
return value, ok
|
return value, ok
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,35 +76,6 @@ func (update MapFilter) SetSubmitter(submitter uint64) {
|
|||||||
datastore.OptionalMap(update).Add("submitter", submitter)
|
datastore.OptionalMap(update).Add("submitter", submitter)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (svc *Service) TEMP_DoMapsMigration(ctx context.Context) (error) {
|
|
||||||
// get all maps
|
|
||||||
maps, err := svc.maps.List(ctx, &maps.ListRequest{})
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
// create all maps
|
|
||||||
for _, item := range maps.Maps {
|
|
||||||
migrated := model.Map{
|
|
||||||
ID: item.ID,
|
|
||||||
DisplayName: item.DisplayName,
|
|
||||||
Creator: item.Creator,
|
|
||||||
GameID: uint32(item.GameID),
|
|
||||||
Date: time.Unix(item.Date, 0),
|
|
||||||
// CreatedAt: time.Time{},
|
|
||||||
// UpdatedAt: time.Time{},
|
|
||||||
// Submitter: 0,
|
|
||||||
// Thumbnail: 0,
|
|
||||||
// AssetVersion: 0,
|
|
||||||
// LoadCount: 0,
|
|
||||||
// Modes: 0,
|
|
||||||
}
|
|
||||||
_, err := svc.db.Maps().Create(ctx, migrated)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (svc *Service) CreateMap(ctx context.Context, item model.Map) (int64, error) {
|
func (svc *Service) CreateMap(ctx context.Context, item model.Map) (int64, error) {
|
||||||
// 2 jobs:
|
// 2 jobs:
|
||||||
// create map on maps-service
|
// create map on maps-service
|
||||||
@@ -118,14 +84,12 @@ func (svc *Service) CreateMap(ctx context.Context, item model.Map) (int64, error
|
|||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
// create map on data-service
|
// create map on data-service
|
||||||
date := item.Date.Unix()
|
|
||||||
game_id := int32(item.GameID)
|
game_id := int32(item.GameID)
|
||||||
_, err = svc.maps.Create(ctx, &maps.MapRequest{
|
_, err = svc.maps.Create(ctx, &maps.MapRequest{
|
||||||
ID: item.ID,
|
ID: item.ID,
|
||||||
DisplayName: &item.DisplayName,
|
DisplayName: &item.DisplayName,
|
||||||
Creator: &item.Creator,
|
|
||||||
GameID: &game_id,
|
GameID: &game_id,
|
||||||
Date: &date,
|
Thumbnail: &item.Thumbnail,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
@@ -166,15 +130,12 @@ func (svc *Service) UpdateMap(ctx context.Context, id int64, pmap MapUpdate) err
|
|||||||
if display_name, ok := pmap.GetDisplayName(); ok {
|
if display_name, ok := pmap.GetDisplayName(); ok {
|
||||||
update.DisplayName = &display_name
|
update.DisplayName = &display_name
|
||||||
}
|
}
|
||||||
if creator, ok := pmap.GetCreator(); ok {
|
|
||||||
update.Creator = &creator
|
|
||||||
}
|
|
||||||
if game_id, ok := pmap.GetGameID(); ok {
|
if game_id, ok := pmap.GetGameID(); ok {
|
||||||
game_id_int32 := int32(game_id)
|
game_id_int32 := int32(game_id)
|
||||||
update.GameID = &game_id_int32
|
update.GameID = &game_id_int32
|
||||||
}
|
}
|
||||||
if date, ok := pmap.GetDate(); ok {
|
if thumbnail, ok := pmap.GetThumbnail(); ok {
|
||||||
update.Date = &date
|
update.Thumbnail = &thumbnail
|
||||||
}
|
}
|
||||||
_, err = svc.maps.Update(ctx, &update)
|
_, err = svc.maps.Update(ctx, &update)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -9,29 +9,6 @@ import (
|
|||||||
"git.itzana.me/strafesnet/maps-service/pkg/service"
|
"git.itzana.me/strafesnet/maps-service/pkg/service"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MigrateMaps implements migrateMaps operation.
|
|
||||||
//
|
|
||||||
// Perform maps migration.
|
|
||||||
//
|
|
||||||
// POST /migrate
|
|
||||||
func (svc *Service) MigrateMaps(ctx context.Context) (error) {
|
|
||||||
userInfo, ok := ctx.Value("UserInfo").(UserInfoHandle)
|
|
||||||
if !ok {
|
|
||||||
return ErrUserInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
has_role, err := userInfo.HasRoleSubmissionRelease()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if !has_role {
|
|
||||||
return ErrPermissionDeniedNeedRoleSubmissionRelease
|
|
||||||
}
|
|
||||||
|
|
||||||
return svc.inner.TEMP_DoMapsMigration(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListMaps implements listMaps operation.
|
// ListMaps implements listMaps operation.
|
||||||
//
|
//
|
||||||
// Get list of maps.
|
// Get list of maps.
|
||||||
@@ -69,6 +46,13 @@ func (svc *Service) ListMaps(ctx context.Context, params api.ListMapsParams) ([]
|
|||||||
Creator: item.Creator,
|
Creator: item.Creator,
|
||||||
GameID: int32(item.GameID),
|
GameID: int32(item.GameID),
|
||||||
Date: item.Date.Unix(),
|
Date: item.Date.Unix(),
|
||||||
|
CreatedAt: item.CreatedAt.Unix(),
|
||||||
|
UpdatedAt: item.UpdatedAt.Unix(),
|
||||||
|
Submitter: item.Submitter,
|
||||||
|
Thumbnail: item.Thumbnail,
|
||||||
|
AssetVersion: item.AssetVersion,
|
||||||
|
LoadCount: item.LoadCount,
|
||||||
|
Modes: item.Modes,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,6 +76,13 @@ func (svc *Service) GetMap(ctx context.Context, params api.GetMapParams) (*api.M
|
|||||||
Creator: mapResponse.Creator,
|
Creator: mapResponse.Creator,
|
||||||
GameID: int32(mapResponse.GameID),
|
GameID: int32(mapResponse.GameID),
|
||||||
Date: mapResponse.Date.Unix(),
|
Date: mapResponse.Date.Unix(),
|
||||||
|
CreatedAt: mapResponse.CreatedAt.Unix(),
|
||||||
|
UpdatedAt: mapResponse.UpdatedAt.Unix(),
|
||||||
|
Submitter: mapResponse.Submitter,
|
||||||
|
Thumbnail: mapResponse.Thumbnail,
|
||||||
|
AssetVersion: mapResponse.AssetVersion,
|
||||||
|
LoadCount: mapResponse.LoadCount,
|
||||||
|
Modes: mapResponse.Modes,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ edition = "2024"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
async-nats = "0.42.0"
|
async-nats = "0.42.0"
|
||||||
futures = "0.3.31"
|
futures = "0.3.31"
|
||||||
rbx_asset = { version = "0.4.7", registry = "strafesnet" }
|
rbx_asset = { version = "0.4.9", features = ["gzip", "rustls-tls"], default-features = false, registry = "strafesnet" }
|
||||||
rbx_binary = "1.0.0"
|
rbx_binary = "1.0.0"
|
||||||
rbx_dom_weak = "3.0.0"
|
rbx_dom_weak = "3.0.0"
|
||||||
rbx_reflection_database = "1.0.3"
|
rbx_reflection_database = "1.0.3"
|
||||||
|
|||||||
@@ -1,24 +1,3 @@
|
|||||||
# Using the `rust-musl-builder` as base image, instead of
|
FROM alpine:3.21 AS runtime
|
||||||
# the official Rust toolchain
|
COPY /target/x86_64-unknown-linux-musl/release/maps-validation /
|
||||||
FROM registry.itzana.me/docker-proxy/clux/muslrust:1.86.0-stable AS chef
|
ENTRYPOINT ["/maps-validation"]
|
||||||
USER root
|
|
||||||
RUN cargo install cargo-chef
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
FROM chef AS planner
|
|
||||||
COPY . .
|
|
||||||
RUN cargo chef prepare --recipe-path recipe.json
|
|
||||||
|
|
||||||
FROM chef AS builder
|
|
||||||
COPY --from=planner /app/recipe.json recipe.json
|
|
||||||
COPY api ./api
|
|
||||||
# Notice that we are specifying the --target flag!
|
|
||||||
RUN cargo chef cook --release --target x86_64-unknown-linux-musl --recipe-path recipe.json
|
|
||||||
COPY . .
|
|
||||||
RUN cargo build --release --target x86_64-unknown-linux-musl --bin maps-validation
|
|
||||||
|
|
||||||
FROM registry.itzana.me/docker-proxy/alpine:3.21 AS runtime
|
|
||||||
RUN addgroup -S myuser && adduser -S myuser -G myuser
|
|
||||||
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/maps-validation /usr/local/bin/
|
|
||||||
USER myuser
|
|
||||||
ENTRYPOINT ["/usr/local/bin/maps-validation"]
|
|
||||||
|
|||||||
@@ -12,7 +12,11 @@ authors = ["Rhys Lloyd <krakow20@gmail.com>"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = { version = "0.4.41", features = ["serde"] }
|
chrono = { version = "0.4.41", features = ["serde"] }
|
||||||
reqwest = { version = "0", features = ["json"] }
|
reqwest = { version = "0", features = [
|
||||||
|
"json", "rustls-tls",
|
||||||
|
# default features
|
||||||
|
"charset", "http2", "system-proxy"
|
||||||
|
], default-features = false }
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
serde_repr = "0.1.19"
|
serde_repr = "0.1.19"
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"@emotion/styled": "^11.14.0",
|
"@emotion/styled": "^11.14.0",
|
||||||
"@mui/icons-material": "^6.1.10",
|
"@mui/icons-material": "^6.1.10",
|
||||||
"@mui/material": "^6.1.10",
|
"@mui/material": "^6.1.10",
|
||||||
|
"date-fns": "^4.1.0",
|
||||||
"next": "^15.1.0",
|
"next": "^15.1.0",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"react-dom": "^19.0.0",
|
"react-dom": "^19.0.0",
|
||||||
@@ -393,6 +394,8 @@
|
|||||||
|
|
||||||
"data-view-byte-offset": ["data-view-byte-offset@1.0.1", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" } }, "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ=="],
|
"data-view-byte-offset": ["data-view-byte-offset@1.0.1", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" } }, "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ=="],
|
||||||
|
|
||||||
|
"date-fns": ["date-fns@4.1.0", "", {}, "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg=="],
|
||||||
|
|
||||||
"debug": ["debug@4.4.0", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA=="],
|
"debug": ["debug@4.4.0", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA=="],
|
||||||
|
|
||||||
"deep-is": ["deep-is@0.1.4", "", {}, "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="],
|
"deep-is": ["deep-is@0.1.4", "", {}, "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="],
|
||||||
|
|||||||
Reference in New Issue
Block a user