Documentation ¶
Index ¶
- func Add(c *gin.Context)
- func Delete(c *gin.Context)
- func Detail(c *gin.Context)
- func DownloadYaml(c *gin.Context)
- func Get(c *gin.Context)
- func Run(c *gin.Context)
- func SliceToMap(slice yaml.MapSlice) map[string]string
- func Update(c *gin.Context)
- func UploadYaml(c *gin.Context)
- type DownloadSerializer
- type DownloadSwigger
- type RunSerializer
- type RunSwigger
- type Serializer
- type TempPoc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
@Summary plugin add @Tags Plugin @Description 新增 @Produce json @Security token @Param plugin body rule.Plugin true "plugin" @Success 200 {object} msg.Response @Failure 200 {object} msg.Response @Router /api/v1/poc/ [post]
func Delete ¶
@Summary plugin delete @Tags Plugin @Description 删除 @Produce json @Security token @Param id path int true "ID" @Success 200 {object} msg.Response @Failure 200 {object} msg.Response @Router /api/v1/poc/{id}/ [delete]
func Detail ¶
@Summary plugin detail @Tags Plugin @Description 详情 @Produce json @Security token @Param id path int true "ID" @Success 200 {object} msg.Response @Failure 200 {object} msg.Response @Router /api/v1/poc/{id}/ [get]
func DownloadYaml ¶
@Summary download yaml @Tags Plugin @Description 下载yaml @Security token @Param run body DownloadSwigger true "json_poc" @Success 200 {object} msg.Response @Failure 200 {object} msg.Response @Router /api/v1/poc/download/ [post]
func Get ¶
@Summary plugin list @Tags Plugin @Description 列表 @Produce json @Security token @Param page query int true "Page" @Param pagesize query int true "Pagesize" @Param object query db.PluginSearchField false "field" @Success 200 {object} msg.Response @Failure 200 {object} msg.Response @Router /api/v1/poc/ [get]
func Run ¶
@Summary plugin run @Tags Plugin @Description 运行 @Produce json @Security token @Param run body RunSwigger false "run" @Success 200 {object} msg.Response @Failure 200 {object} msg.Response @Router /api/v1/poc/run/ [post]
func SliceToMap ¶
func Update ¶
@Summary plugin update @Tags Plugin @Description 更新 @Produce json @Security token @Param id path int true "ID" @Param plugin body rule.Plugin true "plugin" @Success 200 {object} msg.Response @Failure 200 {object} msg.Response @Router /api/v1/poc/{id}/ [put]
func UploadYaml ¶
@Summary upload yaml @Tags Plugin @Description 上传yaml @Accept multipart/form-data @Param yaml formData file true "file" @accept json @Security token @Success 200 {object} msg.Response @Failure 200 {object} msg.Response @Router /api/v1/poc/upload/ [post]
Types ¶
type DownloadSerializer ¶
type DownloadSwigger ¶
这个结构体没用 只是为了定义 swigger 前端的参数
type RunSerializer ¶
type RunSwigger ¶
type RunSwigger struct { Target string `json:"target"` VulId string `json:"vul_id"` Affects string `gorm:"column:affects" json:"affects"` JsonPoc rule.Plugin `gorm:"column:json_poc" json:"json_poc"` }
这个结构体没用 只是为了定义 swigger 前端的参数