refactor for git.ptzo.gdn (#162)

Reviewed-on: https://git.ptzo.gdn/feditools/relay/pulls/162
Co-authored-by: Tyr Mactire <tyr@pettingzoo.co>
Co-committed-by: Tyr Mactire <tyr@pettingzoo.co>
This commit is contained in:
Tyr Mactire 2022-11-26 23:53:11 +00:00 committed by PettingZoo Gitea
parent 1ad1b55cb3
commit 1608ce9df1
No known key found for this signature in database
GPG Key ID: 39788A4390A1372F
173 changed files with 391 additions and 388 deletions

View File

@ -18,14 +18,21 @@ builds:
goarch:
- amd64
- arm64
- riscv64
goos:
- linux
- darwin
goamd64:
- v1
- v2
- v3
mod_timestamp: "{{ .CommitTimestamp }}"
universal_binaries:
- replace: true
archives:
- replacements:
- format: tar.gz
format_overrides:
- goos: windows
format: zip
replacements:
darwin: Darwin
linux: Linux
windows: Windows
@ -80,10 +87,10 @@ docker_manifests:
image_templates:
- feditools/{{ .ProjectName }}:latest-amd64
- feditools/{{ .ProjectName }}:latest-arm64v8
docker_signs:
- artifacts: all
args: ["sign", "--key=env://COSIGN_PRIVATE_KEY", "${artifact}"]
stdin: '{{ .Env.COSIGN_PASSWORD }}'
#docker_signs:
# - artifacts: all
# args: ["sign", "--key=env://COSIGN_PRIVATE_KEY", "${artifact}"]
# stdin: '{{ .Env.COSIGN_PASSWORD }}'
snapshot:
name_template: "{{ incpatch .Version }}-dev"
changelog:
@ -92,3 +99,6 @@ changelog:
exclude:
- '^docs:'
- '^deployments:'
gitea_urls:
api: https://git.ptzo.gdn/api/v1/
download: https://git.ptzo.gdn

41
Jenkinsfile vendored
View File

@ -1,35 +1,18 @@
pipeline {
environment {
BUILD_IMAGE = 'gobuild:1.18'
BUILD_ARGS = '-e GOCACHE=/gocache -e HOME=${WORKSPACE} -v /var/lib/jenkins/gocache:/gocache -v /var/lib/jenkins/go/pkg:/go/pkg'
BUILD_IMAGE = 'gobuild:1.19'
BUILD_ARGS = '-e HOME=${WORKSPACE} -v /var/lib/jenkins/go/pkg:/go/pkg'
PATH = '/go/bin:~/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/go/bin'
composeFile = "deployments/docker-compose-integration.yaml"
networkName = "network-${env.BUILD_TAG}"
registryCredential = 'docker-io-feditools'
scannerHome = tool 'SonarScanner 4.0'
}
agent any
stages {
stage('Build Static Assets') {
agent {
docker {
image "${BUILD_IMAGE}"
args "${BUILD_ARGS}"
reuseNode true
}
}
steps {
script {
sh """#!/bin/bash
make clean
make stage-static
"""
}
}
}
stage('Start External Test Requirements'){
steps{
script{
@ -60,21 +43,23 @@ pipeline {
steps {
script {
withCredentials([
string(credentialsId: 'codecov-feditools-relay', variable: 'CODECOV_TOKEN'),
file(credentialsId: 'tls-localhost-crt', variable: 'MB_TLS_CERT'),
file(credentialsId: 'tls-localhost-key', variable: 'MB_TLS_KEY')
]) {
sh """#!/bin/bash
go test --tags=postgres -race -coverprofile=coverage.txt -covermode=atomic ./...
RESULT=\$?
bash <(curl -s https://codecov.io/bash)
exit \$RESULT
"""
sh "go test --tags=postgres -race -json -coverprofile=coverage.out -covermode=atomic ./... > test-report.out"
}
}
}
}
stage('SonarQube analysis') {
steps {
withSonarQubeEnv('PupHaus') {
sh "${scannerHome}/bin/sonar-scanner"
}
}
}
stage('Build Snapshot') {
agent {
docker {
@ -85,7 +70,7 @@ pipeline {
}
steps {
script {
sh '/go/bin/goreleaser build --snapshot'
sh '/go/bin/goreleaser build --rm-dist --snapshot'
}
}
}

View File

@ -1,4 +1,5 @@
PROJECT_NAME=relay
GITHUB_TOKEN=
.DEFAULT_GOAL := test
@ -6,11 +7,6 @@ build-snapshot: export GPG_FINGERPRINT=922248E5D4629F2284964DB103B64DFCECF2BE40
build-snapshot: clean
goreleaser release --snapshot
bun-new-migration: export BUN_TIMESTAMP=$(shell date +%Y%m%d%H%M%S | head -c 14)
bun-new-migration:
touch internal/db/bun/migrations/${BUN_TIMESTAMP}_new.go
cat internal/db/bun/migrations/migration.go.tmpl > internal/db/bun/migrations/${BUN_TIMESTAMP}_new.go
clean:
@echo cleaning up workspace
@rm -Rvf .cache coverage.txt dist relay
@ -34,6 +30,11 @@ fmt:
i18n-extract:
goi18n extract -format yaml -outdir web/locales -crowdin
new-migration: export BUN_TIMESTAMP=$(shell date +%Y%m%d%H%M%S | head -c 14)
new-migration:
touch internal/db/bun/migrations/${BUN_TIMESTAMP}_new.go
cat internal/db/bun/migrations/migration.go.tmpl > internal/db/bun/migrations/${BUN_TIMESTAMP}_new.go
release: clean
goreleaser release
@ -52,4 +53,4 @@ tidy:
vendor: tidy
go mod vendor
.PHONY: build-snapshot bun-new-migration clean docker-pull docker-restart docker-start docker-stop fmt i18n-extract release stage-static test test-ext test-bench-ext tidy vendor
.PHONY: build-snapshot clean docker-pull docker-restart docker-start docker-stop fmt i18n-extract new-migration release stage-static test test-ext test-bench-ext tidy vendor

View File

@ -1,9 +1,9 @@
package main
import (
"github.com/feditools/relay/cmd/relay/action/account"
"github.com/feditools/relay/cmd/relay/flag"
"github.com/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/cmd/relay/action/account"
"git.ptzo.gdn/feditools/relay/cmd/relay/flag"
"git.ptzo.gdn/feditools/relay/internal/config"
"github.com/spf13/cobra"
)

View File

@ -1,6 +1,6 @@
package account
import "github.com/feditools/relay/internal/log"
import "git.ptzo.gdn/feditools/relay/internal/log"
type empty struct{}

View File

@ -3,9 +3,9 @@ package account
import (
"context"
"github.com/feditools/go-lib"
"github.com/feditools/relay/cmd/relay/action"
"github.com/feditools/relay/internal/config"
"github.com/feditools/relay/internal/db/bun"
"git.ptzo.gdn/feditools/relay/cmd/relay/action"
"git.ptzo.gdn/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/db/bun"
"github.com/spf13/viper"
)

View File

@ -1,7 +1,7 @@
package database
import (
"github.com/feditools/relay/internal/log"
"git.ptzo.gdn/feditools/relay/internal/log"
)
type empty struct{}

View File

@ -2,8 +2,8 @@ package database
import (
"context"
"github.com/feditools/relay/cmd/relay/action"
"github.com/feditools/relay/internal/db/bun"
"git.ptzo.gdn/feditools/relay/cmd/relay/action"
"git.ptzo.gdn/feditools/relay/internal/db/bun"
)
// Migrate runs database migrations

View File

@ -3,17 +3,17 @@ package server
import (
"context"
"github.com/feditools/go-lib"
"github.com/feditools/relay/internal/config"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/fedi"
"github.com/feditools/relay/internal/http"
"github.com/feditools/relay/internal/http/activitypub"
"github.com/feditools/relay/internal/http/robots"
"github.com/feditools/relay/internal/http/webapp"
liblanguage "github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/logic"
"github.com/feditools/relay/internal/runner"
"github.com/feditools/relay/internal/token"
"git.ptzo.gdn/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/fedi"
"git.ptzo.gdn/feditools/relay/internal/http"
"git.ptzo.gdn/feditools/relay/internal/http/activitypub"
"git.ptzo.gdn/feditools/relay/internal/http/robots"
"git.ptzo.gdn/feditools/relay/internal/http/webapp"
liblanguage "git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/logic"
"git.ptzo.gdn/feditools/relay/internal/runner"
"git.ptzo.gdn/feditools/relay/internal/token"
"github.com/go-redis/redis/v8"
"github.com/spf13/viper"
)

View File

@ -1,7 +1,7 @@
package server
import (
"github.com/feditools/relay/internal/log"
"git.ptzo.gdn/feditools/relay/internal/log"
)
type empty struct{}

View File

@ -1,9 +1,9 @@
package server
import (
"github.com/feditools/relay/internal/logic"
"github.com/feditools/relay/internal/notification/manager"
"github.com/feditools/relay/internal/notification/telegram"
"git.ptzo.gdn/feditools/relay/internal/logic"
"git.ptzo.gdn/feditools/relay/internal/notification/manager"
"git.ptzo.gdn/feditools/relay/internal/notification/telegram"
)
func newNotifier(

View File

@ -4,20 +4,20 @@ import (
"context"
"errors"
"fmt"
"github.com/feditools/relay/cmd/relay/action"
"github.com/feditools/relay/internal/clock"
"github.com/feditools/relay/internal/config"
"github.com/feditools/relay/internal/db/bun"
"github.com/feditools/relay/internal/db/cachemem"
"github.com/feditools/relay/internal/fedi"
"github.com/feditools/relay/internal/http"
"github.com/feditools/relay/internal/kv/redis"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/logic/logic1"
"github.com/feditools/relay/internal/metrics"
"github.com/feditools/relay/internal/runner/faktory"
"github.com/feditools/relay/internal/scheduler"
"github.com/feditools/relay/internal/token"
"git.ptzo.gdn/feditools/relay/cmd/relay/action"
"git.ptzo.gdn/feditools/relay/internal/clock"
"git.ptzo.gdn/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/db/bun"
"git.ptzo.gdn/feditools/relay/internal/db/cachemem"
"git.ptzo.gdn/feditools/relay/internal/fedi"
"git.ptzo.gdn/feditools/relay/internal/http"
"git.ptzo.gdn/feditools/relay/internal/kv/redis"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/logic/logic1"
"git.ptzo.gdn/feditools/relay/internal/metrics"
"git.ptzo.gdn/feditools/relay/internal/runner/faktory"
"git.ptzo.gdn/feditools/relay/internal/scheduler"
"git.ptzo.gdn/feditools/relay/internal/token"
"github.com/spf13/viper"
"github.com/uptrace/uptrace-go/uptrace"
"os"

View File

@ -1,9 +1,9 @@
package main
import (
"github.com/feditools/relay/cmd/relay/action/database"
"github.com/feditools/relay/cmd/relay/flag"
"github.com/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/cmd/relay/action/database"
"git.ptzo.gdn/feditools/relay/cmd/relay/flag"
"git.ptzo.gdn/feditools/relay/internal/config"
"github.com/spf13/cobra"
)

View File

@ -1,7 +1,7 @@
package flag
import (
"github.com/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/config"
"github.com/spf13/cobra"
)

View File

@ -1,7 +1,7 @@
package flag
import (
"github.com/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/config"
"github.com/spf13/cobra"
)

View File

@ -1,7 +1,7 @@
package flag
import (
"github.com/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/config"
"github.com/spf13/cobra"
)

View File

@ -1,7 +1,7 @@
package flag
import (
"github.com/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/config"
"github.com/spf13/cobra"
)

View File

@ -1,7 +1,7 @@
package flag
import (
"github.com/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/config"
"github.com/spf13/cobra"
)

View File

@ -1,6 +1,6 @@
package flag
import "github.com/feditools/relay/internal/config"
import "git.ptzo.gdn/feditools/relay/internal/config"
var usage = config.KeyNames{
ConfigPath: "Path to a file containing feditools configuration. Values set in this file will be overwritten by values set as env vars or arguments",

View File

@ -1,7 +1,7 @@
package main
import (
"github.com/feditools/relay/internal/log"
"git.ptzo.gdn/feditools/relay/internal/log"
)
type empty struct{}

View File

@ -3,10 +3,10 @@ package main
import (
"context"
"fmt"
"github.com/feditools/relay/cmd/relay/action"
"github.com/feditools/relay/cmd/relay/flag"
"github.com/feditools/relay/internal/config"
"github.com/feditools/relay/internal/log"
"git.ptzo.gdn/feditools/relay/cmd/relay/action"
"git.ptzo.gdn/feditools/relay/cmd/relay/flag"
"git.ptzo.gdn/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)

View File

@ -1,9 +1,9 @@
package main
import (
"github.com/feditools/relay/cmd/relay/action/server"
"github.com/feditools/relay/cmd/relay/flag"
"github.com/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/cmd/relay/action/server"
"git.ptzo.gdn/feditools/relay/cmd/relay/flag"
"git.ptzo.gdn/feditools/relay/internal/config"
"github.com/spf13/cobra"
)

4
go.mod
View File

@ -1,6 +1,6 @@
module github.com/feditools/relay
module git.ptzo.gdn/feditools/relay
go 1.18
go 1.19
require (
github.com/allegro/bigcache/v3 v3.0.2

View File

@ -68,7 +68,7 @@ var Defaults = Values{
// application
ActorKeySize: 2048,
ApplicationName: "feditools-relay",
ApplicationWebsite: "https://github.com/feditools/relay",
ApplicationWebsite: "https://git.ptzo.gdn/feditools/relay",
CachedActivityLimit: 1024,
CachedActorLimit: 1024,
CachedDigestLimit: 1024,

View File

@ -2,7 +2,7 @@ package db
import (
"context"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
"time"
)

View File

@ -2,7 +2,7 @@ package db
import (
"context"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
)
type Block interface {

View File

@ -4,8 +4,8 @@ import (
"context"
"database/sql"
libdatabase "github.com/feditools/go-lib/database"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
"github.com/uptrace/bun"
"time"
)

View File

@ -3,8 +3,8 @@ package bun
import (
"context"
libdatabase "github.com/feditools/go-lib/database"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
"github.com/uptrace/bun"
"time"
)

View File

@ -8,8 +8,8 @@ import (
"encoding/pem"
"errors"
"fmt"
"github.com/feditools/relay/internal/config"
"github.com/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/db"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/stdlib"
"github.com/spf13/viper"

View File

@ -4,8 +4,8 @@ package bun
import (
"context"
"github.com/feditools/relay/internal/config"
"github.com/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/db"
"github.com/spf13/viper"
"testing"
)

View File

@ -5,8 +5,8 @@ import (
"crypto/tls"
"database/sql"
"fmt"
"github.com/feditools/relay/internal/config"
"github.com/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/db"
"github.com/jackc/pgconn"
"github.com/spf13/viper"
"testing"

View File

@ -2,8 +2,8 @@ package bun
import (
"context"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/db/bun/migrations"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/db/bun/migrations"
"github.com/uptrace/bun"
"github.com/uptrace/bun/migrate"
)

View File

@ -2,8 +2,8 @@ package bun
import (
"context"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
"github.com/uptrace/bun"
"time"
)

View File

@ -3,7 +3,7 @@ package bun
import (
"context"
"database/sql"
"github.com/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/db"
"github.com/google/uuid"
"github.com/uptrace/bun"
)

View File

@ -1,7 +1,7 @@
package bun
import (
"github.com/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/db"
"github.com/jackc/pgconn"
"modernc.org/sqlite"
sqlite3 "modernc.org/sqlite/lib"

View File

@ -4,8 +4,8 @@ import (
"context"
"fmt"
libdatabase "github.com/feditools/go-lib/database"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
"github.com/uptrace/bun"
"time"
)

View File

@ -3,8 +3,8 @@ package bun
import (
"context"
libdatabase "github.com/feditools/go-lib/database"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
"github.com/uptrace/bun"
"time"
)

View File

@ -1,7 +1,7 @@
package bun
import (
"github.com/feditools/relay/internal/log"
"git.ptzo.gdn/feditools/relay/internal/log"
)
type empty struct{}

View File

@ -2,7 +2,7 @@ package migrations
import (
"context"
models "github.com/feditools/relay/internal/db/bun/migrations/20220426162151_v0.1.0"
models "git.ptzo.gdn/feditools/relay/internal/db/bun/migrations/20220426162151_v0.1.0"
"github.com/uptrace/bun"
)

View File

@ -3,7 +3,7 @@ package migrations
import (
"context"
"fmt"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
"github.com/uptrace/bun"
"github.com/uptrace/bun/dialect/sqltype"
)

View File

@ -2,7 +2,7 @@ package migrations
import (
"context"
models "github.com/feditools/relay/internal/db/bun/migrations/20220806130729_v0.3.0"
models "git.ptzo.gdn/feditools/relay/internal/db/bun/migrations/20220806130729_v0.3.0"
"github.com/uptrace/bun"
)

View File

@ -3,7 +3,7 @@ package migrations
import (
"context"
"fmt"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
"github.com/uptrace/bun"
"github.com/uptrace/bun/dialect/sqltype"
"strings"

View File

@ -3,7 +3,7 @@ package migrations
import (
"context"
"fmt"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
"github.com/uptrace/bun"
"github.com/uptrace/bun/dialect/sqltype"
"strings"

View File

@ -1,7 +1,7 @@
package migrations
import (
"github.com/feditools/relay/internal/log"
"git.ptzo.gdn/feditools/relay/internal/log"
)
type empty struct{}

View File

@ -7,8 +7,8 @@ import (
"encoding/gob"
"errors"
"github.com/allegro/bigcache/v3"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
"strconv"
"strings"
"time"

View File

@ -2,8 +2,8 @@ package cachemem
import (
"context"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
)
func (c CacheMem) CountBlocks(ctx context.Context) (count int64, err db.Error) {

View File

@ -4,8 +4,8 @@ import (
"context"
"encoding/gob"
"github.com/allegro/bigcache/v3"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
"go.opentelemetry.io/otel"
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"
"go.opentelemetry.io/otel/trace"

View File

@ -2,8 +2,8 @@ package cachemem
import (
"context"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
)
func (c CacheMem) CreateConfigTX(ctx context.Context, txID db.TxID, configs ...*models.Config) (err db.Error) {

View File

@ -2,8 +2,8 @@ package cachemem
import (
"context"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
"time"
)

View File

@ -2,8 +2,8 @@ package cachemem
import (
"context"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
)
func (c CacheMem) CountLogEntries(ctx context.Context) (count int64, err db.Error) {

View File

@ -1,6 +1,6 @@
package cachemem
import "github.com/feditools/relay/internal/log"
import "git.ptzo.gdn/feditools/relay/internal/log"
type empty struct{}

View File

@ -2,7 +2,7 @@ package db
import (
"context"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
)
type Config interface {

View File

@ -2,7 +2,7 @@ package db
import (
"context"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
"time"
)

View File

@ -2,7 +2,7 @@ package db
import (
"context"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
)
type LogEntry interface {

View File

@ -4,11 +4,11 @@ import (
"context"
"github.com/feditools/go-lib/fedihelper"
"github.com/feditools/go-lib/fedihelper/mastodon"
"github.com/feditools/relay/internal/config"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/kv"
"github.com/feditools/relay/internal/models"
"github.com/feditools/relay/internal/token"
"git.ptzo.gdn/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/kv"
"git.ptzo.gdn/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/token"
"github.com/spf13/viper"
"net/url"
)

View File

@ -4,8 +4,8 @@ import (
"context"
"errors"
"github.com/feditools/go-lib/fedihelper"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
)
func (m *Module) CreateAccountHandler(ctx context.Context, accountI fedihelper.Account) (err error) {

View File

@ -2,10 +2,10 @@ package activitypub
import (
"context"
"github.com/feditools/relay/internal/config"
ihttp "github.com/feditools/relay/internal/http"
"github.com/feditools/relay/internal/logic"
"github.com/feditools/relay/internal/runner"
"git.ptzo.gdn/feditools/relay/internal/config"
ihttp "git.ptzo.gdn/feditools/relay/internal/http"
"git.ptzo.gdn/feditools/relay/internal/logic"
"git.ptzo.gdn/feditools/relay/internal/runner"
"github.com/spf13/viper"
)

View File

@ -4,7 +4,7 @@ import (
"encoding/json"
"github.com/feditools/go-lib/fedihelper"
libhttp "github.com/feditools/go-lib/http"
"github.com/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/path"
"net/http"
)

View File

@ -4,8 +4,8 @@ import (
"encoding/json"
"errors"
"github.com/feditools/go-lib/fedihelper"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
nethttp "net/http"
"net/url"
)

View File

@ -1,7 +1,7 @@
package activitypub
import (
"github.com/feditools/relay/internal/log"
"git.ptzo.gdn/feditools/relay/internal/log"
)
type empty struct{}

View File

@ -4,7 +4,7 @@ import (
"encoding/json"
"github.com/feditools/go-lib"
libhttp "github.com/feditools/go-lib/http"
"github.com/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/path"
"net/http"
)

View File

@ -1,8 +1,8 @@
package activitypub
import (
"github.com/feditools/relay/internal/http"
"github.com/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/http"
"git.ptzo.gdn/feditools/relay/internal/path"
)
// Route attaches routes to the web server

View File

@ -5,7 +5,7 @@ import (
"fmt"
"github.com/feditools/go-lib/fedihelper"
libhttp "github.com/feditools/go-lib/http"
"github.com/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/path"
"net/http"
)

View File

@ -3,7 +3,7 @@ package http
import (
"context"
"fmt"
"github.com/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/config"
"github.com/spf13/viper"
"io"
"net/http"

View File

@ -1,7 +1,7 @@
package http
import (
"github.com/feditools/relay/internal/log"
"git.ptzo.gdn/feditools/relay/internal/log"
)
type empty struct{}

View File

@ -1,7 +1,7 @@
package robots
import (
"github.com/feditools/relay/internal/log"
"git.ptzo.gdn/feditools/relay/internal/log"
)
type empty struct{}

View File

@ -3,11 +3,11 @@ package robots
import (
"errors"
libhttp "github.com/feditools/go-lib/http"
"github.com/feditools/relay/internal/config"
"github.com/feditools/relay/internal/db"
ihttp "github.com/feditools/relay/internal/http"
"github.com/feditools/relay/internal/models"
"github.com/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/db"
ihttp "git.ptzo.gdn/feditools/relay/internal/http"
"git.ptzo.gdn/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/path"
"github.com/sirupsen/logrus"
"net/http"
)

View File

@ -4,7 +4,7 @@ import (
"context"
"fmt"
libhttp "github.com/feditools/go-lib/http"
"github.com/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/config"
"github.com/gorilla/mux"
metrics "github.com/slok/go-http-metrics/metrics/prometheus"
"github.com/slok/go-http-metrics/middleware"

View File

@ -2,7 +2,7 @@ package template
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
)
// AdminAccountName is the name of the admin block list template.

View File

@ -2,7 +2,7 @@ package template
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
)
// AdminBlockName is the name of the admin block list template.

View File

@ -2,7 +2,7 @@ package template
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
)
// AdminInstanceName is the name of the admin block list template.

View File

@ -2,7 +2,7 @@ package template
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
)
// AdminInstanceViewName is the name of the admin block list template.

View File

@ -2,7 +2,7 @@ package template
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/logic"
"git.ptzo.gdn/feditools/relay/internal/logic"
)
// AdminJobsName is the name of the admin jobs template.

View File

@ -1,6 +1,6 @@
package template
import "github.com/feditools/relay/internal/models"
import "git.ptzo.gdn/feditools/relay/internal/models"
// BlocksName is the name of the blocks template.
const BlocksName = "blocks"

View File

@ -2,8 +2,8 @@ package template
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/models"
)
// Common contains the variables used in nearly every template.

View File

@ -1,7 +1,7 @@
package template
import (
"github.com/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/path"
"time"
)

View File

@ -1,6 +1,6 @@
package template
import "github.com/feditools/relay/internal/models"
import "git.ptzo.gdn/feditools/relay/internal/models"
// HomeName is the name of the home template.
const HomeName = "home"

View File

@ -2,7 +2,7 @@ package template
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
)
// InstanceName is the name of the my instance template.

View File

@ -2,8 +2,8 @@ package template
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/models"
)
type Login struct {

View File

@ -2,7 +2,7 @@ package template
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
)
// LogsName is the name of the logs template.

View File

@ -1,6 +1,6 @@
package template
import "github.com/feditools/relay/internal/language"
import "git.ptzo.gdn/feditools/relay/internal/language"
type Nav struct {
Classes []string

View File

@ -2,12 +2,12 @@ package template
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/config"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/models"
"github.com/feditools/relay/internal/path"
"github.com/feditools/relay/internal/token"
"github.com/feditools/relay/web"
"git.ptzo.gdn/feditools/relay/internal/config"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/token"
"git.ptzo.gdn/feditools/relay/web"
"github.com/spf13/viper"
"html/template"
"io/ioutil"

View File

@ -3,9 +3,9 @@ package webapp
import (
libhttp "github.com/feditools/go-lib/http"
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/http/template"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/http/template"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/path"
"net/http"
)

View File

@ -4,9 +4,9 @@ import (
"fmt"
libhttp "github.com/feditools/go-lib/http"
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/http/template"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/http/template"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/path"
"net/http"
)

View File

@ -2,9 +2,9 @@ package webapp
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/models"
"github.com/feditools/relay/internal/util"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/util"
"net/http"
)

View File

@ -3,10 +3,10 @@ package webapp
import (
"errors"
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/models"
"github.com/feditools/relay/internal/token"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/token"
"net/http"
)

View File

@ -4,11 +4,11 @@ import (
"errors"
"fmt"
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/models"
"github.com/feditools/relay/internal/token"
"github.com/feditools/relay/internal/util"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/token"
"git.ptzo.gdn/feditools/relay/internal/util"
"net/http"
)

View File

@ -6,9 +6,9 @@ import (
"fmt"
libhttp "github.com/feditools/go-lib/http"
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/models"
"github.com/feditools/relay/internal/util"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/util"
"io"
"io/ioutil"
"net/http"

View File

@ -3,9 +3,9 @@ package webapp
import (
"context"
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/http/template"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/http/template"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/models"
"net/http"
)

View File

@ -1,7 +1,7 @@
package webapp
import (
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
"net/http"
)

View File

@ -3,9 +3,9 @@ package webapp
import (
libhttp "github.com/feditools/go-lib/http"
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/http/template"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/http/template"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/path"
"net/http"
)

View File

@ -3,11 +3,11 @@ package webapp
import (
"fmt"
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/http/template"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/logic"
"github.com/feditools/relay/internal/models"
"github.com/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/http/template"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/logic"
"git.ptzo.gdn/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/path"
"net/http"
"strconv"
"strings"

View File

@ -2,7 +2,7 @@ package webapp
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
"net/http"
)

View File

@ -2,9 +2,9 @@ package webapp
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/http/template"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/scheduler"
"git.ptzo.gdn/feditools/relay/internal/http/template"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/scheduler"
"net/http"
)

View File

@ -2,7 +2,7 @@ package webapp
import (
libtemplate "github.com/feditools/go-lib/template"
"github.com/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/language"
"net/http"
)

View File

@ -3,11 +3,11 @@ package webapp
import (
"context"
"fmt"
"github.com/feditools/relay/internal/http/template"
"github.com/feditools/relay/internal/language"
"github.com/feditools/relay/internal/logic"
"github.com/feditools/relay/internal/models"
"github.com/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/http/template"
"git.ptzo.gdn/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/logic"
"git.ptzo.gdn/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/path"
"net/http"
"sort"
"strconv"

View File

@ -1,8 +1,8 @@
package webapp
import (
"github.com/feditools/relay/internal/http/template"
"github.com/feditools/relay/internal/language"
"git.ptzo.gdn/feditools/relay/internal/http/template"
"git.ptzo.gdn/feditools/relay/internal/language"
"net/http"
)

View File

@ -4,10 +4,10 @@ import (
"errors"
"fmt"
"github.com/feditools/go-lib/fedihelper"
"github.com/feditools/relay/internal/db"
"github.com/feditools/relay/internal/models"
"github.com/feditools/relay/internal/path"
"github.com/feditools/relay/internal/token"
"git.ptzo.gdn/feditools/relay/internal/db"
"git.ptzo.gdn/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/token"
"github.com/gorilla/mux"
"github.com/gorilla/sessions"
"net/http"

View File

@ -2,8 +2,8 @@ package webapp
import (
"fmt"
"github.com/feditools/relay/internal/http/template"
"github.com/feditools/relay/internal/path"
"git.ptzo.gdn/feditools/relay/internal/http/template"
"git.ptzo.gdn/feditools/relay/internal/path"
"net/http"
)

View File

@ -1,7 +1,7 @@
package webapp
import (
"github.com/feditools/relay/internal/models"
"git.ptzo.gdn/feditools/relay/internal/models"
"github.com/sirupsen/logrus"
"net/http"
)

Some files were not shown because too many files have changed in this diff Show More