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.
|
// Handler authenticating a user and returning a bearer token for API requests.
|
||||||
//
|
//
|
||||||
// Consumes:
|
// Consumes:
|
||||||
// - application/json
|
// - application/json
|
||||||
|
//
|
||||||
// Produces:
|
// Produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
//
|
//
|
||||||
// Responses:
|
// Responses:
|
||||||
// 200: authResponse
|
//
|
||||||
// 400: errorResponse
|
// 200: authResponse
|
||||||
// 403: errorResponse
|
// 400: errorResponse
|
||||||
// 500: errorResponse
|
// 403: errorResponse
|
||||||
|
// 500: errorResponse
|
||||||
func Auth(c *gin.Context) {
|
func Auth(c *gin.Context) {
|
||||||
var auth AuthRequest
|
var auth AuthRequest
|
||||||
|
|
||||||
|
|||||||
@@ -69,10 +69,11 @@ func SafeBind(c *gin.Context, obj interface{}) error {
|
|||||||
// Handler returning the current server status.
|
// Handler returning the current server status.
|
||||||
//
|
//
|
||||||
// Produces:
|
// Produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
//
|
//
|
||||||
// Responses:
|
// Responses:
|
||||||
// 200: Status
|
//
|
||||||
|
// 200: Status
|
||||||
func GetStatus(c *gin.Context) {
|
func GetStatus(c *gin.Context) {
|
||||||
// utils.Api(log.DEBUG, c, "Requested status.")
|
// utils.Api(log.DEBUG, c, "Requested status.")
|
||||||
c.JSON(200, ServerStatus)
|
c.JSON(200, ServerStatus)
|
||||||
@@ -88,10 +89,11 @@ func ClearEvents(c *gin.Context) {
|
|||||||
// Handler returning the current server configuration.
|
// Handler returning the current server configuration.
|
||||||
//
|
//
|
||||||
// Produces:
|
// Produces:
|
||||||
// - application/json
|
// - application/json
|
||||||
//
|
//
|
||||||
// Responses:
|
// Responses:
|
||||||
// 200: Configuration
|
//
|
||||||
|
// 200: Configuration
|
||||||
func GetConfig(c *gin.Context) {
|
func GetConfig(c *gin.Context) {
|
||||||
utils.Api(log.DEBUG, c, "Requested configuration.")
|
utils.Api(log.DEBUG, c, "Requested configuration.")
|
||||||
c.JSON(200, config.Conf)
|
c.JSON(200, config.Conf)
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"github.com/evilsocket/arc/config"
|
"github.com/evilsocket/arc/config"
|
||||||
"github.com/evilsocket/arc/db"
|
"github.com/evilsocket/arc/db"
|
||||||
"github.com/evilsocket/islazy/log"
|
|
||||||
"github.com/evilsocket/arc/utils"
|
"github.com/evilsocket/arc/utils"
|
||||||
|
"github.com/evilsocket/islazy/log"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ package controllers
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/evilsocket/arc/db"
|
"github.com/evilsocket/arc/db"
|
||||||
"github.com/evilsocket/islazy/log"
|
|
||||||
"github.com/evilsocket/arc/utils"
|
"github.com/evilsocket/arc/utils"
|
||||||
|
"github.com/evilsocket/islazy/log"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
package db
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/evilsocket/islazy/log"
|
|
||||||
"github.com/evilsocket/arc/utils"
|
"github.com/evilsocket/arc/utils"
|
||||||
|
"github.com/evilsocket/islazy/log"
|
||||||
"github.com/theckman/go-flock"
|
"github.com/theckman/go-flock"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
"compress/gzip"
|
"compress/gzip"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/evilsocket/arc/config"
|
"github.com/evilsocket/arc/config"
|
||||||
"github.com/evilsocket/islazy/log"
|
|
||||||
"github.com/evilsocket/arc/utils"
|
"github.com/evilsocket/arc/utils"
|
||||||
|
"github.com/evilsocket/islazy/log"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ func doEmailReport(event Event) (err error) {
|
|||||||
cmd := exec.Command(sendmailPath, "-t")
|
cmd := exec.Command(sendmailPath, "-t")
|
||||||
|
|
||||||
body = "From: arc@localhost\n" +
|
body = "From: arc@localhost\n" +
|
||||||
fmt.Sprintf("To: %s", config.Conf.Scheduler.Reports.To ) + "\n" +
|
fmt.Sprintf("To: %s", config.Conf.Scheduler.Reports.To) + "\n" +
|
||||||
fmt.Sprintf("Subject: %s", event.Title ) + "\n" +
|
fmt.Sprintf("Subject: %s", event.Title) + "\n" +
|
||||||
fmt.Sprintf("Content-Type: %s", contentType ) + "\n" +
|
fmt.Sprintf("Content-Type: %s", contentType) + "\n" +
|
||||||
"Content-Transfer-Encoding: 7BIT\n" +
|
"Content-Transfer-Encoding: 7BIT\n" +
|
||||||
"Content-Disposition: inline\n" +
|
"Content-Disposition: inline\n" +
|
||||||
"MIME-Version: 1.0\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