handler

package
v0.0.0-...-36ab9e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HandlerStruct = wire.Struct(new(Handler), "*")
View Source
var ThreatAPIStruct = wire.Struct(new(ThreatAPI), "*")

Functions

func OnLimitReached

func OnLimitReached(c *fiber.Ctx) error

Types

type Handler

type Handler struct {
	ThreatAPI *ThreatAPI
}

func (*Handler) RegisterAPI

func (h *Handler) RegisterAPI(r *fiber.App)

type ThreatAPI

type ThreatAPI struct {
	ThreatSrv *service.ThreatSrv
}

func (*ThreatAPI) GetThreats

func (h *ThreatAPI) GetThreats(c *fiber.Ctx) error

@Tags Threat @Summary 获取所有的威胁IP信息 @Description 获取所有的威胁IP信息, 并分页的形式呈现 @ID get-threats @Accept json @Produce json @Param current query integer false "当前查询页码(默认 1)" @Param page_sizet query integer false "当前查询每页显示条数(默认 10)" @Success 200 {object} schema.ThreatsResponse @Failure 400 {object} schema.ErrorResponse "{code:1002,status_code:401,message:no permission}" @Failure 500 {object} schema.ErrorResponse "{code:1001,status_code:504,message:internal server error}" @Router /api/threats [get]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL