mirror of
https://github.com/lus/pasty.git
synced 2023-08-10 21:13:09 +03:00
Bump to Go 1.16
This commit is contained in:
5
internal/env/env.go
vendored
5
internal/env/env.go
vendored
@@ -1,11 +1,12 @@
|
||||
package env
|
||||
|
||||
import (
|
||||
"github.com/Lukaesebrot/pasty/internal/static"
|
||||
"github.com/joho/godotenv"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/lus/pasty/internal/static"
|
||||
)
|
||||
|
||||
// Load loads an optional .env file
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package pastes
|
||||
|
||||
import (
|
||||
"github.com/Lukaesebrot/pasty/internal/env"
|
||||
"github.com/Lukaesebrot/pasty/internal/utils"
|
||||
"strconv"
|
||||
|
||||
"github.com/lus/pasty/internal/env"
|
||||
"github.com/lus/pasty/internal/utils"
|
||||
)
|
||||
|
||||
// generateDeletionToken generates a new deletion token
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package pastes
|
||||
|
||||
import (
|
||||
"github.com/Lukaesebrot/pasty/internal/env"
|
||||
"github.com/alexedwards/argon2id"
|
||||
"time"
|
||||
|
||||
"github.com/alexedwards/argon2id"
|
||||
"github.com/lus/pasty/internal/env"
|
||||
)
|
||||
|
||||
// Paste represents a saved paste
|
||||
|
||||
@@ -2,9 +2,10 @@ package storage
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/Lukaesebrot/pasty/internal/env"
|
||||
"github.com/Lukaesebrot/pasty/internal/pastes"
|
||||
"strings"
|
||||
|
||||
"github.com/lus/pasty/internal/env"
|
||||
"github.com/lus/pasty/internal/pastes"
|
||||
)
|
||||
|
||||
// Current holds the current storage driver
|
||||
|
||||
@@ -3,13 +3,14 @@ package storage
|
||||
import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"github.com/Lukaesebrot/pasty/internal/env"
|
||||
"github.com/Lukaesebrot/pasty/internal/pastes"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/lus/pasty/internal/env"
|
||||
"github.com/lus/pasty/internal/pastes"
|
||||
)
|
||||
|
||||
// FileDriver represents the file storage driver
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"github.com/Lukaesebrot/pasty/internal/env"
|
||||
"github.com/Lukaesebrot/pasty/internal/utils"
|
||||
"strconv"
|
||||
|
||||
"github.com/lus/pasty/internal/env"
|
||||
"github.com/lus/pasty/internal/utils"
|
||||
)
|
||||
|
||||
// AcquireID generates a new unique ID
|
||||
|
||||
@@ -2,13 +2,14 @@ package storage
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/Lukaesebrot/pasty/internal/env"
|
||||
"github.com/Lukaesebrot/pasty/internal/pastes"
|
||||
"time"
|
||||
|
||||
"github.com/lus/pasty/internal/env"
|
||||
"github.com/lus/pasty/internal/pastes"
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/mongo/options"
|
||||
"go.mongodb.org/mongo-driver/mongo/readpref"
|
||||
"time"
|
||||
)
|
||||
|
||||
// MongoDBDriver represents the MongoDB storage driver
|
||||
|
||||
@@ -4,13 +4,14 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/Lukaesebrot/pasty/internal/env"
|
||||
"github.com/Lukaesebrot/pasty/internal/pastes"
|
||||
"github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio-go/v7/pkg/credentials"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/lus/pasty/internal/env"
|
||||
"github.com/lus/pasty/internal/pastes"
|
||||
"github.com/minio/minio-go/v7"
|
||||
"github.com/minio/minio-go/v7/pkg/credentials"
|
||||
)
|
||||
|
||||
// S3Driver represents the AWS S3 storage driver
|
||||
|
||||
@@ -2,12 +2,13 @@ package storage
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"github.com/Lukaesebrot/pasty/internal/env"
|
||||
"github.com/Lukaesebrot/pasty/internal/pastes"
|
||||
"time"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
_ "github.com/lib/pq"
|
||||
"github.com/lus/pasty/internal/env"
|
||||
"github.com/lus/pasty/internal/pastes"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"time"
|
||||
)
|
||||
|
||||
// SQLDriver represents the SQL storage driver
|
||||
|
||||
@@ -2,8 +2,9 @@ package v1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/Lukaesebrot/pasty/internal/pastes"
|
||||
"github.com/Lukaesebrot/pasty/internal/storage"
|
||||
|
||||
"github.com/lus/pasty/internal/pastes"
|
||||
"github.com/lus/pasty/internal/storage"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@ package v1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/Lukaesebrot/pasty/internal/pastes"
|
||||
"github.com/Lukaesebrot/pasty/internal/storage"
|
||||
|
||||
"github.com/fasthttp/router"
|
||||
"github.com/lus/pasty/internal/pastes"
|
||||
"github.com/lus/pasty/internal/storage"
|
||||
limitFasthttp "github.com/ulule/limiter/v3/drivers/middleware/fasthttp"
|
||||
"github.com/valyala/fasthttp"
|
||||
)
|
||||
|
||||
@@ -2,16 +2,17 @@ package web
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/Lukaesebrot/pasty/internal/env"
|
||||
"github.com/Lukaesebrot/pasty/internal/static"
|
||||
v1 "github.com/Lukaesebrot/pasty/internal/web/controllers/v1"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
routing "github.com/fasthttp/router"
|
||||
"github.com/lus/pasty/internal/env"
|
||||
"github.com/lus/pasty/internal/static"
|
||||
v1 "github.com/lus/pasty/internal/web/controllers/v1"
|
||||
"github.com/ulule/limiter/v3"
|
||||
limitFasthttp "github.com/ulule/limiter/v3/drivers/middleware/fasthttp"
|
||||
"github.com/ulule/limiter/v3/drivers/store/memory"
|
||||
"github.com/valyala/fasthttp"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Serve serves the web resources
|
||||
|
||||
Reference in New Issue
Block a user