[server] Rename module

This commit is contained in:
Abhishek Shroff
2025-06-08 23:27:29 +05:30
parent 3bb1069d9d
commit bebd5156f2
89 changed files with 176 additions and 176 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
package main
import (
"github.com/shroff/phylum/server/internal/command"
"codeberg.org/shroff/phylum/server/internal/command"
)
func main() {
+1 -1
View File
@@ -1,4 +1,4 @@
module github.com/shroff/phylum/server
module codeberg.org/shroff/phylum/server
go 1.23.0
@@ -5,8 +5,8 @@ import (
"net/http"
"strings"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/core"
)
var errAuthRequired = core.NewError(http.StatusUnauthorized, "auth_required", "authorization required")
+2 -2
View File
@@ -4,9 +4,9 @@ import (
"errors"
"net/http"
"codeberg.org/shroff/phylum/server/internal/api/serve"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/serve"
"github.com/shroff/phylum/server/internal/core"
)
func Setup(r *gin.RouterGroup) {
+2 -2
View File
@@ -12,9 +12,9 @@ import (
"strings"
"time"
"codeberg.org/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/storage"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/core"
"github.com/shroff/phylum/server/internal/storage"
)
var htmlReplacer = strings.NewReplacer(
+7 -7
View File
@@ -1,14 +1,14 @@
package apiv1
import (
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/auth"
"codeberg.org/shroff/phylum/server/internal/api/v1/fs"
"codeberg.org/shroff/phylum/server/internal/api/v1/my"
"codeberg.org/shroff/phylum/server/internal/api/v1/publinks"
"codeberg.org/shroff/phylum/server/internal/api/v1/trash"
"codeberg.org/shroff/phylum/server/internal/api/v1/users"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/auth"
"github.com/shroff/phylum/server/internal/api/v1/fs"
"github.com/shroff/phylum/server/internal/api/v1/my"
"github.com/shroff/phylum/server/internal/api/v1/publinks"
"github.com/shroff/phylum/server/internal/api/v1/trash"
"github.com/shroff/phylum/server/internal/api/v1/users"
)
func Setup(r *gin.RouterGroup) {
+5 -5
View File
@@ -4,12 +4,12 @@ import (
"errors"
"net/http"
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/my"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/mail"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/my"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
"github.com/shroff/phylum/server/internal/mail"
)
type passwordParams struct {
+3 -3
View File
@@ -5,11 +5,11 @@ import (
"io"
"net/http"
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/serve"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/serve"
"github.com/shroff/phylum/server/internal/core"
)
var errGetCollectionContents = core.NewError(http.StatusBadRequest, "resource_is_collection", "Cannot get contents of collection")
+3 -3
View File
@@ -1,11 +1,11 @@
package fs
import (
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
)
type copyParams struct {
+2 -2
View File
@@ -1,9 +1,9 @@
package fs
import (
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
)
type deleteParams struct {
+2 -2
View File
@@ -1,9 +1,9 @@
package fs
import (
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
)
func handleInfoRequest(c *gin.Context) {
+3 -3
View File
@@ -1,11 +1,11 @@
package fs
import (
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
)
type mkdirParams struct {
+3 -3
View File
@@ -1,10 +1,10 @@
package fs
import (
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
)
type moveParams struct {
+1 -1
View File
@@ -3,8 +3,8 @@ package fs
import (
"net/http"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/core"
)
var (
+3 -3
View File
@@ -3,10 +3,10 @@ package fs
import (
"net/http"
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
)
var errSearchQueryEmpty = core.NewError(http.StatusBadRequest, "search_query_empty", "Empty Search Query")
+3 -3
View File
@@ -1,10 +1,10 @@
package fs
import (
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
)
type shareParams struct {
+1 -1
View File
@@ -1,8 +1,8 @@
package fs
import (
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/authenticator"
)
type DiskUsageResponse struct {
+3 -3
View File
@@ -4,11 +4,11 @@ import (
"io"
"net/http"
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
)
type uploadParams struct {
+3 -3
View File
@@ -6,11 +6,11 @@ import (
"strconv"
"time"
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
)
type bookmarksResponse struct {
+4 -4
View File
@@ -6,11 +6,11 @@ import (
"strconv"
"time"
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/api/v1/users"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/api/v1/users"
"github.com/shroff/phylum/server/internal/core"
)
func handleBootstrapRoute(c *gin.Context) {
+4 -4
View File
@@ -1,11 +1,11 @@
package my
import (
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/db"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
"github.com/shroff/phylum/server/internal/db"
)
type detailsParams struct {
+3 -3
View File
@@ -1,10 +1,10 @@
package my
import (
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
)
type homeResponse struct {
+1 -1
View File
@@ -3,9 +3,9 @@ package publinks
import (
"time"
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"github.com/gin-gonic/gin"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/api/authenticator"
)
type createParams struct {
+1 -1
View File
@@ -3,8 +3,8 @@ package publinks
import (
"net/http"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/core"
)
var (
+1 -1
View File
@@ -1,6 +1,6 @@
package responses
import "github.com/shroff/phylum/server/internal/core"
import "codeberg.org/shroff/phylum/server/internal/core"
func FullResourceFromFS(f core.FileSystem, r core.Resource) ResourceFull {
response := ResourceFull{
@@ -4,9 +4,9 @@ import (
"encoding/json"
"time"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/core"
)
type Ancestor struct {
+3 -3
View File
@@ -3,11 +3,11 @@ package trash
import (
"net/http"
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
)
const trashListLength = 100
+4 -4
View File
@@ -3,11 +3,11 @@ package users
import (
"net/http"
"codeberg.org/shroff/phylum/server/internal/api/authenticator"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/mail"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/authenticator"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
"github.com/shroff/phylum/server/internal/mail"
)
type inviteParams struct {
+2 -2
View File
@@ -5,9 +5,9 @@ import (
"net/http"
"strconv"
"codeberg.org/shroff/phylum/server/internal/api/v1/responses"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/v1/responses"
"github.com/shroff/phylum/server/internal/core"
)
var errInvalidParams = core.NewError(http.StatusBadRequest, "invalid_parameters", "Invalid Request Parameters")
+2 -2
View File
@@ -4,11 +4,11 @@ import (
"errors"
"net/http"
webdav "codeberg.org/shroff/phylum/server/internal/api/webdav/impl"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
webdav "github.com/shroff/phylum/server/internal/api/webdav/impl"
"github.com/shroff/phylum/server/internal/core"
"github.com/sirupsen/logrus"
)
+1 -1
View File
@@ -4,8 +4,8 @@ import (
"net/http"
"net/url"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/core"
)
func (h *Handler) handleCopyMove(_ http.ResponseWriter, r *http.Request) (status int, err error) {
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"net/http"
"strconv"
"github.com/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/core"
)
// Proppatch describes a property update instruction as defined in RFC 4918.
+2 -2
View File
@@ -15,9 +15,9 @@ import (
"strings"
"time"
"codeberg.org/shroff/phylum/server/internal/api/serve"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/api/serve"
"github.com/shroff/phylum/server/internal/core"
)
type Handler struct {
+1 -1
View File
@@ -32,7 +32,7 @@ import (
// In the long term, this package should use the standard library's version
// only, and the internal fork deleted, once
// https://github.com/golang/go/issues/13400 is resolved.
ixml "github.com/shroff/phylum/server/internal/api/webdav/xml"
ixml "codeberg.org/shroff/phylum/server/internal/api/webdav/xml"
)
// http://www.webdav.org/specs/rfc4918.html#ELEMENT_lockinfo
+1 -1
View File
@@ -16,7 +16,7 @@ import (
"strings"
"testing"
ixml "github.com/shroff/phylum/server/internal/api/webdav/xml"
ixml "codeberg.org/shroff/phylum/server/internal/api/webdav/xml"
)
func TestReadLockInfo(t *testing.T) {
+3 -3
View File
@@ -1,9 +1,9 @@
package admin
import (
"github.com/shroff/phylum/server/internal/command/admin/schema"
"github.com/shroff/phylum/server/internal/command/admin/storage"
"github.com/shroff/phylum/server/internal/command/admin/user"
"codeberg.org/shroff/phylum/server/internal/command/admin/schema"
"codeberg.org/shroff/phylum/server/internal/command/admin/storage"
"codeberg.org/shroff/phylum/server/internal/command/admin/user"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"os"
"strconv"
"github.com/shroff/phylum/server/internal/db"
"codeberg.org/shroff/phylum/server/internal/db"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"os"
"strings"
"github.com/shroff/phylum/server/internal/db"
"github.com/shroff/phylum/server/internal/storage"
"codeberg.org/shroff/phylum/server/internal/db"
"codeberg.org/shroff/phylum/server/internal/storage"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -3,7 +3,7 @@ package user
import (
"context"
"github.com/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
+3 -3
View File
@@ -6,9 +6,9 @@ import (
"fmt"
"os"
"github.com/shroff/phylum/server/internal/core"
"github.com/shroff/phylum/server/internal/db"
"github.com/shroff/phylum/server/internal/mail"
"codeberg.org/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/db"
"codeberg.org/shroff/phylum/server/internal/mail"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -5,9 +5,9 @@ import (
"fmt"
"os"
"codeberg.org/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/db"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/core"
"github.com/shroff/phylum/server/internal/db"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"os"
"syscall"
"github.com/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/spf13/cobra"
"golang.org/x/term"
)
@@ -7,7 +7,7 @@ import (
"strconv"
"strings"
"github.com/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/spf13/cobra"
)
@@ -5,8 +5,8 @@ import (
"fmt"
"os"
"github.com/shroff/phylum/server/internal/core"
"github.com/shroff/phylum/server/internal/mail"
"codeberg.org/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/mail"
"github.com/spf13/cobra"
)
+8 -8
View File
@@ -8,6 +8,14 @@ import (
"path"
"strings"
"codeberg.org/shroff/phylum/server/internal/command/admin"
"codeberg.org/shroff/phylum/server/internal/command/fs"
"codeberg.org/shroff/phylum/server/internal/command/serve"
"codeberg.org/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/crypt"
"codeberg.org/shroff/phylum/server/internal/db"
"codeberg.org/shroff/phylum/server/internal/mail"
"codeberg.org/shroff/phylum/server/internal/storage"
"github.com/google/uuid"
"github.com/knadh/koanf/parsers/yaml"
"github.com/knadh/koanf/providers/env"
@@ -15,14 +23,6 @@ import (
"github.com/knadh/koanf/providers/posflag"
"github.com/knadh/koanf/providers/rawbytes"
"github.com/knadh/koanf/v2"
"github.com/shroff/phylum/server/internal/command/admin"
"github.com/shroff/phylum/server/internal/command/fs"
"github.com/shroff/phylum/server/internal/command/serve"
"github.com/shroff/phylum/server/internal/core"
"github.com/shroff/phylum/server/internal/crypt"
"github.com/shroff/phylum/server/internal/db"
"github.com/shroff/phylum/server/internal/mail"
"github.com/shroff/phylum/server/internal/storage"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"fmt"
"os"
"github.com/shroff/phylum/server/internal/core"
"github.com/shroff/phylum/server/internal/db"
"codeberg.org/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/db"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -7,8 +7,8 @@ import (
"strconv"
"strings"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/core"
)
func FormatResourceSummary(r core.Resource, name string, deleted pgtype.Timestamp) string {
+6 -6
View File
@@ -1,12 +1,12 @@
package command
import (
"github.com/shroff/phylum/server/internal/command/serve"
"github.com/shroff/phylum/server/internal/core"
"github.com/shroff/phylum/server/internal/crypt"
"github.com/shroff/phylum/server/internal/db"
"github.com/shroff/phylum/server/internal/mail"
"github.com/shroff/phylum/server/internal/storage"
"codeberg.org/shroff/phylum/server/internal/command/serve"
"codeberg.org/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/crypt"
"codeberg.org/shroff/phylum/server/internal/db"
"codeberg.org/shroff/phylum/server/internal/mail"
"codeberg.org/shroff/phylum/server/internal/storage"
)
type Config struct {
+1 -1
View File
@@ -5,8 +5,8 @@ import (
"io"
"os"
"codeberg.org/shroff/phylum/server/internal/command/common"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -1,8 +1,8 @@
package fs
import (
"github.com/shroff/phylum/server/internal/command/fs/publink"
"github.com/shroff/phylum/server/internal/command/fs/trash"
"codeberg.org/shroff/phylum/server/internal/command/fs/publink"
"codeberg.org/shroff/phylum/server/internal/command/fs/trash"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -4,9 +4,9 @@ import (
"fmt"
"os"
"codeberg.org/shroff/phylum/server/internal/command/common"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/shroff/phylum/server/internal/core"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -8,9 +8,9 @@ import (
"os"
"path"
"codeberg.org/shroff/phylum/server/internal/command/common"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/shroff/phylum/server/internal/core"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"strings"
"time"
"github.com/shroff/phylum/server/internal/command/common"
"codeberg.org/shroff/phylum/server/internal/command/common"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -4,9 +4,9 @@ import (
"fmt"
"os"
"codeberg.org/shroff/phylum/server/internal/command/common"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/shroff/phylum/server/internal/core"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"fmt"
"os"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/command/common"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -5,9 +5,9 @@ import (
"fmt"
"time"
"codeberg.org/shroff/phylum/server/internal/command/common"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/shroff/phylum/server/internal/core"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"os"
"time"
"github.com/shroff/phylum/server/internal/command/common"
"codeberg.org/shroff/phylum/server/internal/command/common"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"fmt"
"os"
"github.com/shroff/phylum/server/internal/command/common"
"codeberg.org/shroff/phylum/server/internal/command/common"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -5,8 +5,8 @@ import (
"os"
"strings"
"codeberg.org/shroff/phylum/server/internal/command/common"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"fmt"
"os"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/command/common"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -4,8 +4,8 @@ import (
"fmt"
"os"
"codeberg.org/shroff/phylum/server/internal/command/common"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"os"
"strings"
"github.com/shroff/phylum/server/internal/command/common"
"codeberg.org/shroff/phylum/server/internal/command/common"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -4,8 +4,8 @@ import (
"fmt"
"os"
"codeberg.org/shroff/phylum/server/internal/command/common"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -4,8 +4,8 @@ import (
"fmt"
"os"
"codeberg.org/shroff/phylum/server/internal/command/common"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/spf13/cobra"
)
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"fmt"
"os"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/command/common"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/spf13/cobra"
)
+6 -6
View File
@@ -8,15 +8,15 @@ import (
"strings"
"time"
"codeberg.org/shroff/phylum/server/internal/api/publink"
apiv1 "codeberg.org/shroff/phylum/server/internal/api/v1"
"codeberg.org/shroff/phylum/server/internal/api/webdav"
"codeberg.org/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/db"
"codeberg.org/shroff/phylum/server/internal/jobs"
"github.com/fvbock/endless"
"github.com/gin-contrib/static"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/api/publink"
apiv1 "github.com/shroff/phylum/server/internal/api/v1"
"github.com/shroff/phylum/server/internal/api/webdav"
"github.com/shroff/phylum/server/internal/core"
"github.com/shroff/phylum/server/internal/db"
"github.com/shroff/phylum/server/internal/jobs"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -5,9 +5,9 @@ import (
"strings"
"time"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"github.com/shroff/phylum/server/internal/core"
"github.com/sirupsen/logrus"
)
@@ -5,8 +5,8 @@ import (
"fmt"
"os"
"github.com/shroff/phylum/server/internal/command/common"
"github.com/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/command/common"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -1,7 +1,7 @@
package user
import (
"github.com/shroff/phylum/server/internal/command/user/bookmarks"
"codeberg.org/shroff/phylum/server/internal/command/user/bookmarks"
"github.com/spf13/cobra"
)
+1 -1
View File
@@ -3,11 +3,11 @@ package core
import (
"io"
"codeberg.org/shroff/phylum/server/internal/db"
"github.com/doug-martin/goqu/v9"
_ "github.com/doug-martin/goqu/v9/dialect/postgres"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/db"
)
var Cfg Config
+1 -1
View File
@@ -4,10 +4,10 @@ import (
"context"
"errors"
"codeberg.org/shroff/phylum/server/internal/db"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/db"
"github.com/sirupsen/logrus"
)
+2 -2
View File
@@ -5,11 +5,11 @@ import (
"errors"
"time"
"codeberg.org/shroff/phylum/server/internal/crypt"
"codeberg.org/shroff/phylum/server/internal/db"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/crypt"
"github.com/shroff/phylum/server/internal/db"
)
type proxyFileSystemReadOnly struct {
+1 -1
View File
@@ -6,11 +6,11 @@ import (
"path"
"strings"
"codeberg.org/shroff/phylum/server/internal/storage"
"github.com/doug-martin/goqu/v9"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/storage"
)
type ResourceBindConflictResolution int32
+1 -1
View File
@@ -6,11 +6,11 @@ import (
"path"
"time"
"codeberg.org/shroff/phylum/server/internal/jobs"
"github.com/doug-martin/goqu/v9"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/jobs"
)
func (f filesystem) deleteChildRecursive(r Resource, name string, softDelete bool) (Resource, error) {
+2 -2
View File
@@ -5,11 +5,11 @@ import (
"hash"
"io"
"codeberg.org/shroff/phylum/server/internal/jobs"
"codeberg.org/shroff/phylum/server/internal/storage"
"github.com/doug-martin/goqu/v9"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"github.com/shroff/phylum/server/internal/jobs"
"github.com/shroff/phylum/server/internal/storage"
)
func (f filesystem) OpenWrite(r Resource, versionID uuid.UUID) (io.WriteCloser, error) {
+1 -1
View File
@@ -3,9 +3,9 @@ package core
import (
"strings"
"codeberg.org/shroff/phylum/server/internal/crypt"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/crypt"
)
func (f filesystem) CreatePublink(r Resource, id, password string, expires pgtype.Timestamp, accessLimit int) error {
+2 -2
View File
@@ -7,11 +7,11 @@ import (
"fmt"
"time"
"codeberg.org/shroff/phylum/server/internal/db"
"codeberg.org/shroff/phylum/server/internal/jobs"
"github.com/doug-martin/goqu/v9"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"github.com/shroff/phylum/server/internal/db"
"github.com/shroff/phylum/server/internal/jobs"
"github.com/sirupsen/logrus"
)
+3 -3
View File
@@ -4,11 +4,11 @@ import (
"net/http"
"time"
"codeberg.org/shroff/phylum/server/internal/crypt"
"codeberg.org/shroff/phylum/server/internal/db"
"codeberg.org/shroff/phylum/server/internal/rand"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/crypt"
"github.com/shroff/phylum/server/internal/db"
"github.com/shroff/phylum/server/internal/rand"
)
const accessTokenLength = 16
+1 -1
View File
@@ -6,10 +6,10 @@ import (
"strings"
"time"
"codeberg.org/shroff/phylum/server/internal/db"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/db"
)
var ErrUserNotFound = NewError(http.StatusNotFound, "user_not_found", "no such user")
+1 -1
View File
@@ -1,8 +1,8 @@
package core
import (
"codeberg.org/shroff/phylum/server/internal/crypt"
"github.com/jackc/pgx/v5/pgtype"
"github.com/shroff/phylum/server/internal/crypt"
)
func (m manager) UpdateUserHome(user User, home pgtype.UUID) error {
+1 -1
View File
@@ -4,8 +4,8 @@ import (
"errors"
"io"
"codeberg.org/shroff/phylum/server/internal/storage"
"github.com/google/uuid"
"github.com/shroff/phylum/server/internal/storage"
)
// VersionInfo represents a single version of a resource
+1 -1
View File
@@ -7,8 +7,8 @@ import (
"strconv"
"strings"
"codeberg.org/shroff/phylum/server/internal/pubsub"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/shroff/phylum/server/internal/pubsub"
"github.com/sirupsen/logrus"
)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"errors"
"fmt"
"github.com/shroff/phylum/server/internal/db/migrations"
"codeberg.org/shroff/phylum/server/internal/db/migrations"
"github.com/sirupsen/logrus"
)
+2 -2
View File
@@ -3,11 +3,11 @@ package jobs
import (
"context"
"codeberg.org/shroff/phylum/server/internal/db"
"codeberg.org/shroff/phylum/server/internal/storage"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"github.com/riverqueue/river"
"github.com/shroff/phylum/server/internal/db"
"github.com/shroff/phylum/server/internal/storage"
)
type DeleteArgs struct {
+2 -2
View File
@@ -4,10 +4,10 @@ import (
"context"
"errors"
"codeberg.org/shroff/phylum/server/internal/db"
"codeberg.org/shroff/phylum/server/internal/storage"
"github.com/google/uuid"
"github.com/riverqueue/river"
"github.com/shroff/phylum/server/internal/db"
"github.com/shroff/phylum/server/internal/storage"
"github.com/sirupsen/logrus"
)
+1 -1
View File
@@ -3,7 +3,7 @@ package mail
import (
"io"
"github.com/shroff/phylum/server/internal/core"
"codeberg.org/shroff/phylum/server/internal/core"
"github.com/sirupsen/logrus"
gomail "gopkg.in/mail.v2"
)
+1 -1
View File
@@ -1,6 +1,6 @@
package mail
import "github.com/shroff/phylum/server/internal/core"
import "codeberg.org/shroff/phylum/server/internal/core"
type ResetPasswordParams struct {
Name string
+1 -1
View File
@@ -1,6 +1,6 @@
package mail
import "github.com/shroff/phylum/server/internal/core"
import "codeberg.org/shroff/phylum/server/internal/core"
func SendWelcomeEmail(u core.User) error {
email := emails["welcome"]
+1 -1
View File
@@ -8,8 +8,8 @@ import (
"path/filepath"
"strings"
"codeberg.org/shroff/phylum/server/internal/db"
"github.com/jackc/pgx/v5"
"github.com/shroff/phylum/server/internal/db"
"github.com/sirupsen/logrus"
)