mirror of
https://github.com/evilsocket/arc.git
synced 2024-05-26 22:37:37 +03:00
fix: recursive go fmt
This commit is contained in:
@@ -44,15 +44,17 @@ type AuthResponse struct {
|
||||
// Handler authenticating a user and returning a bearer token for API requests.
|
||||
//
|
||||
// Consumes:
|
||||
// - application/json
|
||||
// - application/json
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - application/json
|
||||
//
|
||||
// Responses:
|
||||
// 200: authResponse
|
||||
// 400: errorResponse
|
||||
// 403: errorResponse
|
||||
// 500: errorResponse
|
||||
//
|
||||
// 200: authResponse
|
||||
// 400: errorResponse
|
||||
// 403: errorResponse
|
||||
// 500: errorResponse
|
||||
func Auth(c *gin.Context) {
|
||||
var auth AuthRequest
|
||||
|
||||
|
||||
@@ -69,10 +69,11 @@ func SafeBind(c *gin.Context, obj interface{}) error {
|
||||
// Handler returning the current server status.
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - application/json
|
||||
//
|
||||
// Responses:
|
||||
// 200: Status
|
||||
//
|
||||
// 200: Status
|
||||
func GetStatus(c *gin.Context) {
|
||||
// utils.Api(log.DEBUG, c, "Requested status.")
|
||||
c.JSON(200, ServerStatus)
|
||||
@@ -88,10 +89,11 @@ func ClearEvents(c *gin.Context) {
|
||||
// Handler returning the current server configuration.
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - application/json
|
||||
//
|
||||
// Responses:
|
||||
// 200: Configuration
|
||||
//
|
||||
// 200: Configuration
|
||||
func GetConfig(c *gin.Context) {
|
||||
utils.Api(log.DEBUG, c, "Requested configuration.")
|
||||
c.JSON(200, config.Conf)
|
||||
|
||||
@@ -12,8 +12,8 @@ import (
|
||||
"fmt"
|
||||
"github.com/evilsocket/arc/config"
|
||||
"github.com/evilsocket/arc/db"
|
||||
"github.com/evilsocket/islazy/log"
|
||||
"github.com/evilsocket/arc/utils"
|
||||
"github.com/evilsocket/islazy/log"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ package controllers
|
||||
|
||||
import (
|
||||
"github.com/evilsocket/arc/db"
|
||||
"github.com/evilsocket/islazy/log"
|
||||
"github.com/evilsocket/arc/utils"
|
||||
"github.com/evilsocket/islazy/log"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"github.com/evilsocket/islazy/log"
|
||||
"github.com/evilsocket/arc/utils"
|
||||
"github.com/evilsocket/islazy/log"
|
||||
"github.com/theckman/go-flock"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"compress/gzip"
|
||||
"fmt"
|
||||
"github.com/evilsocket/arc/config"
|
||||
"github.com/evilsocket/islazy/log"
|
||||
"github.com/evilsocket/arc/utils"
|
||||
"github.com/evilsocket/islazy/log"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
@@ -58,9 +58,9 @@ func doEmailReport(event Event) (err error) {
|
||||
cmd := exec.Command(sendmailPath, "-t")
|
||||
|
||||
body = "From: arc@localhost\n" +
|
||||
fmt.Sprintf("To: %s", config.Conf.Scheduler.Reports.To ) + "\n" +
|
||||
fmt.Sprintf("Subject: %s", event.Title ) + "\n" +
|
||||
fmt.Sprintf("Content-Type: %s", contentType ) + "\n" +
|
||||
fmt.Sprintf("To: %s", config.Conf.Scheduler.Reports.To) + "\n" +
|
||||
fmt.Sprintf("Subject: %s", event.Title) + "\n" +
|
||||
fmt.Sprintf("Content-Type: %s", contentType) + "\n" +
|
||||
"Content-Transfer-Encoding: 7BIT\n" +
|
||||
"Content-Disposition: inline\n" +
|
||||
"MIME-Version: 1.0\n" +
|
||||
|
||||
1234
webui/compiled.go
1234
webui/compiled.go
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user