go fmt
This commit is contained in:
parent
1962bd885b
commit
7a3bc3bd75
18 changed files with 169 additions and 178 deletions
|
@ -2,8 +2,8 @@ package database
|
|||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"encoding/hex"
|
||||
"log/slog"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
"golang.org/x/crypto/blake2b"
|
||||
|
|
|
@ -12,7 +12,6 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
|
||||
// MraptorScan() requests a scan of the file from the ole service
|
||||
func MraptorScan(fileID pgtype.UUID) error {
|
||||
slog.Debug("Starting MacroRaptor scan", "file-uuid", fileID.String())
|
||||
|
|
|
@ -5,7 +5,6 @@ import (
|
|||
"git.jmbit.de/jmb/scanfile/server/internal/sqlc"
|
||||
)
|
||||
|
||||
|
||||
func MSOfficeProcessing(job sqlc.ProcessingJob) error {
|
||||
database.StartProcessingJob(job.ID)
|
||||
err := OleIDScan(job.FileID)
|
||||
|
|
|
@ -12,7 +12,6 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
|
||||
func OleIDScan(fileID pgtype.UUID) error {
|
||||
|
||||
slog.Debug("Starting OleID scan", "file-uuid", fileID.String())
|
||||
|
|
|
@ -12,7 +12,6 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
|
||||
func OleVBAScan(fileID pgtype.UUID) error {
|
||||
slog.Debug("Starting OLEvba scan", "file-uuid", fileID.String())
|
||||
oleidUrl, err := url.Parse(viper.GetString("processing.oleurl"))
|
||||
|
|
|
@ -45,4 +45,3 @@ func Submit(ctx context.Context, file pgtype.UUID) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -78,4 +78,3 @@ func TypeFromMime(mimetype string) string {
|
|||
|
||||
return TypeOther
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ func RegisterRoutes() *http.ServeMux {
|
|||
mux.HandleFunc("POST /upload", web.IndexUploadHandler)
|
||||
mux.Handle("/assets/", http.FileServer(http.FS(web.Files)))
|
||||
|
||||
|
||||
// REST API
|
||||
mux.HandleFunc("/api/v0/submit", api.SubmitRestHandler)
|
||||
|
||||
|
|
|
@ -11,8 +11,6 @@ type ErrorResponse struct {
|
|||
Code int `json:"code,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
|
||||
func WriteJSONError(w http.ResponseWriter, message string, statusCode int) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.WriteHeader(statusCode)
|
||||
|
|
|
@ -1 +1 @@
|
|||
exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1
|
||||
exit status 2exit status 2exit status 2exit status 2exit status 2exit status 2exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1exit status 1
|
Loading…
Add table
Reference in a new issue