mirror of https://github.com/h44z/wg-portal.git
feat: migrate to wg-portal2
This commit is contained in:
parent
b44c19bb8c
commit
b9bcf0e4ce
|
|
@ -0,0 +1,34 @@
|
|||
name: Weekly release
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 8 * * 1
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
- run: |
|
||||
npm install -g semantic-release@23.0.4 \
|
||||
@semantic-release/commit-analyzer@12.0.0 \
|
||||
@semantic-release/release-notes-generator@12.1.0 \
|
||||
@semantic-release/changelog@6.0.3 \
|
||||
@semantic-release/github@10.0.2 \
|
||||
@semantic-release/git@10.0.1 \
|
||||
@saithodev/semantic-release-backmerge@4.0.1 \
|
||||
conventional-changelog-conventionalcommits
|
||||
- run: npx semantic-release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<module name="wg-portal" />
|
||||
<working_directory value="$PROJECT_DIR$" />
|
||||
<kind value="PACKAGE" />
|
||||
<package value="github.com/h44z/wg-portal/cmd/api_build_tool" />
|
||||
<package value="github.com/fedor-git/wg-portal-2/cmd/api_build_tool" />
|
||||
<directory value="$PROJECT_DIR$" />
|
||||
<filePath value="$PROJECT_DIR$/internal/ports/api/build_tool/main.go" />
|
||||
<method v="2" />
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</envs>
|
||||
<sudo value="true" />
|
||||
<kind value="PACKAGE" />
|
||||
<package value="github.com/h44z/wg-portal/cmd/wg-portal" />
|
||||
<package value="github.com/fedor-git/wg-portal-2/cmd/wg-portal" />
|
||||
<directory value="$PROJECT_DIR$" />
|
||||
<filePath value="$PROJECT_DIR$/cmd/wg-portal/main.go" />
|
||||
<method v="2" />
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
</envs>
|
||||
<sudo value="true" />
|
||||
<kind value="PACKAGE" />
|
||||
<package value="github.com/h44z/wg-portal/cmd/wg-portal" />
|
||||
<package value="github.com/fedor-git/wg-portal-2/cmd/wg-portal" />
|
||||
<directory value="$PROJECT_DIR$" />
|
||||
<filePath value="$PROJECT_DIR$/cmd/wg-portal/main.go" />
|
||||
<method v="2" />
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ ARG BUILD_VERSION
|
|||
ARG TARGETARCH
|
||||
# Build the application
|
||||
RUN CGO_ENABLED=0 GOARCH=${TARGETARCH} go build -o /build/dist/wg-portal \
|
||||
-ldflags "-w -s -extldflags '-static' -X 'github.com/h44z/wg-portal/internal.Version=${BUILD_VERSION}'" \
|
||||
-ldflags "-w -s -extldflags '-static' -X 'github.com/fedor-git/wg-portal-2/internal.Version=${BUILD_VERSION}'" \
|
||||
-tags netgo \
|
||||
cmd/wg-portal/main.go
|
||||
|
||||
|
|
|
|||
14
Makefile
14
Makefile
|
|
@ -1,10 +1,10 @@
|
|||
# Go parameters
|
||||
GOCMD=go
|
||||
MODULENAME=github.com/h44z/wg-portal
|
||||
MODULENAME=github.com/fedor-git/wg-portal-2
|
||||
GOFILES:=$(shell go list ./... | grep -v /vendor/)
|
||||
BUILDDIR=dist
|
||||
BINARIES=$(subst cmd/,,$(wildcard cmd/*))
|
||||
IMAGE=h44z/wg-portal
|
||||
IMAGE=fedor-git/wg-portal-2
|
||||
NPMCMD=npm
|
||||
|
||||
all: help
|
||||
|
|
@ -76,7 +76,7 @@ clean:
|
|||
.PHONY: build
|
||||
build: build-dependencies
|
||||
CGO_ENABLED=0 $(GOCMD) build -o $(BUILDDIR)/wg-portal \
|
||||
-ldflags "-w -s -extldflags \"-static\" -X 'github.com/h44z/wg-portal/internal/server.Version=${ENV_BUILD_IDENTIFIER}-${ENV_BUILD_VERSION}'" \
|
||||
-ldflags "-w -s -extldflags \"-static\" -X 'github.com/fedor-git/wg-portal-2/internal/server.Version=${ENV_BUILD_IDENTIFIER}-${ENV_BUILD_VERSION}'" \
|
||||
-tags netgo \
|
||||
cmd/wg-portal/main.go
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ build: build-dependencies
|
|||
.PHONY: build-amd64
|
||||
build-amd64: build-dependencies
|
||||
CGO_ENABLED=0 $(GOCMD) build -o $(BUILDDIR)/wg-portal-amd64 \
|
||||
-ldflags "-w -s -extldflags \"-static\" -X 'github.com/h44z/wg-portal/internal/server.Version=${ENV_BUILD_IDENTIFIER}-${ENV_BUILD_VERSION}'" \
|
||||
-ldflags "-w -s -extldflags \"-static\" -X 'github.com/fedor-git/wg-portal-2/internal/server.Version=${ENV_BUILD_IDENTIFIER}-${ENV_BUILD_VERSION}'" \
|
||||
-tags netgo \
|
||||
cmd/wg-portal/main.go
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ build-amd64: build-dependencies
|
|||
.PHONY: build-arm64
|
||||
build-arm64: build-dependencies
|
||||
CGO_ENABLED=0 CC=aarch64-linux-gnu-gcc GOOS=linux GOARCH=arm64 $(GOCMD) build -o $(BUILDDIR)/wg-portal-arm64 \
|
||||
-ldflags "-w -s -extldflags \"-static\" -X 'github.com/h44z/wg-portal/internal/server.Version=${ENV_BUILD_IDENTIFIER}-${ENV_BUILD_VERSION}'" \
|
||||
-ldflags "-w -s -extldflags \"-static\" -X 'github.com/fedor-git/wg-portal-2/internal/server.Version=${ENV_BUILD_IDENTIFIER}-${ENV_BUILD_VERSION}'" \
|
||||
-tags netgo \
|
||||
cmd/wg-portal/main.go
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ build-arm64: build-dependencies
|
|||
.PHONY: build-arm
|
||||
build-arm: build-dependencies
|
||||
CGO_ENABLED=0 CC=arm-linux-gnueabi-gcc GOOS=linux GOARCH=arm GOARM=7 $(GOCMD) build -o $(BUILDDIR)/wg-portal-arm \
|
||||
-ldflags "-w -s -extldflags \"-static\" -X 'github.com/h44z/wg-portal/internal/server.Version=${ENV_BUILD_IDENTIFIER}-${ENV_BUILD_VERSION}'" \
|
||||
-ldflags "-w -s -extldflags \"-static\" -X 'github.com/fedor-git/wg-portal-2/internal/server.Version=${ENV_BUILD_IDENTIFIER}-${ENV_BUILD_VERSION}'" \
|
||||
-tags netgo \
|
||||
cmd/wg-portal/main.go
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ build-docker:
|
|||
docker build --progress=plain \
|
||||
--build-arg BUILD_IDENTIFIER=${ENV_BUILD_IDENTIFIER} --build-arg BUILD_VERSION=${ENV_BUILD_VERSION} \
|
||||
--build-arg TARGETPLATFORM=unknown . \
|
||||
-t h44z/wg-portal:local
|
||||
-t fedor-git/wg-portal-2:local
|
||||
|
||||
#< helm-docs: Generate the helm chart documentation
|
||||
.PHONY: helm-docs
|
||||
|
|
|
|||
14
README.md
14
README.md
|
|
@ -1,12 +1,12 @@
|
|||
# WireGuard Portal v2
|
||||
|
||||
[](https://github.com/h44z/wg-portal/actions/workflows/docker-publish.yml)
|
||||
[](https://github.com/fedor-git/wg-portal-2/actions/workflows/docker-publish.yml)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||

|
||||
[](https://goreportcard.com/report/github.com/h44z/wg-portal)
|
||||

|
||||

|
||||
[](https://hub.docker.com/r/wgportal/wg-portal/)
|
||||

|
||||
[](https://goreportcard.com/report/github.com/fedor-git/wg-portal-2)
|
||||

|
||||

|
||||
[](https://hub.docker.com/r/wgportal/wg-portal/)
|
||||
|
||||
## Introduction
|
||||
<!-- Text from this line # is included in docs/documentation/overview.md -->
|
||||
|
|
@ -65,4 +65,4 @@ For the complete documentation visit [wgportal.org](https://wgportal.org).
|
|||
|
||||
> [!IMPORTANT]
|
||||
> Since the project was accepted by the Docker-Sponsored Open Source Program, the Docker image location has moved to [wgportal/wg-portal](https://hub.docker.com/r/wgportal/wg-portal).
|
||||
> Please update the Docker image from **h44z/wg-portal** to **wgportal/wg-portal**.
|
||||
> Please update the Docker image from **fedor-git/wg-portal-2** to **wgportal/wg-portal**.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ If you believe you've found a security issue in one of the supported versions of
|
|||
|
||||
Please do not report security vulnerabilities through public GitHub issues.
|
||||
|
||||
Instead, we encourage you to submit a report through GitHub [private vulnerability reporting](https://github.com/h44z/wg-portal/security).
|
||||
Instead, we encourage you to submit a report through GitHub [private vulnerability reporting](https://github.com/fedor-git/wg-portal-2/security).
|
||||
If you prefer to submit a report without logging in to GitHub, please email *info (at) wgportal.org*.
|
||||
We will respond as soon as possible, but as only two people currently maintain this project, we cannot guarantee specific response times.
|
||||
|
||||
|
|
|
|||
|
|
@ -11,23 +11,23 @@ import (
|
|||
evbus "github.com/vardius/message-bus"
|
||||
"gorm.io/gorm/schema"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/adapters"
|
||||
"github.com/h44z/wg-portal/internal/app"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core"
|
||||
backendV0 "github.com/h44z/wg-portal/internal/app/api/v0/backend"
|
||||
handlersV0 "github.com/h44z/wg-portal/internal/app/api/v0/handlers"
|
||||
backendV1 "github.com/h44z/wg-portal/internal/app/api/v1/backend"
|
||||
handlersV1 "github.com/h44z/wg-portal/internal/app/api/v1/handlers"
|
||||
"github.com/h44z/wg-portal/internal/app/audit"
|
||||
"github.com/h44z/wg-portal/internal/app/auth"
|
||||
"github.com/h44z/wg-portal/internal/app/configfile"
|
||||
"github.com/h44z/wg-portal/internal/app/mail"
|
||||
"github.com/h44z/wg-portal/internal/app/route"
|
||||
"github.com/h44z/wg-portal/internal/app/users"
|
||||
"github.com/h44z/wg-portal/internal/app/webhooks"
|
||||
"github.com/h44z/wg-portal/internal/app/wireguard"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/adapters"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core"
|
||||
backendV0 "github.com/fedor-git/wg-portal-2/internal/app/api/v0/backend"
|
||||
handlersV0 "github.com/fedor-git/wg-portal-2/internal/app/api/v0/handlers"
|
||||
backendV1 "github.com/fedor-git/wg-portal-2/internal/app/api/v1/backend"
|
||||
handlersV1 "github.com/fedor-git/wg-portal-2/internal/app/api/v1/handlers"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/audit"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/auth"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/configfile"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/mail"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/route"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/users"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/webhooks"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/wireguard"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
)
|
||||
|
||||
// main entry point for WireGuard Portal
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ type: application
|
|||
home: https://wgportal.org
|
||||
icon: https://wgportal.org/latest/assets/images/logo.svg
|
||||
sources:
|
||||
- https://github.com/h44z/wg-portal
|
||||
- https://github.com/fedor-git/wg-portal-2
|
||||
|
||||
annotations:
|
||||
artifacthub.io/category: networking
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ WireGuard Configuration Portal with LDAP, OAuth, OIDC authentication
|
|||
|
||||
## Source Code
|
||||
|
||||
* <https://github.com/h44z/wg-portal>
|
||||
* <https://github.com/fedor-git/wg-portal-2>
|
||||
|
||||
## Requirements
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ The [Values](#values) section lists the parameters that can be configured during
|
|||
| revisionHistoryLimit | string | `10` | The number of old ReplicaSets to retain to allow rollback. |
|
||||
| workloadType | string | `"Deployment"` | Workload type - `Deployment` or `StatefulSet` |
|
||||
| strategy | object | `{"type":"RollingUpdate"}` | Update strategy for the workload Valid values are: `RollingUpdate` or `Recreate` for Deployment, `RollingUpdate` or `OnDelete` for StatefulSet |
|
||||
| image.repository | string | `"ghcr.io/h44z/wg-portal"` | Image repository |
|
||||
| image.repository | string | `"ghcr.io/fedor-git/wg-portal-2"` | Image repository |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
|
||||
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion |
|
||||
| imagePullSecrets | list | `[]` | Image pull secrets |
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ strategy:
|
|||
|
||||
image:
|
||||
# -- Image repository
|
||||
repository: ghcr.io/h44z/wg-portal
|
||||
repository: ghcr.io/fedor-git/wg-portal-2
|
||||
# -- Image pull policy
|
||||
pullPolicy: IfNotPresent
|
||||
# -- Overrides the image tag whose default is the chart appVersion
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Starting from v2, each [release](https://github.com/h44z/wg-portal/releases) includes compiled binaries for supported platforms.
|
||||
Starting from v2, each [release](https://github.com/fedor-git/wg-portal-2/releases) includes compiled binaries for supported platforms.
|
||||
These binary versions can be manually downloaded and installed.
|
||||
|
||||
## Download
|
||||
|
|
@ -12,19 +12,19 @@ Make sure that you download the correct binary for your architecture. The availa
|
|||
With `curl`:
|
||||
|
||||
```shell
|
||||
curl -L -o wg-portal https://github.com/h44z/wg-portal/releases/download/${WG_PORTAL_VERSION}/wg-portal_linux_amd64
|
||||
curl -L -o wg-portal https://github.com/fedor-git/wg-portal-2/releases/download/${WG_PORTAL_VERSION}/wg-portal_linux_amd64
|
||||
```
|
||||
|
||||
With `wget`:
|
||||
|
||||
```shell
|
||||
wget -O wg-portal https://github.com/h44z/wg-portal/releases/download/${WG_PORTAL_VERSION}/wg-portal_linux_amd64
|
||||
wget -O wg-portal https://github.com/fedor-git/wg-portal-2/releases/download/${WG_PORTAL_VERSION}/wg-portal_linux_amd64
|
||||
```
|
||||
|
||||
with `gh cli`:
|
||||
|
||||
```shell
|
||||
gh release download ${WG_PORTAL_VERSION} --repo h44z/wg-portal --output wg-portal --pattern '*amd64'
|
||||
gh release download ${WG_PORTAL_VERSION} --repo fedor-git/wg-portal-2 --output wg-portal --pattern '*amd64'
|
||||
```
|
||||
|
||||
|
||||
|
|
@ -38,5 +38,5 @@ sudo install wg-portal /opt/wg-portal/
|
|||
|
||||
## Unreleased versions (master branch builds)
|
||||
|
||||
Unreleased versions can be fetched directly from the artifacts section of the [GitHub Workflow](https://github.com/h44z/wg-portal/actions/workflows/docker-publish.yml?query=branch%3Amaster).
|
||||
Unreleased versions can be fetched directly from the artifacts section of the [GitHub Workflow](https://github.com/fedor-git/wg-portal-2/actions/workflows/docker-publish.yml?query=branch%3Amaster).
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
## Image Usage
|
||||
|
||||
The WireGuard Portal Docker image is available on both [Docker Hub](https://hub.docker.com/r/wgportal/wg-portal) and [GitHub Container Registry](https://github.com/h44z/wg-portal/pkgs/container/wg-portal).
|
||||
The WireGuard Portal Docker image is available on both [Docker Hub](https://hub.docker.com/r/wgportal/wg-portal) and [GitHub Container Registry](https://github.com/fedor-git/wg-portal-2/pkgs/container/wg-portal).
|
||||
It is built on the official Alpine Linux base image and comes pre-packaged with all necessary WireGuard dependencies.
|
||||
|
||||
This container allows you to establish WireGuard VPN connections without relying on a host system that supports WireGuard or using the `linuxserver/wireguard` Docker image.
|
||||
|
|
@ -109,7 +109,7 @@ WireGuard Portal supports managing WireGuard interfaces through three distinct d
|
|||
|
||||
## Image Versioning
|
||||
|
||||
All images are hosted on Docker Hub at [https://hub.docker.com/r/wgportal/wg-portal](https://hub.docker.com/r/wgportal/wg-portal) or in the [GitHub Container Registry](https://github.com/h44z/wg-portal/pkgs/container/wg-portal).
|
||||
All images are hosted on Docker Hub at [https://hub.docker.com/r/wgportal/wg-portal](https://hub.docker.com/r/wgportal/wg-portal) or in the [GitHub Container Registry](https://github.com/fedor-git/wg-portal-2/pkgs/container/wg-portal).
|
||||
|
||||
Version **2** is the current stable release. Version **1** has moved to legacy status and is no longer recommended.
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ There are different types of these tags:
|
|||
|
||||
- Major version tags: `v2` or `2`. These tags always refer to the latest image for WireGuard Portal version **2**.
|
||||
- Minor version tags: `v2.x` or `2.0`. These tags always refer to the latest image for WireGuard Portal version **2.x**.
|
||||
- Specific version tags (patch version): `v2.0.0` or `2.0.0`. These tags denote a very specific release. They correspond to the GitHub tags that we make, and you can see the release notes for them here: [https://github.com/h44z/wg-portal/releases](https://github.com/h44z/wg-portal/releases). Once these tags for a specific version show up in the Docker repository, they will never change.
|
||||
- Specific version tags (patch version): `v2.0.0` or `2.0.0`. These tags denote a very specific release. They correspond to the GitHub tags that we make, and you can see the release notes for them here: [https://github.com/fedor-git/wg-portal-2/releases](https://github.com/fedor-git/wg-portal-2/releases). Once these tags for a specific version show up in the Docker repository, they will never change.
|
||||
|
||||
#### The `latest` tag
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ To build the application from source files, use the Makefile provided in the rep
|
|||
|
||||
```shell
|
||||
# Get source code
|
||||
git clone https://github.com/h44z/wg-portal -b ${WG_PORTAL_VERSION:-master} --depth 1
|
||||
git clone https://github.com/fedor-git/wg-portal-2 -b ${WG_PORTAL_VERSION:-master} --depth 1
|
||||
cd wg-portal
|
||||
# Build the frontend
|
||||
make frontend
|
||||
|
|
|
|||
|
|
@ -27,6 +27,6 @@ scrape_configs:
|
|||
|
||||
# Grafana Dashboard
|
||||
|
||||
You may import [`dashboard.json`](https://github.com/h44z/wg-portal/blob/master/deploy/helm/files/dashboard.json) into your Grafana instance.
|
||||
You may import [`dashboard.json`](https://github.com/fedor-git/wg-portal-2/blob/master/deploy/helm/files/dashboard.json) into your Grafana instance.
|
||||
|
||||

|
||||
|
|
|
|||
|
|
@ -580,14 +580,14 @@ definitions:
|
|||
info:
|
||||
contact:
|
||||
name: WireGuard Portal Project
|
||||
url: https://github.com/h44z/wg-portal
|
||||
url: https://github.com/fedor-git/wg-portal-2
|
||||
description: |-
|
||||
The WireGuard Portal REST API enables efficient management of WireGuard VPN configurations through a set of JSON-based endpoints.
|
||||
It supports creating and editing peers, interfaces, and user profiles, while also providing role-based access control and auditing.
|
||||
This API allows seamless integration with external tools or scripts for automated network configuration and administration.
|
||||
license:
|
||||
name: MIT
|
||||
url: https://github.com/h44z/wg-portal/blob/master/LICENSE.txt
|
||||
url: https://github.com/fedor-git/wg-portal-2/blob/master/LICENSE.txt
|
||||
title: WireGuard Portal Public API
|
||||
version: "1.0"
|
||||
paths:
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,4 +1,4 @@
|
|||
module github.com/h44z/wg-portal
|
||||
module github.com/fedor-git/wg-portal-2
|
||||
|
||||
go 1.24.0
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ import (
|
|||
"gorm.io/gorm/logger"
|
||||
"gorm.io/gorm/utils"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// SchemaVersion describes the current database schema version. It must be incremented if a manual migration is needed.
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ import (
|
|||
|
||||
mail "github.com/xhit/go-simple-mail/v2"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type MailRepo struct {
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import (
|
|||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type MetricsServer struct {
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ import (
|
|||
"golang.zx2c4.com/wireguard/wgctrl"
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/h44z/wg-portal/internal/lowlevel"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/lowlevel"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import (
|
|||
|
||||
"log/slog"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/h44z/wg-portal/internal/lowlevel"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/lowlevel"
|
||||
)
|
||||
|
||||
type MikrotikController struct {
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import (
|
|||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// WgQuickRepo implements higher level wg-quick like interactions like setting DNS, routing tables or interface hooks.
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import (
|
|||
"golang.zx2c4.com/wireguard/wgctrl"
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/h44z/wg-portal/internal/lowlevel"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/lowlevel"
|
||||
)
|
||||
|
||||
// WgRepo implements all low-level WireGuard interactions.
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// setup WireGuard manager with no linked store
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"title": "WireGuard Portal SPA-UI API",
|
||||
"contact": {
|
||||
"name": "WireGuard Portal Developers",
|
||||
"url": "https://github.com/h44z/wg-portal"
|
||||
"url": "https://github.com/fedor-git/wg-portal-2"
|
||||
},
|
||||
"version": "0.0"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -456,7 +456,7 @@ definitions:
|
|||
info:
|
||||
contact:
|
||||
name: WireGuard Portal Developers
|
||||
url: https://github.com/h44z/wg-portal
|
||||
url: https://github.com/fedor-git/wg-portal-2
|
||||
description: WireGuard Portal API - UI Endpoints
|
||||
title: WireGuard Portal SPA-UI API
|
||||
version: "0.0"
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
"title": "WireGuard Portal Public API",
|
||||
"contact": {
|
||||
"name": "WireGuard Portal Project",
|
||||
"url": "https://github.com/h44z/wg-portal"
|
||||
"url": "https://github.com/fedor-git/wg-portal-2"
|
||||
},
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "https://github.com/h44z/wg-portal/blob/master/LICENSE.txt"
|
||||
"url": "https://github.com/fedor-git/wg-portal-2/blob/master/LICENSE.txt"
|
||||
},
|
||||
"version": "1.0"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -636,14 +636,14 @@ definitions:
|
|||
info:
|
||||
contact:
|
||||
name: WireGuard Portal Project
|
||||
url: https://github.com/h44z/wg-portal
|
||||
url: https://github.com/fedor-git/wg-portal-2
|
||||
description: |-
|
||||
The WireGuard Portal REST API enables efficient management of WireGuard VPN configurations through a set of JSON-based endpoints.
|
||||
It supports creating and editing peers, interfaces, and user profiles, while also providing role-based access control and auditing.
|
||||
This API allows seamless integration with external tools or scripts for automated network configuration and administration.
|
||||
license:
|
||||
name: MIT
|
||||
url: https://github.com/h44z/wg-portal/blob/master/LICENSE.txt
|
||||
url: https://github.com/fedor-git/wg-portal-2/blob/master/LICENSE.txt
|
||||
title: WireGuard Portal Public API
|
||||
version: "1.0"
|
||||
paths:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/request"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/request"
|
||||
)
|
||||
|
||||
func TestMiddleware_Handler(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/middleware/cors"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/middleware/logging"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/middleware/recovery"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/middleware/tracing"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/middleware/cors"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/middleware/logging"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/middleware/recovery"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/middleware/tracing"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"io"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"io"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package backend
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/middleware/cors"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/middleware/csrf"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/middleware/cors"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/middleware/csrf"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
)
|
||||
|
||||
type SessionMiddleware interface {
|
||||
|
|
@ -45,7 +45,7 @@ type Handler interface {
|
|||
// @description WireGuard Portal API - UI Endpoints
|
||||
|
||||
// @contact.name WireGuard Portal Developers
|
||||
// @contact.url https://github.com/h44z/wg-portal
|
||||
// @contact.url https://github.com/fedor-git/wg-portal-2
|
||||
|
||||
// @BasePath /api/v0
|
||||
// @query.collection.format multi
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v0/model"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v0/model"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type AuditService interface {
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/request"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v0/model"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/request"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v0/model"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type AuthenticationService interface {
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/request"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v0/model"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/request"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v0/model"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
//go:embed frontend_config.js.gotpl
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/request"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v0/model"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/request"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v0/model"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type InterfaceService interface {
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/request"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v0/model"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/request"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v0/model"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type PeerService interface {
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v0/model"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v0/model"
|
||||
)
|
||||
|
||||
type TestEndpoint struct {
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/request"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v0/model"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/request"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v0/model"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type UserService interface {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
package models
|
||||
|
||||
import (
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type ConfigOption[T any] struct {
|
||||
Value T `json:"Value"`
|
||||
Overridable bool `json:"Overridable,omitempty"`
|
||||
}
|
||||
|
||||
func ConfigOptionFromDomain[T any](opt domain.ConfigOption[T]) ConfigOption[T] {
|
||||
return ConfigOption[T]{
|
||||
Value: opt.Value,
|
||||
Overridable: opt.Overridable,
|
||||
}
|
||||
}
|
||||
|
||||
func ConfigOptionToDomain[T any](opt ConfigOption[T]) domain.ConfigOption[T] {
|
||||
return domain.ConfigOption[T]{
|
||||
Value: opt.Value,
|
||||
Overridable: opt.Overridable,
|
||||
}
|
||||
}
|
||||
|
||||
func StringSliceConfigOptionFromDomain(opt domain.ConfigOption[string]) ConfigOption[[]string] {
|
||||
return ConfigOption[[]string]{
|
||||
Value: internal.SliceString(opt.Value),
|
||||
Overridable: opt.Overridable,
|
||||
}
|
||||
}
|
||||
|
||||
func StringSliceConfigOptionToDomain(opt ConfigOption[[]string]) domain.ConfigOption[string] {
|
||||
return domain.ConfigOption[string]{
|
||||
Value: internal.SliceToString(opt.Value),
|
||||
Overridable: opt.Overridable,
|
||||
}
|
||||
}
|
||||
|
|
@ -4,10 +4,10 @@ import (
|
|||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/request"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v0/model"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/request"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v0/model"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type Scope string
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/alexedwards/scs/v2"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type ConfigOption[T any] struct {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package model
|
||||
|
||||
import (
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type AuditEntry struct {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type LoginProviderInfo struct {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ package model
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type Interface struct {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package model
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
const ExpiryDateTimeLayout = "\"2006-01-02\""
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package model
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type InterfaceServiceInterfaceManagerRepo interface {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type MetricsServiceDatabaseRepo interface {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type PeerServicePeerManagerRepo interface {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/v1/models"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v1/models"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type ProvisioningServiceUserManagerRepo interface {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type UserManagerRepo interface {
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/middleware/cors"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v1/models"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/middleware/cors"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v1/models"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type Handler interface {
|
||||
|
|
@ -30,10 +30,10 @@ type Handler interface {
|
|||
// @description This API allows seamless integration with external tools or scripts for automated network configuration and administration.
|
||||
|
||||
// @license.name MIT
|
||||
// @license.url https://github.com/h44z/wg-portal/blob/master/LICENSE.txt
|
||||
// @license.url https://github.com/fedor-git/wg-portal-2/blob/master/LICENSE.txt
|
||||
|
||||
// @contact.name WireGuard Portal Project
|
||||
// @contact.url https://github.com/h44z/wg-portal
|
||||
// @contact.url https://github.com/fedor-git/wg-portal-2
|
||||
|
||||
// @securityDefinitions.basic BasicAuth
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/request"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v1/models"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/request"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v1/models"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type InterfaceEndpointInterfaceService interface {
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/request"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v1/models"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/request"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v1/models"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type MetricsEndpointStatisticsService interface {
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/request"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v1/models"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/request"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v1/models"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type PeerService interface {
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/request"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v1/models"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/request"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v1/models"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type ProvisioningEndpointProvisioningService interface {
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import (
|
|||
|
||||
"github.com/go-pkgz/routegroup"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/request"
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v1/models"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/request"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v1/models"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type UserService interface {
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import (
|
|||
"context"
|
||||
"net/http"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app/api/core/respond"
|
||||
"github.com/h44z/wg-portal/internal/app/api/v0/model"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/core/respond"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/api/v0/model"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type Scope string
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package models
|
||||
|
||||
import (
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type ConfigOption[T any] struct {
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package models
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// Interface represents a WireGuard interface.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package models
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// PeerMetrics represents the metrics of a WireGuard peer.
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package models
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
const ExpiryDateTimeLayout = "2006-01-02"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package models
|
||||
|
||||
import "github.com/h44z/wg-portal/internal/domain"
|
||||
import "github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
|
||||
// UserInformation represents the information about a user and its linked peers.
|
||||
type UserInformation struct {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package models
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// User represents a user in the system.
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import (
|
|||
"log/slog"
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type ManagerDatabaseRepo interface {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package audit
|
||||
|
||||
import "github.com/h44z/wg-portal/internal/domain"
|
||||
import "github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
|
||||
type AuthEvent struct {
|
||||
Username string
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import (
|
|||
"log/slog"
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ import (
|
|||
"github.com/coreos/go-oidc/v3/oidc"
|
||||
"golang.org/x/oauth2"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app"
|
||||
"github.com/h44z/wg-portal/internal/app/audit"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/audit"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import (
|
|||
|
||||
"github.com/go-ldap/ldap/v3"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// LdapAuthenticator is an authenticator that uses LDAP for authentication.
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import (
|
|||
|
||||
"golang.org/x/oauth2"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// PlainOauthAuthenticator is an authenticator that uses OAuth for authentication.
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import (
|
|||
"github.com/coreos/go-oidc/v3/oidc"
|
||||
"golang.org/x/oauth2"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// OidcAuthenticator is an authenticator for OpenID Connect providers.
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ package auth
|
|||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// parseOauthUserInfo parses the raw user info from the oauth provider and maps it to the internal user info struct
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
)
|
||||
|
||||
func Test_parseOauthUserInfo_no_admin(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ import (
|
|||
"github.com/go-webauthn/webauthn/protocol"
|
||||
"github.com/go-webauthn/webauthn/webauthn"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app"
|
||||
"github.com/h44z/wg-portal/internal/app/audit"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/audit"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type WebAuthnUserManager interface {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"gorm.io/gorm"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
)
|
||||
|
||||
// HandleProgramArgs handles program arguments and returns true if the program should exit.
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ import (
|
|||
"github.com/yeqown/go-qrcode/v2"
|
||||
"github.com/yeqown/go-qrcode/writer/compressed"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import (
|
|||
"io"
|
||||
"text/template"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
//go:embed tpl_files/*
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
"gorm.io/gorm/schema"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// GormEncryptedStringSerializer is a GORM serializer that encrypts and decrypts string values using AES256.
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"io"
|
||||
"log/slog"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"io"
|
||||
"text/template"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
//go:embed tpl_files/*
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import (
|
|||
|
||||
"gorm.io/gorm"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/adapters"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/adapters"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
func migrateFromV1(db *gorm.DB, source, typ string) error {
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import (
|
|||
"golang.zx2c4.com/wireguard/wgctrl"
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/h44z/wg-portal/internal/lowlevel"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/lowlevel"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import (
|
|||
|
||||
"github.com/go-ldap/ldap/v3"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
func convertRawLdapUser(
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ import (
|
|||
"github.com/go-ldap/ldap/v3"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/h44z/wg-portal/internal"
|
||||
"github.com/h44z/wg-portal/internal/app"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ import (
|
|||
"log/slog"
|
||||
"net/http"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app"
|
||||
"github.com/h44z/wg-portal/internal/app/webhooks/models"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app/webhooks/models"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package models
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// Interface represents an interface model for webhooks. For details about the fields, see the domain.Interface struct.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package models
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// Peer represents a peer model for webhooks. For details about the fields, see the domain.Peer struct.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package models
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// PeerMetrics represents a peer metrics model for webhooks.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package models
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// User represents a user model for webhooks. For details about the fields, see the domain.User struct.
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import (
|
|||
"maps"
|
||||
"slices"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/adapters/wgcontroller"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/adapters/wgcontroller"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type InterfaceController interface {
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
type StatisticsDatabaseRepo interface {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
func Test_getSessionStartTime(t *testing.T) {
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/h44z/wg-portal/internal/app"
|
||||
"github.com/h44z/wg-portal/internal/config"
|
||||
"github.com/h44z/wg-portal/internal/domain"
|
||||
"github.com/fedor-git/wg-portal-2/internal/app"
|
||||
"github.com/fedor-git/wg-portal-2/internal/config"
|
||||
"github.com/fedor-git/wg-portal-2/internal/domain"
|
||||
)
|
||||
|
||||
// region dependencies
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue