Documentation ¶
Index ¶
- Variables
- func CommandBuilder(taskData *TaskData) string
- func DeleteWorkspace(c *fiber.Ctx) error
- func EnableSSL(options libs.Options) error
- func GenerateSSL(certFile string, keyFile string) bool
- func Health(c *fiber.Ctx) error
- func HelperMessage(c *fiber.Ctx) error
- func ListAllScan(c *fiber.Ctx) error
- func ListFlows(c *fiber.Ctx) error
- func ListWorkspaces(c *fiber.Ctx) error
- func Login(c *fiber.Ctx) error
- func NewScan(c *fiber.Ctx) error
- func NewScanCloud(c *fiber.Ctx) error
- func Ping(c *fiber.Ctx) error
- func Process(c *fiber.Ctx) error
- func RawWorkspace(c *fiber.Ctx) error
- func SaveTargets(targets []string) string
- func SetupRoutes(app *fiber.App)
- func StartServer(options libs.Options)
- func Upload(c *fiber.Ctx) error
- func WorkspaceDetail(c *fiber.Ctx) error
- type ResponseHTTP
- type TaskData
- type UploadData
Constants ¶
This section is empty.
Variables ¶
var Opt libs.Options
var DB *gorm.DB
Functions ¶
func CommandBuilder ¶
CommandBuilder build core command from API
func DeleteWorkspace ¶
func DeleteWorkspace(c *fiber.Ctx) error
func GenerateSSL ¶
GenerateSSL generate SSL key
func Health ¶
func Health(c *fiber.Ctx) error
Health is a function to get all books data from database @Summary Get all books @Description Get all books @Tags books @Accept json @Produce json @Success 200 {object} ResponseHTTP{} @Failure 503 {object} ResponseHTTP{} @Router /v1/books [get]
func HelperMessage ¶
func HelperMessage(c *fiber.Ctx) error
func ListAllScan ¶
func ListAllScan(c *fiber.Ctx) error
func ListWorkspaces ¶
func ListWorkspaces(c *fiber.Ctx) error
Workspace is a function to get all books data from database @Summary Get all books @Description Get all books @Tags books @Accept json @Produce json @Success 200 {object} ResponseHTTP{} @Router /v1/workspaces [get]
func Ping ¶
func Ping(c *fiber.Ctx) error
Ping is a function to get all books data from database @Summary Get all books @Description Get all books @Tags books @Accept json @Produce json @Success 200 {object} ResponseHTTP{} @Failure 503 {object} ResponseHTTP{} @Router /v1/books [get]
func RawWorkspace ¶
func RawWorkspace(c *fiber.Ctx) error
func SaveTargets ¶
SaveTargets save upload data to /tmp/osm-input/data-osm-xxx.txt
func StartServer ¶
func WorkspaceDetail ¶
func WorkspaceDetail(c *fiber.Ctx) error
Types ¶
type ResponseHTTP ¶
type ResponseHTTP struct { Status int `json:"status"` Data interface{} `json:"data"` Type string `json:"type,omitempty"` Total int `json:"total,omitempty"` Message string `json:"message"` }
ResponseHTTP represents response body of this API
type TaskData ¶
type TaskData struct { MasterPassword string `json:"password"` Binary string `json:"binary"` // override everything below Command string `json:"command"` // these two not be blank when run with plugins WorkFlow string `json:"workflow"` PluginName string `json:"plugin"` ScanID string `json:"scan_id"` // for select scan + task Workspace string `json:"workspace"` Target string `json:"target"` TargetsList []string `json:"targets"` TargetsFile string `json:"targets_file"` AliveAssets bool `json:"alive_assets"` // skip targets part and select the assets from DB AllAssets bool `json:"all_assets"` // skip targets part and select the assets from DB // just more mics info for custom command later Params []string `json:"params"` Timeout string `json:"timeout"` Concurrency int `json:"concurrency"` // enable distributed scan Distributed bool `json:"distributed"` // for chunk mode only Threads int `json:"threads"` Chunk bool `json:"chunk"` TargetAsFile bool `json:"as_file"` // only select record not run the command RawName bool `json:"RawName"` WildCard bool `json:"wildcard"` ViewOnly bool `json:"view_only"` Debug bool `json:"debug"` Test bool `json:"test"` }
TaskData data required in json form
type UploadData ¶
UploadData data required in json form