-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V3 Closes MSP-4227 and MSP-4182 See merge request isp/isp-config-service!1
- Loading branch information
Showing
141 changed files
with
6,889 additions
and
6,998 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
run: | ||
allow-parallel-runners: true | ||
issues: | ||
exclude-rules: | ||
- path: controller #достаточное кол-во контекса на уровне контроллеров | ||
linters: | ||
- wrapcheck | ||
- path: transaction #транзакции прозрачны | ||
linters: | ||
- wrapcheck | ||
linters: | ||
enable-all: true | ||
disable: | ||
- goimports #у нас собственные правила форматирования импортов | ||
- wsl #расставление пробелов очень индивидуально | ||
- exhaustivestruct #не имеет смысла | ||
- varnamelen #очень индивидуально (db) | ||
- exhaustruct #не имеет смысла | ||
- golint #устарел | ||
- contextcheck #не имеет смысла | ||
- gci #у нас собственные правила форматирования импортов | ||
- gofumpt #у нас собственные правила форматирования импортов | ||
- nolintlint #Goland все равно форматирует с отступом | ||
- nlreturn #не всегда имеет смысл | ||
- godot #не актуально для свагера | ||
- ifshort #приняли решение, что мы так не пишем if err := ...; err != nil {} | ||
- godox #не позволяет оставлять todo | ||
- maligned #аллокацией памяти для структур конфликтует с удобством их чтения | ||
- nosnakecase #не позволяет заводить пакеты используя snake_case | ||
- depguard #не всегда имеет смысл | ||
- dupword #не имеет смысла | ||
- tagalign #не всегда имеет смысл | ||
- musttag #у нас собственные правило: не используем теги, если работаем с пакетом isp-kit/json и с внутренними структурами(между нашими сервисами), при этом теги обязательный для всех внених для нас структур | ||
- perfsprint #мнимая производительность в угоду читаемости | ||
- gomoddirectives #требует rqlite | ||
- tagliatelle | ||
linters-settings: | ||
funlen: | ||
lines: 80 | ||
lll: | ||
line-length: 150 | ||
cyclop: | ||
max-complexity: 15 #по умолчанию 10 мало | ||
revive: | ||
rules: | ||
- name: var-naming #отключаем Id -> ID | ||
disabled: true | ||
stylecheck: | ||
checks: #отключаем Id -> ID | ||
- "-ST1000" | ||
- "-ST1016" | ||
- "-ST1020" | ||
- "-ST1021" | ||
- "-ST1022" | ||
testifylint: | ||
disable: | ||
- compares |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.4.9 | ||
3.1.0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM golang:1.23-alpine3.20 as builder | ||
WORKDIR /build | ||
ARG version | ||
ENV version_env=$version | ||
ARG app_name | ||
ENV app_name_env=$app_name | ||
COPY . . | ||
RUN apk update && apk upgrade && apk add --no-cache gcc musl-dev | ||
RUN go build -ldflags="-X 'main.version=$version_env'" -o /main . | ||
|
||
FROM alpine:3.20 | ||
|
||
RUN apk add --no-cache tzdata | ||
RUN cp /usr/share/zoneinfo/Europe/Moscow /etc/localtime | ||
RUN echo "Europe/Moscow" > /etc/timezone | ||
|
||
ARG UID=10001 | ||
RUN adduser \ | ||
--disabled-password \ | ||
--gecos "" \ | ||
--home "/nonexistent" \ | ||
--shell "/sbin/nologin" \ | ||
--no-create-home \ | ||
--uid "${UID}" \ | ||
appuser | ||
USER appuser | ||
|
||
WORKDIR /app | ||
ARG app_name | ||
ENV app_name_env=$app_name | ||
COPY --from=builder main /app/$app_name_env | ||
COPY /conf/config.yml /app/config.yml | ||
COPY /conf/default_remote_config.json* /app/default_remote_config.json | ||
COPY /migrations /app/migrations | ||
ENTRYPOINT /app/$app_name_env |
Oops, something went wrong.