From e062a10bccb78f28c660b33ef288c1566b89de2e Mon Sep 17 00:00:00 2001 From: Atomys Date: Sun, 20 Oct 2024 17:34:20 +0200 Subject: [PATCH 1/8] chore: refacto devcontainer --- .devcontainer/.zshrc | 10 -- .devcontainer/Dockerfile | 63 ++------- .devcontainer/devcontainer.json | 177 +++++++++--------------- .devcontainer/docker-compose.yaml | 5 - .devcontainer/postCreateCommand.sh | 7 +- .github/workflows/linters.yaml | 4 +- .github/workflows/tests.yaml | 4 +- .vscode/tasks.json | 2 +- README.md | 2 +- Taskfile.yml | 38 +++++ build/Dockerfile | 7 +- build/Makefile | 28 ---- cmd/api.go | 10 +- cmd/auth.go | 4 +- cmd/campus.go | 8 +- cmd/exportdata.go | 6 +- cmd/locations.go | 12 +- cmd/reindexusers.go | 6 +- cmd/root.go | 4 +- cmd/webhooks.go | 4 +- generate.go | 4 +- go.mod | 44 +++--- go.sum | 107 +++++++------- gqlgen.yml | 21 +-- internal/api/account_callbacks.go | 10 +- internal/api/api.resolvers.go | 36 ++--- internal/api/authentication.go | 4 +- internal/api/authz_by_policy.go | 2 +- internal/api/resolver.go | 6 +- internal/models/client.go | 6 +- internal/models/schema/account.go | 2 +- internal/models/schema/follow_groups.go | 4 +- internal/models/schema/location.go | 9 ++ internal/models/schema/notice.go | 2 +- internal/models/schema/user.go | 4 +- internal/models/utils.go | 6 +- internal/webhooks/campus_user.go | 8 +- internal/webhooks/location.go | 12 +- internal/webhooks/serve.go | 16 +-- internal/webhooks/user.go | 6 +- main.go | 2 +- tools/seeds/main.go | 2 +- tools/seeds/seed_user.go | 2 +- 43 files changed, 321 insertions(+), 395 deletions(-) delete mode 100644 .devcontainer/.zshrc create mode 100644 Taskfile.yml delete mode 100644 build/Makefile diff --git a/.devcontainer/.zshrc b/.devcontainer/.zshrc deleted file mode 100644 index 7820e30c..00000000 --- a/.devcontainer/.zshrc +++ /dev/null @@ -1,10 +0,0 @@ -export ZSH=$HOME/.oh-my-zsh - -ZSH_THEME="agnoster" - -plugins=(git zsh-history-substring-search zsh-syntax-highlighting zsh-autosuggestions ) - -source $ZSH/oh-my-zsh.sh - -DISABLE_AUTO_UPDATE=true -DISABLE_UPDATE_PROMPT=true diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 849237d2..86fd74b6 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,59 +1,12 @@ -# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.18, 1.17, 1-bullseye, 1.18-bullseye, 1.17-bullseye, 1-buster, 1.18-buster, 1.17-buster -ARG VARIANT=1-bullseye -FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT} +FROM mcr.microsoft.com/devcontainers/base -ENV TERM xterm -ENV SHELL /usr/bin/zsh +# Avoid warnings by switching to noninteractive +ENV DEBIAN_FRONTEND=noninteractive \ + TERM=xterm -# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 -ARG NODE_VERSION="18" -RUN if [ "${NODE_VERSION}" != "none" ]; then umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1; fi +RUN apt-get update \ + && apt-get -y install --no-install-recommends wget \ + && wget -O /usr/local/bin/rabbitmqadmin https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/v3.7.8/bin/rabbitmqadmin \ + && chmod +x /usr/local/bin/rabbitmqadmin -RUN ARCH=$([ "`uname -m`" = "aarch64" ] && echo "arm64" || echo "amd64") && \ - apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends gnupg2 postgresql-client \ - iputils-ping dnsutils vim htop nano sudo curl build-essential zsh wget jq \ - fonts-powerline tig ca-certificates software-properties-common redis-tools && \ - # Install kubectl from binaries - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl" && \ - install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \ - kubectl version --client && \ - # Install helm from binaries - curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash && \ - # Install terraform from binaries - # See: https://github.com/42Atomys/stud42/issues/298 - # if $(uname -m) == "aarch64" set TERRAFORM_ARCH to "arm64" in shell format - wget --no-verbose --show-progress --progress=dot:mega -O /tmp/terraform.zip "https://releases.hashicorp.com/terraform/1.3.6/terraform_1.3.6_linux_${ARCH}.zip" && \ - unzip /tmp/terraform.zip -d /usr/local/bin/ && \ - # Install minio mc - wget --no-verbose --show-progress --progress=dot:mega "https://dl.min.io/client/mc/release/linux-${ARCH}/mc" && \ - install -m 755 mc /usr/local/bin/mc && \ - # Install kubeseal - KUBESEAL_VERSION=$(curl -s https://api.github.com/repos/bitnami-labs/sealed-secrets/tags | jq -r '.[0].name' | cut -c 2-) && \ - if [ -z "$KUBESEAL_VERSION" ]; then \ - echo "Failed to fetch the latest KUBESEAL_VERSION"; \ - exit 1; \ - fi && \ - wget --no-verbose --show-progress --progress=dot:mega "https://github.com/bitnami-labs/sealed-secrets/releases/download/v${KUBESEAL_VERSION}/kubeseal-${KUBESEAL_VERSION}-linux-${ARCH}.tar.gz" && \ - tar -xvzf kubeseal-${KUBESEAL_VERSION}-linux-amd64.tar.gz kubeseal && \ - install -m 755 kubeseal /usr/local/bin/kubeseal - -# Install global node packages. -RUN npm install --location=global tslint-to-eslint-config typescript \ - @commitlint/cli @commitlint/config-conventional && \ - # Workarround due toyarn dont have permission to write on node_modules - ln -s "$NVM_DIR/versions/node/$(nvm version)/bin/node" "/usr/local/bin/node" && \ - ln -s "$NVM_DIR/versions/node/$(nvm version)/bin/npm" "/usr/local/bin/npm" && \ - # Install oh my zsh - wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true && \ - git clone https://github.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-/root/.oh-my-zsh}/plugins/zsh-history-substring-search && \ - git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-/root/.oh-my-zsh}/plugins/zsh-autosuggestions && \ - git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-/root/.oh-my-zsh}/plugins/zsh-syntax-highlighting - -# Pre-download the golang part WORKDIR /workspace -COPY go.mod go.sum ./ - -RUN go mod download - -COPY .devcontainer/.zshrc /root/.zshrc diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 97f6a6f2..6e1bf71a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,122 +1,50 @@ { "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json", - "name": "s42.app", + "name": "S42 App", "dockerComposeFile": "docker-compose.yaml", "service": "workspace", "workspaceFolder": "/workspace", "shutdownAction": "stopCompose", "waitFor": "postStartCommand", "userEnvProbe": "loginInteractiveShell", - // Configure tool-specific properties. - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Set *default* container specific settings.json values on container create. - "settings": { - "go.toolsManagement.checkForUpdates": "local", - "go.useLanguageServer": true, - "go.gopath": "/go", - "go.autocompleteUnimportedPackages": true, - "go.coverMode": "atomic", - "go.coverOnSave": true, - "go.disableConcurrentTests": true, - "editor.formatOnSave": true, - "go.lintTool": "golangci-lint", - "terminal.integrated.fontFamily": "'DejaVu Sans Mono for Powerline', monospace", - "terminal.integrated.defaultProfile.linux": "zsh", - "terminal.integrated.defaultProfile.osx": "zsh", - "editor.tabSize": 2, - "editor.renderWhitespace": "all", - "gopls": { - "ui.completion.usePlaceholders": true, - // Experimental settings - "completeUnimported": true, // autocomplete unimported packages - "deepCompletion": true, // enable deep completion - "staticcheck": true - }, - "editor.codeActionsOnSave": { - "source.organizeImports": "explicit", - "source.fixAll": "explicit" - }, - "editor.bracketPairColorization.enabled": true, - "editor.guides.bracketPairs": "active", - "editor.suggestSelection": "first", - "git.autofetch": true, - "typescript.updateImportsOnFileMove.enabled": "always", - "files.autoGuessEncoding": true, - "files.encoding": "utf8", - "workbench.editor.decorations.badges": true, - "workbench.editor.decorations.colors": true, - "go.delveConfig": { - "apiVersion": 2, - "showGlobalVariables": false - }, - "editor.inlineSuggest.enabled": true, - "editor.rulers": [80, 120], - "jest.jestCommandLine": "yarn test", - "jest.runMode": { - "runAllTestsOnStartup": false, - "type": "on-demand", - "showInlineError": true, - "coverage": true - }, - "jest.outputConfig": { - "revealOn": "error", - "clearOnRun": "none", - "revealWithFocus": "none" - }, - "eslint.workingDirectories": [ - { - "directory": "web/ui" - } - ], - "search.useGlobalIgnoreFiles": true, - "search.useParentIgnoreFiles": true, - "workbench.productIconTheme": "fluent-icons", - "[yaml]": { - "editor.defaultFormatter": "redhat.vscode-yaml" - }, - "[markdown]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[typescript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - } - }, - - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "golang.Go", - "aaron-bond.better-comments", - "IBM.output-colorizer", - "miguelsolorio.fluent-icons", - "jasonnutter.vscode-codeowners", - "ms-azuretools.vscode-docker", - "ms-kubernetes-tools.vscode-kubernetes-tools", - "cschleiden.vscode-github-actions", - "eamodio.gitlens", - "jinliming2.vscode-go-template", - "graphql.vscode-graphql", - "yzhang.markdown-all-in-one", - "bierner.markdown-mermaid", - "quicktype.quicktype", - "esbenp.prettier-vscode", - "bradlc.vscode-tailwindcss", - "redhat.vscode-yaml", - "hashicorp.terraform", - "orta.vscode-jest", - "ms-vscode.makefile-tools" - ] - } + "features": { + "ghcr.io/devcontainers/features/git:1": {}, + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": true, + "configureZshAsDefaultShell": true, + "installOhMyZsh": true, + "username": "vscode" + }, + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/devcontainers/features/python:1": {}, + "ghcr.io/devcontainers/features/node:1": { + "version": "18" + }, + "ghcr.io/devcontainers/features/go:1": { + "version": "1.23.2", + "golangciLintVersion": "1.61.0" + }, + "ghcr.io/devcontainers-community/npm-features/typescript:1": {}, + "ghcr.io/devcontainers-community/npm-features/prettier:1": {}, + "ghcr.io/itsmechlark/features/postgresql:1": { + "version": "14" + }, + "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": { + "version": "1.26.0", + "helm": "latest" + }, + "ghcr.io/devcontainers/features/terraform:1": { + "version": "latest" + }, + "ghcr.io/ChristopherMacGown/devcontainer-features/minio-client:1": {}, + "ghcr.io/gickis/devcontainer-features/kubeseal:1": { + "version": "0.27.1" + }, + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": ["gnupg2,iputils-ping,dnsutils,vim,htop,sudo,curl,build-essential,wget,jq,fonts-powerline,tig,ca-certificates,software-properties-common,redis-tools"] + }, + "ghcr.io/devcontainers-contrib/features/go-task:1": {} }, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. "forwardPorts": [ 3000, // web-ui port 4000, // api port @@ -126,11 +54,6 @@ "minio:9000", // the minio port "rabbitmq:15672" // the rabbitmq management ui port ], - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "/workspace/.devcontainer/postCreateCommand.sh", - "postStartCommand": "/workspace/.devcontainer/postStartCommand.sh", - "containerUser": "root", - "remoteUser": "root", "portsAttributes": { "3000": { "label": "Interface" @@ -153,5 +76,29 @@ "15672": { "label": "RabbitMQ Management UI" } + }, + "postCreateCommand": "bash .devcontainer/postCreateCommand.sh", + "postStartCommand": "bash .devcontainer/postStartCommand.sh", + "containerUser": "root", + "remoteUser": "root", + "customizations": { + "vscode": { + "extensions": [ + "golang.Go", + "aaron-bond.better-comments", + "miguelsolorio.fluent-icons", + "jasonnutter.vscode-codeowners", + "jinliming2.vscode-go-template", + "graphql.vscode-graphql", + "yzhang.markdown-all-in-one", + "bierner.markdown-mermaid", + "quicktype.quicktype", + "esbenp.prettier-vscode", + "bradlc.vscode-tailwindcss", + "redhat.vscode-yaml", + "hashicorp.terraform", + "orta.vscode-jest" + ] + } } } diff --git a/.devcontainer/docker-compose.yaml b/.devcontainer/docker-compose.yaml index a2a15449..7cb9e59d 100644 --- a/.devcontainer/docker-compose.yaml +++ b/.devcontainer/docker-compose.yaml @@ -6,10 +6,6 @@ services: build: context: .. dockerfile: .devcontainer/Dockerfile - args: - VARIANT: '1.20' - # Optional Node.js version to install - NODE_VERSION: "lts/*" tty: true environment: # Cross service @@ -33,7 +29,6 @@ services: NEXTAUTH_URL: http://localhost:3000 NEXTAUTH_SECRET: private-secret-for-dev-only volumes: - - ./.zshrc:/root/.zshrc:cached - ..:/workspace:cached # Overrides default command so things don't shut down after the process ends. diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index aca36f5c..17281f91 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -29,7 +29,9 @@ git update-index --assume-unchanged .devcontainer/.env # https://github.com/microsoft/vscode/issues/133215 git config oh-my-zsh.hide-info 1 -make -f build/Makefile devcontainer-init +make -f build/Makefile generate certs + +cp config/stud42.example.yaml config/stud42.yaml # Configure RabbitMQ ./bin/rabbitmqadmin --host rabbitmq --user rabbitmq --password rabbitmq declare exchange name="webhooks" type="direct" @@ -44,3 +46,6 @@ make -f build/Makefile devcontainer-init mc alias set s3 http://minio:9000 $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY mc mb s3/s42-users --ignore-existing --region europe-west1 mc mb s3/s42-exports --ignore-existing --region europe-west1 + +yarn --cwd web/ui install +yarn --cwd web/ui generate diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 78d3e029..7a3b1323 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -31,8 +31,10 @@ jobs: with: go-version: "1.20" check-latest: true + - name: Install Task + uses: arduino/setup-task@v2 - name: Generate code - run: make -f build/Makefile generate + run: task generate - name: golangci-lint uses: golangci/golangci-lint-action@v6.1.0 with: diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 780935b5..dd2490c6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -131,8 +131,10 @@ jobs: with: go-version: "1.20" check-latest: true + - name: Install Task + uses: arduino/setup-task@v2 - name: Generate code - run: make -f build/Makefile generate + run: task generate - name: Run Unit tests run: | go test ./... -coverprofile coverage.out -covermode count diff --git a/.vscode/tasks.json b/.vscode/tasks.json index f03bc287..3790b0b0 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -3,7 +3,7 @@ "tasks": [ { "type": "shell", - "command": "make -f build/Makefile generate", + "command": "task generate", "problemMatcher": ["$go"], "label": "Generate API code", "detail": "Generate code on API", diff --git a/README.md b/README.md index 3a403027..bc711fe6 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ GitHub contributors GitHub Repo stars GitHub Repo sponsors -Go Reference

