mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-11-02 02:48:05 +00:00
format go code
This commit is contained in:
@@ -2,10 +2,10 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
"strings"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func helpGetExpStatus(utoken string) (map[string]interface{}, error) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"net"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/packr"
|
||||
"github.com/oschwald/geoip2-golang"
|
||||
)
|
||||
@@ -14,7 +15,6 @@ var (
|
||||
geoip *geoip2.Reader
|
||||
)
|
||||
|
||||
|
||||
func initGeoIP() {
|
||||
var err error
|
||||
box := packr.NewBox("../ui")
|
||||
|
||||
@@ -20,8 +20,10 @@ var userSchema *jsonschema.Schema
|
||||
|
||||
// IsAdmin - admin/DPO approval is required
|
||||
type IsAdmin bool
|
||||
|
||||
// IsLocked - variable is locked from changes
|
||||
type IsLocked bool
|
||||
|
||||
// IsPreserve variable can never be deleted
|
||||
type IsPreserve bool
|
||||
|
||||
|
||||
@@ -178,6 +178,7 @@ func (dbobj *SQLiteDB) CloseDB() {
|
||||
func (dbobj SQLiteDB) BackupDB(w http.ResponseWriter) {
|
||||
/*
|
||||
err := sqlite3dump.DumpDB(dbobj.db, w)
|
||||
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
log.Printf("error in backup: %s", err)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http/httptest"
|
||||
"encoding/json"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
uuid "github.com/hashicorp/go-uuid"
|
||||
jsonpatch "github.com/evanphx/json-patch"
|
||||
uuid "github.com/hashicorp/go-uuid"
|
||||
)
|
||||
|
||||
func helpCreateUserApp(userTOKEN string, appName string, appJSON string) (map[string]interface{}, error) {
|
||||
|
||||
@@ -454,7 +454,6 @@ func (dbobj dbcon) dumpUserPII(email string, conf Config) (string, error) {
|
||||
return fullJSON, err
|
||||
}
|
||||
|
||||
|
||||
func (dbobj dbcon) getUserJSONByIndex(indexValue string, indexName string, conf Config) ([]byte, string, error) {
|
||||
userBson, err := dbobj.lookupUserRecordByIndex(indexName, indexValue, conf)
|
||||
if userBson == nil || err != nil {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"encoding/json"
|
||||
"log"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
uuid "github.com/hashicorp/go-uuid"
|
||||
jsonpatch "github.com/evanphx/json-patch"
|
||||
uuid "github.com/hashicorp/go-uuid"
|
||||
)
|
||||
|
||||
func helpCreateUser(userJSON string) (map[string]interface{}, error) {
|
||||
|
||||
@@ -2,8 +2,8 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
|
||||
Reference in New Issue
Block a user