Skip to content

Commit

Permalink
chore: webdav: reorder imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dsonck92 committed Jul 9, 2024
1 parent 446a2e6 commit f80b1ef
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 22 deletions.
5 changes: 0 additions & 5 deletions webdav/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ linters:
- lll
- gosec
- funlen
- goimports
- gofmt
- gofumpt
- gci
- tagalign

severity:
default-severity: major
Expand Down
16 changes: 8 additions & 8 deletions webdav/cache/workspace_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ func NewWorkspaceCache() *WorkspaceCache {
}

type Workspace struct {
ID string `json:"id," gorm:"column:id;size:36"`
Name string `json:"name" gorm:"column:name;size:255"`
StorageCapacity int64 `json:"storageCapacity" gorm:"column:storage_capacity"`
RootID string `json:"rootId" gorm:"column:root_id;size:36"`
OrganizationID string `json:"organizationId" gorm:"column:organization_id;size:36"`
Bucket string `json:"bucket" gorm:"column:bucket;size:255"`
CreateTime string `json:"createTime" gorm:"column:create_time"`
UpdateTime *string `json:"updateTime,omitempty" gorm:"column:update_time"`
ID string `gorm:"column:id;size:36" json:"id"`
Name string `gorm:"column:name;size:255" json:"name"`
StorageCapacity int64 `gorm:"column:storage_capacity" json:"storageCapacity"`
RootID string `gorm:"column:root_id;size:36" json:"rootId"`
OrganizationID string `gorm:"column:organization_id;size:36" json:"organizationId"`
Bucket string `gorm:"column:bucket;size:255" json:"bucket"`
CreateTime string `gorm:"column:create_time" json:"createTime"`
UpdateTime *string `gorm:"column:update_time" json:"updateTime,omitempty"`
}

func (c *WorkspaceCache) Get(id string) (*Workspace, error) {
Expand Down
6 changes: 4 additions & 2 deletions webdav/infra/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ package infra

import (
"context"
"github.com/kouprlabs/voltaserve/webdav/config"
"github.com/redis/go-redis/v9"
"strings"

"github.com/redis/go-redis/v9"

"github.com/kouprlabs/voltaserve/webdav/config"
)

type RedisManager struct {
Expand Down
8 changes: 5 additions & 3 deletions webdav/infra/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ import (
"bytes"
"context"
"errors"
"github.com/kouprlabs/voltaserve/webdav/config"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"io"
"strings"

"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"

"github.com/kouprlabs/voltaserve/webdav/config"
)

type S3Manager struct {
Expand Down
11 changes: 7 additions & 4 deletions webdav/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ package main
import (
"context"
"fmt"
"github.com/kouprlabs/voltaserve/webdav/client"
"github.com/kouprlabs/voltaserve/webdav/handler"
"github.com/kouprlabs/voltaserve/webdav/helper"
"github.com/kouprlabs/voltaserve/webdav/infra"
"log"
"net/http"
"os"
Expand All @@ -25,7 +21,12 @@ import (
"time"

"github.com/joho/godotenv"

"github.com/kouprlabs/voltaserve/webdav/client"
"github.com/kouprlabs/voltaserve/webdav/config"
"github.com/kouprlabs/voltaserve/webdav/handler"
"github.com/kouprlabs/voltaserve/webdav/helper"
"github.com/kouprlabs/voltaserve/webdav/infra"
)

var (
Expand Down Expand Up @@ -90,6 +91,8 @@ func basicAuthMiddleware(next http.Handler, idpClient *client.IdPClient) http.Ha
// @title Voltaserve WebDAV
// @version 2.0.0
// @BasePath /v2
//
// .
func main() {
if _, err := os.Stat(".env.local"); err == nil {
if err := godotenv.Load(".env.local"); err != nil {
Expand Down

0 comments on commit f80b1ef

Please sign in to comment.