+Go Reference

This project is the direct continuation of the stud42.fr project. When @42Atomys (aka. Atom) created stud42, he announced that the project would be open source when he left 42 staff.

diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 00000000..3d231072 --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,38 @@ +# https://taskfile.dev + +version: '3' + +vars: + GREETING: Hello, World! + +tasks: + generate: + desc: Generate backend code based on api/*.graphql files and schemas + aliases: [g, gen] + cmds: + - go generate generate.go + build: + desc: Build the application cli for production use + env: + CGO_ENABLED: '0' + GOARCH: amd64 + GOOS: linux + cmds: + - go build -o stud42cli + clean: + desc: Clean up generated code + cmds: + - rm -rf internal/api/generated + - rm -rf internal/models/generated + tests: + desc: Run backend tests + aliases: [t, test] + cmds: + - go test ./... + certs: + desc: Generate certificates for the auth service to use + cmds: + - mkdir -p certs + - openssl genrsa -out certs/private.key 8192 + - openssl rsa -in certs/private.key -out certs/public.pem -pubout -outform PEM + diff --git a/build/Dockerfile b/build/Dockerfile index fed62437..21c25781 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -8,8 +8,9 @@ ARG APP_VERSION ENV APP_VERSION=$APP_VERSION RUN apt-get update && \ - apt-get install -y unzip jq && \ - make -f build/Makefile generate build + apt-get install -y unzip jq curl && \ + sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d && \ + task generate build # INTERFACE BUILD - DEPS FROM node:18 AS node-deps @@ -54,4 +55,4 @@ COPY --from=node-builder /build/web/ui/.next/standalone ./ COPY --from=go-build /build/stud42cli /usr/local/bin/stud42cli -CMD ["stud42cli"] \ No newline at end of file +CMD ["stud42cli"] diff --git a/build/Makefile b/build/Makefile deleted file mode 100644 index 3c86b351..00000000 --- a/build/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# This makefile MUST be run from the root of the repository. -# You can do this by running: -# make -f build/Makefile [action] - -generate: - go generate generate.go - -build: - CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o stud42cli - -clean: - rm -rf internal/api/generated - rm -rf internal/models/generated - -regenerate: clean generate - -certs: - mkdir -p certs - openssl genrsa -out certs/private.key 8192 - openssl rsa -in certs/private.key -out certs/public.pem -pubout -outform PEM - -devcontainer-init: generate certs - wget -O ./bin/rabbitmqadmin http://rabbitmq:15672/cli/rabbitmqadmin && chmod +x ./bin/rabbitmqadmin - cp config/stud42.example.yaml config/stud42.yaml - yarn --cwd web/ui install - yarn --cwd web/ui generate - -.PHONY: build generate \ No newline at end of file diff --git a/cmd/api.go b/cmd/api.go index cb362d13..9a7592c2 100644 --- a/cmd/api.go +++ b/cmd/api.go @@ -24,11 +24,11 @@ import ( "github.com/vektah/gqlparser/v2/gqlerror" "go.opentelemetry.io/otel" - "atomys.codes/stud42/internal/api" - modelsutils "atomys.codes/stud42/internal/models" - "atomys.codes/stud42/internal/pkg/searchengine" - "atomys.codes/stud42/pkg/cache" - "atomys.codes/stud42/pkg/otelgql" + "github.com/42atomys/stud42/internal/api" + modelsutils "github.com/42atomys/stud42/internal/models" + "github.com/42atomys/stud42/internal/pkg/searchengine" + "github.com/42atomys/stud42/pkg/cache" + "github.com/42atomys/stud42/pkg/otelgql" ) var ( diff --git a/cmd/auth.go b/cmd/auth.go index 013f2623..bbbf7b1f 100644 --- a/cmd/auth.go +++ b/cmd/auth.go @@ -6,8 +6,8 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "atomys.codes/stud42/internal/auth" - _ "atomys.codes/stud42/internal/models/generated/runtime" + "github.com/42atomys/stud42/internal/auth" + _ "github.com/42atomys/stud42/internal/models/generated/runtime" ) var ( diff --git a/cmd/campus.go b/cmd/campus.go index 1691aefc..c088d93b 100644 --- a/cmd/campus.go +++ b/cmd/campus.go @@ -5,10 +5,10 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" - modelsutils "atomys.codes/stud42/internal/models" - modelgen "atomys.codes/stud42/internal/models/generated" - "atomys.codes/stud42/internal/models/generated/campus" - "atomys.codes/stud42/pkg/duoapi" + modelsutils "github.com/42atomys/stud42/internal/models" + modelgen "github.com/42atomys/stud42/internal/models/generated" + "github.com/42atomys/stud42/internal/models/generated/campus" + "github.com/42atomys/stud42/pkg/duoapi" ) // campusCmd represents the campus command diff --git a/cmd/exportdata.go b/cmd/exportdata.go index f36398d6..ca3e3917 100644 --- a/cmd/exportdata.go +++ b/cmd/exportdata.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - modelsutils "atomys.codes/stud42/internal/models" - generatedUser "atomys.codes/stud42/internal/models/generated/user" - "atomys.codes/stud42/internal/pkg/s3" + modelsutils "github.com/42atomys/stud42/internal/models" + generatedUser "github.com/42atomys/stud42/internal/models/generated/user" + "github.com/42atomys/stud42/internal/pkg/s3" "github.com/google/uuid" "github.com/rs/zerolog/log" "github.com/spf13/cobra" diff --git a/cmd/locations.go b/cmd/locations.go index 69024c14..137f5fdf 100644 --- a/cmd/locations.go +++ b/cmd/locations.go @@ -10,12 +10,12 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" - modelsutils "atomys.codes/stud42/internal/models" - modelgen "atomys.codes/stud42/internal/models/generated" - "atomys.codes/stud42/internal/models/generated/campus" - "atomys.codes/stud42/internal/models/generated/location" - "atomys.codes/stud42/internal/models/generated/user" - "atomys.codes/stud42/pkg/duoapi" + modelsutils "github.com/42atomys/stud42/internal/models" + modelgen "github.com/42atomys/stud42/internal/models/generated" + "github.com/42atomys/stud42/internal/models/generated/campus" + "github.com/42atomys/stud42/internal/models/generated/location" + "github.com/42atomys/stud42/internal/models/generated/user" + "github.com/42atomys/stud42/pkg/duoapi" ) // locationsCmd represents the locations command diff --git a/cmd/reindexusers.go b/cmd/reindexusers.go index 6638c07c..38268dfe 100644 --- a/cmd/reindexusers.go +++ b/cmd/reindexusers.go @@ -5,9 +5,9 @@ import ( "strconv" "sync" - modelsutils "atomys.codes/stud42/internal/models" - modelgen "atomys.codes/stud42/internal/models/generated" - "atomys.codes/stud42/internal/pkg/searchengine" + modelsutils "github.com/42atomys/stud42/internal/models" + modelgen "github.com/42atomys/stud42/internal/models/generated" + "github.com/42atomys/stud42/internal/pkg/searchengine" "github.com/google/uuid" "github.com/rs/zerolog/log" "github.com/spf13/cobra" diff --git a/cmd/root.go b/cmd/root.go index bdf80b4e..d80598f9 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -4,8 +4,8 @@ import ( "context" "strings" - modelsutils "atomys.codes/stud42/internal/models" - "atomys.codes/stud42/pkg/cache" + modelsutils "github.com/42atomys/stud42/internal/models" + "github.com/42atomys/stud42/pkg/cache" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" diff --git a/cmd/webhooks.go b/cmd/webhooks.go index 11776035..c702dafe 100644 --- a/cmd/webhooks.go +++ b/cmd/webhooks.go @@ -7,8 +7,8 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/cobra" - "atomys.codes/stud42/internal/pkg/searchengine" - "atomys.codes/stud42/internal/webhooks" + "github.com/42atomys/stud42/internal/pkg/searchengine" + "github.com/42atomys/stud42/internal/webhooks" ) // webhooksCmd represents the webhooks command diff --git a/generate.go b/generate.go index 53032106..8aff8fe9 100644 --- a/generate.go +++ b/generate.go @@ -10,10 +10,10 @@ import ( "log" "os" - "atomys.codes/stud42/pkg/cache" "entgo.io/contrib/entgql" "entgo.io/ent/entc" "entgo.io/ent/entc/gen" + "github.com/42atomys/stud42/pkg/cache" gqlgenapi "github.com/99designs/gqlgen/api" "github.com/99designs/gqlgen/codegen/config" "github.com/99designs/gqlgen/plugin/modelgen" @@ -54,7 +54,7 @@ func generateEntc() { gen.FeatureVersionedMigration, }, Target: "./internal/models/generated", - Package: "atomys.codes/stud42/internal/models/generated", + Package: "github.com/42atomys/stud42/internal/models/generated", }, opts...) if err != nil { log.Fatalf("running ent codegen: %v", err) diff --git a/go.mod b/go.mod index 33ff3d47..cbcf809c 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ -module atomys.codes/stud42 +module github.com/42atomys/stud42 -go 1.20 +go 1.23 require ( entgo.io/contrib v0.3.0 @@ -11,7 +11,7 @@ require ( github.com/getsentry/sentry-go v0.13.0 github.com/go-chi/chi/v5 v5.0.8 github.com/google/go-github/v47 v47.0.1-0.20220822225427-243bda850b1f - github.com/google/uuid v1.3.0 + github.com/google/uuid v1.6.0 github.com/hashicorp/go-multierror v1.1.1 github.com/lestrrat-go/jwx/v2 v2.0.11 github.com/lib/pq v1.10.7 @@ -20,12 +20,12 @@ require ( github.com/redis/go-redis/v9 v9.0.4 github.com/rs/cors v1.6.0 github.com/rs/zerolog v1.26.1 - github.com/spf13/cobra v1.6.1 + github.com/spf13/cobra v1.7.0 github.com/spf13/viper v1.10.1 github.com/streadway/amqp v1.0.0 - github.com/stretchr/testify v1.8.4 - github.com/vektah/gqlparser/v2 v2.5.1 - github.com/vmihailenco/msgpack/v5 v5.0.0-beta.9 + github.com/stretchr/testify v1.9.0 + github.com/vektah/gqlparser/v2 v2.5.12 + github.com/vmihailenco/msgpack/v5 v5.3.5 go.opentelemetry.io/otel v1.9.0 go.opentelemetry.io/otel/exporters/jaeger v1.9.0 go.opentelemetry.io/otel/sdk v1.9.0 @@ -39,6 +39,7 @@ require ( github.com/agnivade/levenshtein v1.1.1 // indirect github.com/andybalholm/brotli v1.0.4 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect + github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect @@ -49,15 +50,15 @@ require ( github.com/go-openapi/inflect v0.19.0 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/golang-jwt/jwt/v4 v4.4.2 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.1 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/hcl/v2 v2.13.0 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/klauspost/compress v1.15.6 // indirect @@ -81,16 +82,17 @@ require ( github.com/subosito/gotenv v1.2.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.37.1-0.20220607072126-8a320890c08d // indirect - github.com/vmihailenco/tagparser v0.1.2 // indirect - github.com/zclconf/go-cty v1.8.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/mod v0.8.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.6.0 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/zclconf/go-cty v1.14.4 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + golang.org/x/tools v0.21.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index f228204e..c4f3f7e9 100644 --- a/go.sum +++ b/go.sum @@ -42,9 +42,9 @@ github.com/99designs/gqlgen v0.17.28/go.mod h1:i4rEatMrzzu6RXaHydq1nmEPZkb3bKQsn github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= @@ -52,14 +52,19 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhiM5J5RFxEaFvMZVEAM1KvT1YzbEOwB2EAGjA= +github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= +github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/aws/aws-sdk-go v1.44.261 h1:PcTMX/QVk+P3yh2n34UzuXDF5FS2z5Lse2bt+r3IpU4= github.com/aws/aws-sdk-go v1.44.261/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao= +github.com/bsm/ginkgo/v2 v2.7.0/go.mod h1:AiKlXPm7ItEHNc/2+OkrNG4E0ITzojb9/xWzvQ9XZ9w= github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y= +github.com/bsm/gomega v1.26.0/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/bwmarrin/discordgo v0.25.0 h1:NXhdfHRNxtwso6FPdzW2i3uBvvU7UIQTghmV2T4nqAs= github.com/bwmarrin/discordgo v0.25.0/go.mod h1:NJZpH+1AfhIcyQsPeuBKsUtYrRnjkyu0kIVMCHkZtRY= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -87,6 +92,7 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/getsentry/sentry-go v0.13.0 h1:20dgTiUSfxRB/EhMPtxcL9ZEbM1ZdR+W/7f7NWD+xWo= @@ -94,6 +100,7 @@ github.com/getsentry/sentry-go v0.13.0/go.mod h1:EOsfu5ZdvKPfeHYV6pTVQnsjfp30+XA github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0= github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= +github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -105,6 +112,7 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= +github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= 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/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -134,9 +142,8 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -147,9 +154,8 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +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-github/v47 v47.0.1-0.20220822225427-243bda850b1f h1:8D2wmvSVxLueygUFs2Z+6iOsfo4XP0/ggzfI73GtmTc= github.com/google/go-github/v47 v47.0.1-0.20220822225427-243bda850b1f/go.mod h1:DRjdvizXE876j0YOZwInB1ESpOcU/xFBClNiQLSdorE= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -164,29 +170,28 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -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/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru/v2 v2.0.1 h1:5pv5N1lT1fjLg2VQ5KWc7kmucp2x/kvFOnxuVTqZ6x4= -github.com/hashicorp/golang-lru/v2 v2.0.1/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl/v2 v2.13.0 h1:0Apadu1w6M11dyGFxWnmhhcMjkbAiKCv7G1r/2QgCNc= github.com/hashicorp/hcl/v2 v2.13.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -202,10 +207,13 @@ github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHU github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= 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/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/lestrrat-go/blackmagic v1.0.1 h1:lS5Zts+5HIC/8og6cGHb0uCcNCa3OUt1ygh3Qz2Fe80= github.com/lestrrat-go/blackmagic v1.0.1/go.mod h1:UrEqBzIR2U6CnzVyUtfM6oZNMt/7O7Vohk2J0OGSAtU= github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE= @@ -226,6 +234,7 @@ github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPK github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= +github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/meilisearch/meilisearch-go v0.21.1 h1:Ns+R38TPitUKbz8hbg3ENzsR9J91LpxSJQOBexCsS7E= github.com/meilisearch/meilisearch-go v0.21.1/go.mod h1:XmVwi0ZyCdkEQ4cQvA3nh5TT0UByux4kBEWs4WUEp20= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM= @@ -237,6 +246,7 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -248,6 +258,7 @@ github.com/redis/go-redis/v9 v9.0.4 h1:FC82T+CHJ/Q/PdyLW++GeCO+Ol59Y4T7R4jbgjvkt github.com/redis/go-redis/v9 v9.0.4/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v1.6.0 h1:G9tHG9lebljV9mfp9SNPDL36nCDxmo3zTlAf1YgvzmI= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -256,14 +267,14 @@ github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+ 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/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -274,16 +285,18 @@ github.com/streadway/amqp v1.0.0 h1:kuuDrUJFZL1QYL9hUNuCxNObNzB0bV/ZG5jV3RWAQgo= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= 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 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.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 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= 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/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= @@ -291,21 +304,19 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC github.com/valyala/fasthttp v1.37.1-0.20220607072126-8a320890c08d h1:xS9QTPgKl9ewGsAOPc+xW7DeStJDqYPfisDmeSCcbco= github.com/valyala/fasthttp v1.37.1-0.20220607072126-8a320890c08d/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUOHcr4= -github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs= -github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/msgpack/v5 v5.0.0-beta.9 h1:iBRIniTnWOo0kqkg3k3XR8Vn6OCkVlIuZNo0UoBrKx4= -github.com/vmihailenco/msgpack/v5 v5.0.0-beta.9/go.mod h1:HVxBVPUK/+fZMonk4bi1islLa8V3cfnBug0+4dykPzo= -github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= -github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vektah/gqlparser/v2 v2.5.12 h1:COMhVVnql6RoaF7+aTBWiTADdpLGyZWU3K/NwW0ph98= +github.com/vektah/gqlparser/v2 v2.5.12/go.mod h1:WQQjFc+I1YIzoPvZBhUQX7waZgg3pMLi0r8KymvAE2w= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= -github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= +github.com/zclconf/go-cty v1.14.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8= +github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -330,8 +341,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -364,8 +375,9 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +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-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -401,8 +413,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -420,8 +432,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -460,8 +473,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.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.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -472,14 +485,13 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -525,8 +537,9 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= +golang.org/x/tools v0.21.0/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-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -606,20 +619,16 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -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.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= 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-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= diff --git a/gqlgen.yml b/gqlgen.yml index b87e4f10..9e974fe7 100644 --- a/gqlgen.yml +++ b/gqlgen.yml @@ -39,8 +39,9 @@ directives: # gqlgen will search for any type names in the schema in these go packages # if they match it will use them, otherwise it will generate them. autobind: - - "atomys.codes/stud42/internal/models/generated" - - "atomys.codes/stud42/internal/models/gotype" + - "github.com/99designs/gqlgen/graphql/introspection" + - "github.com/42atomys/stud42/internal/models/generated" + - "github.com/42atomys/stud42/internal/models/gotype" # This section declares type mapping between the GraphQL and go type systems # @@ -50,27 +51,27 @@ autobind: models: UUID: model: - - atomys.codes/stud42/internal/models.UUID + - github.com/42atomys/stud42/internal/models.UUID # Cast Me to User type to avoid circular dependency Me: model: - - atomys.codes/stud42/internal/models/generated.User + - github.com/42atomys/stud42/internal/models/generated.User # Cast all intra types to their type to avoid duplicate types IntraUserProxy: model: - - atomys.codes/stud42/pkg/duoapi.User + - github.com/42atomys/stud42/pkg/duoapi.User IntraCursusUserProxy: model: - - atomys.codes/stud42/pkg/duoapi.CursusUser + - github.com/42atomys/stud42/pkg/duoapi.CursusUser IntraCursusProxy: model: - - atomys.codes/stud42/pkg/duoapi.Cursus + - github.com/42atomys/stud42/pkg/duoapi.Cursus IntraProjectsUserProxy: model: - - atomys.codes/stud42/pkg/duoapi.ProjectsUser + - github.com/42atomys/stud42/pkg/duoapi.ProjectsUser IntraProjectProxy: model: - - atomys.codes/stud42/pkg/duoapi.Project + - github.com/42atomys/stud42/pkg/duoapi.Project IntraGroupProxy: model: - - atomys.codes/stud42/pkg/duoapi.Group + - github.com/42atomys/stud42/pkg/duoapi.Group diff --git a/internal/api/account_callbacks.go b/internal/api/account_callbacks.go index 1a1eba21..bfe54246 100644 --- a/internal/api/account_callbacks.go +++ b/internal/api/account_callbacks.go @@ -3,11 +3,11 @@ package api import ( "context" - "atomys.codes/stud42/internal/discord" - modelgen "atomys.codes/stud42/internal/models/generated" - "atomys.codes/stud42/internal/models/generated/user" - "atomys.codes/stud42/internal/models/gotype" - "atomys.codes/stud42/pkg/utils" + "github.com/42atomys/stud42/internal/discord" + modelgen "github.com/42atomys/stud42/internal/models/generated" + "github.com/42atomys/stud42/internal/models/generated/user" + "github.com/42atomys/stud42/internal/models/gotype" + "github.com/42atomys/stud42/pkg/utils" "github.com/getsentry/sentry-go" "github.com/google/go-github/v47/github" "github.com/rs/zerolog/log" diff --git a/internal/api/api.resolvers.go b/internal/api/api.resolvers.go index c845407d..48aa2c1e 100644 --- a/internal/api/api.resolvers.go +++ b/internal/api/api.resolvers.go @@ -13,25 +13,25 @@ import ( "strings" "time" - apigen "atomys.codes/stud42/internal/api/generated" - typesgen "atomys.codes/stud42/internal/api/generated/types" - "atomys.codes/stud42/internal/discord" - "atomys.codes/stud42/internal/models/generated" - "atomys.codes/stud42/internal/models/generated/account" - "atomys.codes/stud42/internal/models/generated/campus" - "atomys.codes/stud42/internal/models/generated/follow" - "atomys.codes/stud42/internal/models/generated/followsgroup" - "atomys.codes/stud42/internal/models/generated/location" - "atomys.codes/stud42/internal/models/generated/notice" - "atomys.codes/stud42/internal/models/generated/noticesuser" - "atomys.codes/stud42/internal/models/generated/user" - "atomys.codes/stud42/internal/models/gotype" - "atomys.codes/stud42/internal/pkg/s3" - "atomys.codes/stud42/internal/pkg/searchengine" - "atomys.codes/stud42/pkg/cache" - "atomys.codes/stud42/pkg/duoapi" - "atomys.codes/stud42/pkg/utils" "entgo.io/ent/dialect/sql" + apigen "github.com/42atomys/stud42/internal/api/generated" + typesgen "github.com/42atomys/stud42/internal/api/generated/types" + "github.com/42atomys/stud42/internal/discord" + "github.com/42atomys/stud42/internal/models/generated" + "github.com/42atomys/stud42/internal/models/generated/account" + "github.com/42atomys/stud42/internal/models/generated/campus" + "github.com/42atomys/stud42/internal/models/generated/follow" + "github.com/42atomys/stud42/internal/models/generated/followsgroup" + "github.com/42atomys/stud42/internal/models/generated/location" + "github.com/42atomys/stud42/internal/models/generated/notice" + "github.com/42atomys/stud42/internal/models/generated/noticesuser" + "github.com/42atomys/stud42/internal/models/generated/user" + "github.com/42atomys/stud42/internal/models/gotype" + "github.com/42atomys/stud42/internal/pkg/s3" + "github.com/42atomys/stud42/internal/pkg/searchengine" + "github.com/42atomys/stud42/pkg/cache" + "github.com/42atomys/stud42/pkg/duoapi" + "github.com/42atomys/stud42/pkg/utils" "github.com/99designs/gqlgen/graphql" "github.com/google/uuid" "github.com/rs/zerolog/log" diff --git a/internal/api/authentication.go b/internal/api/authentication.go index f5426182..2102f2e0 100644 --- a/internal/api/authentication.go +++ b/internal/api/authentication.go @@ -14,8 +14,8 @@ import ( "github.com/rs/zerolog/log" "github.com/spf13/viper" - modelgen "atomys.codes/stud42/internal/models/generated" - "atomys.codes/stud42/internal/models/generated/user" + modelgen "github.com/42atomys/stud42/internal/models/generated" + "github.com/42atomys/stud42/internal/models/generated/user" ) // authTokenContextKey is the context key to store the JWT Token from the diff --git a/internal/api/authz_by_policy.go b/internal/api/authz_by_policy.go index 195434da..876b7425 100644 --- a/internal/api/authz_by_policy.go +++ b/internal/api/authz_by_policy.go @@ -10,7 +10,7 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/rs/zerolog/log" - typesgen "atomys.codes/stud42/internal/api/generated/types" + typesgen "github.com/42atomys/stud42/internal/api/generated/types" ) // policyRequestHeaderAuthorizationContextKey is the context key for the request IP. diff --git a/internal/api/resolver.go b/internal/api/resolver.go index f5840ab4..63c98c3e 100644 --- a/internal/api/resolver.go +++ b/internal/api/resolver.go @@ -4,9 +4,9 @@ import ( "github.com/99designs/gqlgen/graphql" "go.opentelemetry.io/otel/trace" - apigen "atomys.codes/stud42/internal/api/generated" - modelgen "atomys.codes/stud42/internal/models/generated" - "atomys.codes/stud42/pkg/cache" + apigen "github.com/42atomys/stud42/internal/api/generated" + modelgen "github.com/42atomys/stud42/internal/models/generated" + "github.com/42atomys/stud42/pkg/cache" ) // This file will not be regenerated automatically. diff --git a/internal/models/client.go b/internal/models/client.go index 2b4a35a8..7bf5e0bf 100644 --- a/internal/models/client.go +++ b/internal/models/client.go @@ -6,9 +6,9 @@ import ( "github.com/rs/zerolog/log" - modelgen "atomys.codes/stud42/internal/models/generated" - _ "atomys.codes/stud42/internal/models/generated/runtime" - "atomys.codes/stud42/pkg/cache" + modelgen "github.com/42atomys/stud42/internal/models/generated" + _ "github.com/42atomys/stud42/internal/models/generated/runtime" + "github.com/42atomys/stud42/pkg/cache" ) var client *modelgen.Client diff --git a/internal/models/schema/account.go b/internal/models/schema/account.go index e69f704f..7e15b653 100644 --- a/internal/models/schema/account.go +++ b/internal/models/schema/account.go @@ -1,12 +1,12 @@ package schema import ( - "atomys.codes/stud42/internal/models/gotype" "entgo.io/ent" "entgo.io/ent/dialect/entsql" "entgo.io/ent/schema/edge" "entgo.io/ent/schema/field" "entgo.io/ent/schema/index" + "github.com/42atomys/stud42/internal/models/gotype" "github.com/google/uuid" ) diff --git a/internal/models/schema/follow_groups.go b/internal/models/schema/follow_groups.go index e2ad189e..95a553f0 100644 --- a/internal/models/schema/follow_groups.go +++ b/internal/models/schema/follow_groups.go @@ -4,13 +4,13 @@ import ( "context" "fmt" - "atomys.codes/stud42/internal/models/gotype" - "atomys.codes/stud42/pkg/utils" "entgo.io/ent" "entgo.io/ent/dialect/entsql" "entgo.io/ent/schema/edge" "entgo.io/ent/schema/field" "entgo.io/ent/schema/index" + "github.com/42atomys/stud42/internal/models/gotype" + "github.com/42atomys/stud42/pkg/utils" "github.com/google/uuid" ) diff --git a/internal/models/schema/location.go b/internal/models/schema/location.go index 0a653439..2635b73e 100644 --- a/internal/models/schema/location.go +++ b/internal/models/schema/location.go @@ -1,8 +1,10 @@ package schema import ( + "entgo.io/contrib/entgql" "entgo.io/ent" "entgo.io/ent/dialect/entsql" + "entgo.io/ent/schema" "entgo.io/ent/schema/edge" "entgo.io/ent/schema/field" "entgo.io/ent/schema/index" @@ -46,3 +48,10 @@ func (Location) Indexes() []ent.Index { ), } } + +func (Location) Annotations() []schema.Annotation { + return []schema.Annotation{ + entgql.RelayConnection(), + entgql.QueryField(), + } +} diff --git a/internal/models/schema/notice.go b/internal/models/schema/notice.go index 7c28e719..3d4d4620 100644 --- a/internal/models/schema/notice.go +++ b/internal/models/schema/notice.go @@ -11,7 +11,7 @@ import ( "entgo.io/ent/schema/index" "github.com/google/uuid" - "atomys.codes/stud42/internal/models/gotype" + "github.com/42atomys/stud42/internal/models/gotype" ) type Notice struct { diff --git a/internal/models/schema/user.go b/internal/models/schema/user.go index 7a0a49cb..1085a5f1 100644 --- a/internal/models/schema/user.go +++ b/internal/models/schema/user.go @@ -12,8 +12,8 @@ import ( "github.com/google/uuid" "github.com/rs/zerolog/log" - "atomys.codes/stud42/internal/models/gotype" - "atomys.codes/stud42/internal/pkg/searchengine" + "github.com/42atomys/stud42/internal/models/gotype" + "github.com/42atomys/stud42/internal/pkg/searchengine" ) type User struct { diff --git a/internal/models/utils.go b/internal/models/utils.go index b75eb637..c87b77b0 100644 --- a/internal/models/utils.go +++ b/internal/models/utils.go @@ -8,9 +8,9 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog/log" - modelgen "atomys.codes/stud42/internal/models/generated" - "atomys.codes/stud42/internal/models/generated/user" - "atomys.codes/stud42/pkg/duoapi" + modelgen "github.com/42atomys/stud42/internal/models/generated" + "github.com/42atomys/stud42/internal/models/generated/user" + "github.com/42atomys/stud42/pkg/duoapi" ) // WithTx is a helper function to wrap a function call with a transaction. diff --git a/internal/webhooks/campus_user.go b/internal/webhooks/campus_user.go index 668c6868..f6a3a108 100644 --- a/internal/webhooks/campus_user.go +++ b/internal/webhooks/campus_user.go @@ -1,10 +1,10 @@ package webhooks import ( - modelgen "atomys.codes/stud42/internal/models/generated" - "atomys.codes/stud42/internal/models/generated/campus" - "atomys.codes/stud42/internal/models/generated/user" - "atomys.codes/stud42/pkg/duoapi" + modelgen "github.com/42atomys/stud42/internal/models/generated" + "github.com/42atomys/stud42/internal/models/generated/campus" + "github.com/42atomys/stud42/internal/models/generated/user" + "github.com/42atomys/stud42/pkg/duoapi" ) type campusUserProcessor struct { diff --git a/internal/webhooks/location.go b/internal/webhooks/location.go index 4173ab66..edfe5ac5 100644 --- a/internal/webhooks/location.go +++ b/internal/webhooks/location.go @@ -7,12 +7,12 @@ import ( "github.com/rs/zerolog/log" - modelsutils "atomys.codes/stud42/internal/models" - "atomys.codes/stud42/internal/models/generated" - "atomys.codes/stud42/internal/models/generated/campus" - "atomys.codes/stud42/internal/models/generated/location" - "atomys.codes/stud42/internal/models/generated/user" - "atomys.codes/stud42/pkg/duoapi" + modelsutils "github.com/42atomys/stud42/internal/models" + "github.com/42atomys/stud42/internal/models/generated" + "github.com/42atomys/stud42/internal/models/generated/campus" + "github.com/42atomys/stud42/internal/models/generated/location" + "github.com/42atomys/stud42/internal/models/generated/user" + "github.com/42atomys/stud42/pkg/duoapi" ) type locationProcessor struct { diff --git a/internal/webhooks/serve.go b/internal/webhooks/serve.go index 0cc989c7..f8c81171 100644 --- a/internal/webhooks/serve.go +++ b/internal/webhooks/serve.go @@ -11,14 +11,14 @@ import ( "github.com/rs/zerolog/log" "github.com/streadway/amqp" - modelsutils "atomys.codes/stud42/internal/models" - "atomys.codes/stud42/internal/models/generated" - modelgen "atomys.codes/stud42/internal/models/generated" - "atomys.codes/stud42/internal/models/generated/account" - "atomys.codes/stud42/internal/models/generated/user" - "atomys.codes/stud42/internal/models/gotype" - "atomys.codes/stud42/pkg/duoapi" - "atomys.codes/stud42/pkg/utils" + modelsutils "github.com/42atomys/stud42/internal/models" + "github.com/42atomys/stud42/internal/models/generated" + modelgen "github.com/42atomys/stud42/internal/models/generated" + "github.com/42atomys/stud42/internal/models/generated/account" + "github.com/42atomys/stud42/internal/models/generated/user" + "github.com/42atomys/stud42/internal/models/gotype" + "github.com/42atomys/stud42/pkg/duoapi" + "github.com/42atomys/stud42/pkg/utils" ) type processor struct { diff --git a/internal/webhooks/user.go b/internal/webhooks/user.go index 4ea55b5d..768e3b4b 100644 --- a/internal/webhooks/user.go +++ b/internal/webhooks/user.go @@ -3,9 +3,9 @@ package webhooks import ( "strings" - modelgen "atomys.codes/stud42/internal/models/generated" - "atomys.codes/stud42/internal/models/generated/user" - "atomys.codes/stud42/pkg/duoapi" + modelgen "github.com/42atomys/stud42/internal/models/generated" + "github.com/42atomys/stud42/internal/models/generated/user" + "github.com/42atomys/stud42/pkg/duoapi" ) type userProcessor struct { diff --git a/main.go b/main.go index 308bd666..308dd6b2 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,7 @@ import ( tracesdk "go.opentelemetry.io/otel/sdk/trace" semconv "go.opentelemetry.io/otel/semconv/v1.12.0" - "atomys.codes/stud42/cmd" + "github.com/42atomys/stud42/cmd" ) func init() { diff --git a/tools/seeds/main.go b/tools/seeds/main.go index e8ac41ee..9008e8fc 100644 --- a/tools/seeds/main.go +++ b/tools/seeds/main.go @@ -8,7 +8,7 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - modelgen "atomys.codes/stud42/internal/models/generated" + modelgen "github.com/42atomys/stud42/internal/models/generated" ) var client *modelgen.Client diff --git a/tools/seeds/seed_user.go b/tools/seeds/seed_user.go index a3e871af..d1735540 100644 --- a/tools/seeds/seed_user.go +++ b/tools/seeds/seed_user.go @@ -3,7 +3,7 @@ package main import ( "context" - "atomys.codes/stud42/internal/models/generated" + "github.com/42atomys/stud42/internal/models/generated" ) func seedUsers() error { From 764107feeb31503c764d1c7bb7de21397f8808c1 Mon Sep 17 00:00:00 2001 From: Atomys Date: Sun, 20 Oct 2024 18:27:22 +0200 Subject: [PATCH 2/8] fix: docker task install --- build/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Dockerfile b/build/Dockerfile index 21c25781..8228e68d 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -9,7 +9,7 @@ ENV APP_VERSION=$APP_VERSION RUN apt-get update && \ apt-get install -y unzip jq curl && \ - sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d && \ + sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin && \ task generate build # INTERFACE BUILD - DEPS From a6bd41d5b3b4e9fce425ce0929990da8ca2fc191 Mon Sep 17 00:00:00 2001 From: Atomys Date: Sun, 20 Oct 2024 18:27:35 +0200 Subject: [PATCH 3/8] fix: commitlint githook --- githooks/commit-msg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/githooks/commit-msg b/githooks/commit-msg index a3c1ddb3..f7fb1a9c 100755 --- a/githooks/commit-msg +++ b/githooks/commit-msg @@ -7,14 +7,14 @@ NC="\033[0m" if ! npm list --location=global '@commitlint/cli' &> /dev/null then - echo "commitlint could not be found. Installing from https://github.com/conventional-changelog/commitlint" - npm install --location=global @commitlint/cli + echo "commitlint could not be found. Installing from https://github.com/conventional-changelog/commitlint" + npm install --location=global @commitlint/cli fi if ! npm list --location=global '@commitlint/config-conventional' &> /dev/null then - echo "commitlint/config-conventional could not be found. Installing from https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional" - npm install --location=global @commitlint/config-conventional + echo "commitlint/config-conventional could not be found. Installing from https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional" + npm install --location=global @commitlint/config-conventional fi -commitlint -g $(git config core.hooksPath)/commitlint.config.js -x $(npm root -g)/@commitlint/config-conventional -V --edit "$1" \ No newline at end of file +npx commitlint -g $(git config core.hooksPath)/commitlint.config.js -V --edit "$1" From e55c1d9f4a8f8b768ce4d5a894a511430294e8c0 Mon Sep 17 00:00:00 2001 From: Atomys Date: Sun, 20 Oct 2024 18:29:46 +0200 Subject: [PATCH 4/8] fix: post create still use makefile --- .devcontainer/postCreateCommand.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index 17281f91..6333744f 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -29,7 +29,7 @@ git update-index --assume-unchanged .devcontainer/.env # https://github.com/microsoft/vscode/issues/133215 git config oh-my-zsh.hide-info 1 -make -f build/Makefile generate certs +task generate certs cp config/stud42.example.yaml config/stud42.yaml From aafa3be80c6aebd59f04740b7517cbd0c259985d Mon Sep 17 00:00:00 2001 From: Atomys Date: Sun, 20 Oct 2024 18:34:40 +0200 Subject: [PATCH 5/8] chore: bump to go 1.23 --- .github/workflows/linters.yaml | 2 +- .github/workflows/tests.yaml | 2 +- build/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 7a3b1323..88989aad 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -29,7 +29,7 @@ jobs: - name: Setup go uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.23" check-latest: true - name: Install Task uses: arduino/setup-task@v2 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index dd2490c6..50b88a47 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -129,7 +129,7 @@ jobs: - name: Setup go uses: actions/setup-go@v5 with: - go-version: "1.20" + go-version: "1.23" check-latest: true - name: Install Task uses: arduino/setup-task@v2 diff --git a/build/Dockerfile b/build/Dockerfile index 8228e68d..019a70e9 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,5 +1,5 @@ # GOLANG BUILD - BUILD -FROM golang:1.20 AS go-build +FROM golang:1.23 AS go-build WORKDIR /build COPY . /build From 12b9a511f3e57bb8c7c0b160503dbffb5ab172c2 Mon Sep 17 00:00:00 2001 From: Atomys Date: Sun, 20 Oct 2024 18:38:31 +0200 Subject: [PATCH 6/8] fix: install rabbitmqadmin cli if not present on the devcontainer --- .devcontainer/postCreateCommand.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index 6333744f..1b1dcbf7 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -34,6 +34,11 @@ task generate certs cp config/stud42.example.yaml config/stud42.yaml # Configure RabbitMQ +if [ ! -f /usr/local/bin/rabbitmqadmin ]; then + wget -O /usr/local/bin/rabbitmqadmin https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/v3.11.13/bin/rabbitmqadmin + chmod +x /usr/local/bin/rabbitmqadmin +fi + ./bin/rabbitmqadmin --host rabbitmq --user rabbitmq --password rabbitmq declare exchange name="webhooks" type="direct" ./bin/rabbitmqadmin --host rabbitmq --user rabbitmq --password rabbitmq declare queue name="webhooks.processing" auto_delete="false" durable="true" ./bin/rabbitmqadmin --host rabbitmq --user rabbitmq --password rabbitmq declare queue name="webhooks.dlq" auto_delete="false" durable="true" From b189d2db481f96a9759730b037da8f392eba8b9b Mon Sep 17 00:00:00 2001 From: Atomys Date: Sun, 20 Oct 2024 18:49:03 +0200 Subject: [PATCH 7/8] docs: update devcontainer oauth requirement --- docs/devcontainers/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/devcontainers/README.md b/docs/devcontainers/README.md index 77cf7cc9..616528ee 100644 --- a/docs/devcontainers/README.md +++ b/docs/devcontainers/README.md @@ -22,7 +22,7 @@ Like say before, you needs to add some credentials listed on the file `.devconta To develop on S42, you need to have your OAuth2 applications with her credentials. Each OAuth2 provide to you an ID and a SECRET. In the next sub section, we give you the endpoint for each provider. -#### 42 +#### 42 (required anytime) **Endpoint**: https://profile.intra.42.fr/oauth/applications/new @@ -30,7 +30,7 @@ To develop on S42, you need to have your OAuth2 applications with her credential **Callback Url to provide**: `http://localhost:3000/api/auth/callback/42-school` -#### Github +#### Github (optional but required for webhooks and oauth) **Endpoint**: https://github.com/settings/applications/new @@ -38,7 +38,7 @@ To develop on S42, you need to have your OAuth2 applications with her credential **Callback Url to provide**: `http://localhost:3000/api/auth/callback/github` -#### Discord +#### Discord (optional but required for bot) **Endpoint**: https://discord.com/developers/applications From 76b7d8f1eecce23c28f4e86e9b1c3e2beb902897 Mon Sep 17 00:00:00 2001 From: Atomys Date: Sun, 20 Oct 2024 18:51:15 +0200 Subject: [PATCH 8/8] fix: github handle change --- .github/CODEOWNERS | 4 ++-- .github/FUNDING.yml | 2 +- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- .github/ISSUE_TEMPLATE/your_issue.yml | 2 +- .github/workflows/discord-push-release.yaml | 4 ++-- .github/workflows/issues.yaml | 2 +- .github/workflows/packages.yaml | 4 ++-- CONTRIBUTING.md | 8 ++++---- README.md | 20 +++++++++---------- build/Dockerfile | 4 ++-- deploy/README.md | 4 ++-- deploy/stacks/apps/s42/secrets.tf | 4 ++-- internal/api/account_callbacks.go | 2 +- internal/webhooks/serve.go | 2 +- web/ui/src/components/Badge/data.ts | 8 ++++---- .../ClusterMap/ClusterContainer.tsx | 2 +- web/ui/src/components/Sidebar/Sidebar.tsx | 4 ++-- web/ui/src/components/Sponsors/index.tsx | 2 +- .../containers/settings/SettingsLayout.tsx | 2 +- .../src/lib/GraphqlAdapter/graphql-adapter.ts | 2 +- web/ui/src/lib/github.tsx | 2 +- web/ui/src/pages/about/help.tsx | 2 +- web/ui/src/pages/beta/index.tsx | 6 +++--- web/ui/src/pages/settings/awesomeness.tsx | 4 ++-- 25 files changed, 50 insertions(+), 50 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 87e53435..03f91641 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ -# Per default all source code is owned by @42Atomys -* @42Atomys +# Per default all source code is owned by @42atomys +* @42atomys diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 86bc590a..a04acecb 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -github: [42Atomys] +github: [42atomys] diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 24485613..2c91fbfb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -80,7 +80,7 @@ body: id: terms attributes: label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/42Atomys/stud42/blob/main/CODE_OF_CONDUCT.md) + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/42atomys/stud42/blob/main/CODE_OF_CONDUCT.md) options: - label: I agree to follow this project's Code of Conduct required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 888a74ba..2ec73370 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -57,7 +57,7 @@ body: id: terms attributes: label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/42Atomys/stud42/blob/main/CODE_OF_CONDUCT.md) + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/42atomys/stud42/blob/main/CODE_OF_CONDUCT.md) options: - label: I agree to follow this project's Code of Conduct required: true diff --git a/.github/ISSUE_TEMPLATE/your_issue.yml b/.github/ISSUE_TEMPLATE/your_issue.yml index 8c131b6f..05a3e5bd 100644 --- a/.github/ISSUE_TEMPLATE/your_issue.yml +++ b/.github/ISSUE_TEMPLATE/your_issue.yml @@ -24,7 +24,7 @@ body: id: terms attributes: label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/42Atomys/stud42/blob/main/CODE_OF_CONDUCT.md) + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/42atomys/stud42/blob/main/CODE_OF_CONDUCT.md) options: - label: I agree to follow this project's Code of Conduct required: true diff --git a/.github/workflows/discord-push-release.yaml b/.github/workflows/discord-push-release.yaml index 03484b4f..051ecf37 100644 --- a/.github/workflows/discord-push-release.yaml +++ b/.github/workflows/discord-push-release.yaml @@ -44,7 +44,7 @@ jobs: { "style": 5, "label": "Show Full Release", - "url": "https://github.com/42Atomys/stud42/releases/tag/${{ github.event.release.tag_name }}", + "url": "https://github.com/42atomys/stud42/releases/tag/${{ github.event.release.tag_name }}", "disabled": false, "type": 2 } @@ -84,7 +84,7 @@ jobs: { "style": 5, "label": "Show Full Release", - "url": "https://github.com/42Atomys/stud42/releases/tag/${{ github.event.release.tag_name }}", + "url": "https://github.com/42atomys/stud42/releases/tag/${{ github.event.release.tag_name }}", "disabled": false, "type": 2 } diff --git a/.github/workflows/issues.yaml b/.github/workflows/issues.yaml index bf83716c..171bfb68 100644 --- a/.github/workflows/issues.yaml +++ b/.github/workflows/issues.yaml @@ -78,7 +78,7 @@ jobs: - uses: actions/stale@v9 with: exempt-all-milestones: true - exempt-assignees: "42Atomys" + exempt-assignees: "42atomys" enable-statistics: true operations-per-run: 100 diff --git a/.github/workflows/packages.yaml b/.github/workflows/packages.yaml index e2a7bc80..16bf28d9 100644 --- a/.github/workflows/packages.yaml +++ b/.github/workflows/packages.yaml @@ -22,7 +22,7 @@ jobs: packages: write env: REGISTRY: ghcr.io - IMAGE_NAME: 42Atomys/s42-${{ matrix.package }} + IMAGE_NAME: 42atomys/s42-${{ matrix.package }} IMAGE_TAG: ${{ matrix.version }} steps: - name: Checkout repository @@ -45,7 +45,7 @@ jobs: labels: | org.opencontainers.image.title=s42-${{ matrix.package }} org.opencontainers.image.description=${{ matrix.package }} image for s42 project - org.opencontainers.image.source=https://github.com/42Atomys/stud42/tree/main/build/packages/${{ matrix.package }} + org.opencontainers.image.source=https://github.com/42atomys/stud42/tree/main/build/packages/${{ matrix.package }} - name: Build and push Docker image uses: docker/build-push-action@v6 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1526781e..aa895d44 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,13 +33,13 @@ new section, all is possible, this is our project (Parce que c'est notre projet) If you spot a problem with the app, submit an idea of enchantment or new fonctionnality, search if an issue don't exist yet. If a related issue doesn't exist, -you can open a new issue using a relevant [issue form](https://github.com/42Atomys/stud42/issues/new/choose). +you can open a new issue using a relevant [issue form](https://github.com/42atomys/stud42/issues/new/choose). #### Solve an issue -Scan through our [existing issues](https://github.com/42Atomys/issues/issues) +Scan through our [existing issues](https://github.com/42atomys/issues/issues) to find one that interests you. You can narrow down the search using `labels` as -filters. If it's your first contribution, the label https://github.com/42Atomys/stud42/labels/good%20first%20issue +filters. If it's your first contribution, the label https://github.com/42atomys/stud42/labels/good%20first%20issue is a good one to start ! As a general rule, we don’t assign issues to anyone. If you find an issue to work on, @@ -98,6 +98,6 @@ When you're finished with the changes, create a pull request, also known as a PR Congratulations πŸŽ‰ πŸŽ‰ Thanks you ✨. -Once your PR is merged, your contributions will be publicly visible on the [GitHub repo](https://github.com/42Atomys/stud42). +Once your PR is merged, your contributions will be publicly visible on the [GitHub repo](https://github.com/42atomys/stud42). Now that you are part of the S42 community, awesome ! diff --git a/README.md b/README.md index bc711fe6..c9234083 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@

Hi there πŸ‘‹ welcome on S42 repository

-

Release πŸŽ‰ +

Release πŸŽ‰ GitHub release (latest by date) -Production deployment status -Staging deployment status -GitHub contributors +Production deployment status +Staging deployment status +GitHub contributors GitHub Repo stars -GitHub Repo sponsors +GitHub Repo sponsors Go Reference

-

This project is the direct continuation of the stud42.fr project. When @42Atomys (aka. Atom) created stud42, he announced that the project would be open source when he left 42 staff.

+

This project is the direct continuation of the stud42.fr project. When @42atomys (aka. Atom) created stud42, he announced that the project would be open source when he left 42 staff.

4 years later, it's finally time, time to put the project that doesn't need to prove itself anymore in open source, so that this project becomes the project of every student of every campus in the world.

@@ -18,7 +18,7 @@

-

Currently in phase 4, the main core of Stud42 is rewritted by @42Atomys, the S42 version 3 now has a new architecture, a new design, and a new codebase.

+

Currently in phase 4, the main core of Stud42 is rewritted by @42atomys, the S42 version 3 now has a new architecture, a new design, and a new codebase.


@@ -61,9 +61,9 @@ This project is under the [MIT License](LICENSE). You can use it for your own pr ## ❀️ Sponsors -If you want to sponsor the project, you can do it by clicking on the button **Sponsor** on the right of the page or going to [https://github.com/sponsors/42Atomys](https://github.com/sponsors/42Atomys). All donations will be used to pay the costs of the project, such as the domain name, the hosting, the SSL certificates, etc. +If you want to sponsor the project, you can do it by clicking on the button **Sponsor** on the right of the page or going to [https://github.com/sponsors/42atomys](https://github.com/sponsors/42atomys). All donations will be used to pay the costs of the project, such as the domain name, the hosting, the SSL certificates, etc. -To thank you for your support, you will have access to the awesomeness part of the app and unique badges on the Discord. You can see the list of all the sponsors and see the list of benefits on the [Sponsors page](https://github.com/sponsors/42Atomys). +To thank you for your support, you will have access to the awesomeness part of the app and unique badges on the Discord. You can see the list of all the sponsors and see the list of benefits on the [Sponsors page](https://github.com/sponsors/42atomys). ## πŸ“« Contact @@ -86,4 +86,4 @@ The Discord is the place to be to share your ideas, to ask for help, to discuss List of all the contributors to the project, thanks to you the project is what it is today. -![Contributors](https://contrib.rocks/image?repo=42Atomys/stud42) +![Contributors](https://contrib.rocks/image?repo=42atomys/stud42) diff --git a/build/Dockerfile b/build/Dockerfile index 019a70e9..c36f1775 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -38,8 +38,8 @@ RUN apt-get update -y && \ # RUNNER FROM node:18-alpine AS runner -LABEL maintener "42Atomys " -LABEL repository "https://github.com/42Atomys/stud42" +LABEL maintener "42atomys " +LABEL repository "https://github.com/42atomys/stud42" WORKDIR /app diff --git a/deploy/README.md b/deploy/README.md index 279ac822..899b243e 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -1,7 +1,7 @@ # Deployment -The entire S42 project is deployed on a kubernetes cluster hosted on the OVH cloud and paid for by @42Atomys. -You can contribute to the costs by sponsoring the project on [GitHub](https://github.com/sponsors/42Atomys). +The entire S42 project is deployed on a kubernetes cluster hosted on the OVH cloud and paid for by @42atomys. +You can contribute to the costs by sponsoring the project on [GitHub](https://github.com/sponsors/42atomys). The kubernetes cluster is composed of 3 node pools: diff --git a/deploy/stacks/apps/s42/secrets.tf b/deploy/stacks/apps/s42/secrets.tf index e0b961c3..59323efc 100644 --- a/deploy/stacks/apps/s42/secrets.tf +++ b/deploy/stacks/apps/s42/secrets.tf @@ -71,7 +71,7 @@ module "service-token" { isClusterWide = false namespace = "production" - # TODO(@42Atomys): Scope the providers to the namespace. + # TODO(@42atomys): Scope the providers to the namespace. reflected = true reflectedNamespaces = ["staging", "previews"] @@ -103,7 +103,7 @@ module "service-token" { isClusterWide = false namespace = "production" - # TODO(@42Atomys): Scope the providers to the namespace. + # TODO(@42atomys): Scope the providers to the namespace. reflected = true reflectedNamespaces = ["staging"] diff --git a/internal/api/account_callbacks.go b/internal/api/account_callbacks.go index bfe54246..f3bddc06 100644 --- a/internal/api/account_callbacks.go +++ b/internal/api/account_callbacks.go @@ -16,7 +16,7 @@ import ( const ( // githubCreator is the GitHub username of the creator of the repository. - githubCreator = "42Atomys" + githubCreator = "42atomys" // githubRepository is the GitHub repository name. githubRepository = "stud42" ) diff --git a/internal/webhooks/serve.go b/internal/webhooks/serve.go index f8c81171..78f61744 100644 --- a/internal/webhooks/serve.go +++ b/internal/webhooks/serve.go @@ -41,7 +41,7 @@ func New() *processor { // Serve starts the webhooks processor and listens for incoming message from // the RabbitMQ queue "webhooks-processor" filled by the webhooked project. // -// See https://github.com/42Atomys/webhooked +// See https://github.com/42atomys/webhooked func (p *processor) Serve(amqpUrl, channel string) error { conn, err := amqp.Dial(amqpUrl) if err != nil { diff --git a/web/ui/src/components/Badge/data.ts b/web/ui/src/components/Badge/data.ts index 52afdb44..f41ce97f 100644 --- a/web/ui/src/components/Badge/data.ts +++ b/web/ui/src/components/Badge/data.ts @@ -57,13 +57,13 @@ export const flagData: FlagDataMap = { name: 'Collaborator', description: 'Collaborator on Github', className: 'fa-duotone fa-code-compare text-cyan-500', - link: () => new URL('https://github.com/42Atomys/stud42/collaborators'), + link: () => new URL('https://github.com/42atomys/stud42/collaborators'), }, CONTRIBUTOR: { name: 'Contributor', description: 'Contributed on Github', className: 'fa-duotone fa-code-pull-request text-green-500', - link: () => new URL('https://github.com/42Atomys/stud42'), + link: () => new URL('https://github.com/42atomys/stud42'), }, DISCORD: { name: 'Discord', @@ -75,13 +75,13 @@ export const flagData: FlagDataMap = { name: 'Sponsor', description: 'Sponsor of the project', className: 'fa-duotone fa-user-astronaut text-pink-500', - link: () => new URL('https://github.com/sponsors/42Atomys'), + link: () => new URL('https://github.com/sponsors/42atomys'), }, STARGAZER: { name: 'Stargazer', description: 'Starred the project on Github', className: 'fa-duotone fa-star text-yellow-500', - link: () => new URL('https://github.com/sponsors/42Atomys'), + link: () => new URL('https://github.com/sponsors/42atomys'), }, }; diff --git a/web/ui/src/components/ClusterMap/ClusterContainer.tsx b/web/ui/src/components/ClusterMap/ClusterContainer.tsx index 943c1061..7143bad3 100644 --- a/web/ui/src/components/ClusterMap/ClusterContainer.tsx +++ b/web/ui/src/components/ClusterMap/ClusterContainer.tsx @@ -60,7 +60,7 @@ export const ClusterContainer: ClusterContainerComponent = ({ fetchPolicy: 'network-only', // This is a workaround due to missing websocket implementation. // TODO: Remove this when websocket is implemented. - // See https://github.com/42Atomys/stud42/issues/259 + // See https://github.com/42atomys/stud42/issues/259 pollInterval: 1000 * 60, // 1 minute }); diff --git a/web/ui/src/components/Sidebar/Sidebar.tsx b/web/ui/src/components/Sidebar/Sidebar.tsx index 165108d9..9f8aa940 100644 --- a/web/ui/src/components/Sidebar/Sidebar.tsx +++ b/web/ui/src/components/Sidebar/Sidebar.tsx @@ -166,13 +166,13 @@ export const Sidebar = ({ > {!subSidebar && ( )} = ({ className }) => ( showArrow > You can create features request and report bugs on the{' '} { /** * for Adapter workflows please see the README file of the current folder - * @see https://github.com/42Atomys/stud42/blob/main/web/ui/src/lib/GraphqlAdapter/README.md + * @see https://github.com/42atomys/stud42/blob/main/web/ui/src/lib/GraphqlAdapter/README.md * @returns {Promise} */ export const GraphQLAdapter = (): S42Adapter => { diff --git a/web/ui/src/lib/github.tsx b/web/ui/src/lib/github.tsx index 130d4441..c4b93dcc 100644 --- a/web/ui/src/lib/github.tsx +++ b/web/ui/src/lib/github.tsx @@ -116,7 +116,7 @@ export interface Owner { site_admin?: boolean; } -const PROJECT_PATH = '42Atomys/stud42'; +const PROJECT_PATH = '42atomys/stud42'; const starButton = tv({ slots: { diff --git a/web/ui/src/pages/about/help.tsx b/web/ui/src/pages/about/help.tsx index d09fc77d..6ab405cf 100644 --- a/web/ui/src/pages/about/help.tsx +++ b/web/ui/src/pages/about/help.tsx @@ -52,7 +52,7 @@ const HelpPage: NextPage = () => { Found a bug? Report it on our{' '} diff --git a/web/ui/src/pages/beta/index.tsx b/web/ui/src/pages/beta/index.tsx index 461b30a7..e1bc686d 100644 --- a/web/ui/src/pages/beta/index.tsx +++ b/web/ui/src/pages/beta/index.tsx @@ -194,10 +194,10 @@ export const IndexPage: NextPage = ({ me }) => { {' '} project. When{' '} - @42Atomys + @42atomys {' '} (aka. Atom) created stud42, he announced that the project would be open source when he left 42 staff. @@ -246,7 +246,7 @@ export const IndexPage: NextPage = ({ me }) => { See FAQ issue for more information{' '} #364 diff --git a/web/ui/src/pages/settings/awesomeness.tsx b/web/ui/src/pages/settings/awesomeness.tsx index c02879d8..c32e202e 100644 --- a/web/ui/src/pages/settings/awesomeness.tsx +++ b/web/ui/src/pages/settings/awesomeness.tsx @@ -37,7 +37,7 @@ const AwesomenessSettingPage: NextPage = () => { )) || ( @@ -56,7 +56,7 @@ const AwesomenessSettingPage: NextPage = () => { )}