controllers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddReport

func AddReport(ctx *fiber.Ctx) error

AddReport godoc @Summary Upload a single report. @Description Upload a single report. @Tags report @Accept json @Param report body models.Roguelike_Report true "Report" @Produce json @Success 200 {object} models.JSONResult{data=models.ReportID} @Router /api/v1/report [post] TODO:Added verification of upload report。

func AddReports

func AddReports(ctx *fiber.Ctx) error

AddReports godoc @Summary Upload multiple reports. @Description Upload multiple reports. @Tags report @Param report body []models.Roguelike_Report true "Reports" @Produce json @Success 200 {object} models.JSONResult{data=models.ReportIDs} @Router /api/v1/reports [post]

func DeleteReportByID

func DeleteReportByID(ctx *fiber.Ctx) error

DeleteReportByID godoc @Summary Delete report corresponding to ID. @Description Delete report corresponding to ID. @Tags report @Accept json @Param id path string true "id" @Produce json @Success 200 {object} models.JSONResult{data=models.ReportID} @Router /api/v1/report/{id} [delete]

func GetNewUUID

func GetNewUUID(ctx *fiber.Ctx) error

GetNewUUID godoc @Summary Get a new uuid. @Description Generate a new UUID. @Tags auth @Produce json @Success 200 {object} models.JSONResult{data=models.Login} @Router /auth/uuid [get]

func GetReportByID

func GetReportByID(ctx *fiber.Ctx) error

GetReportByID godoc @Summary Get report corresponding to ID. @Description Get report corresponding to ID. @Tags report @Accept json @Param id path string true "id" @Produce json @Success 200 {object} models.JSONResult{data=[]models.Roguelike_Report_With_ID} @Router /api/v1/report/{id} [get]

func GetReportListByAccount

func GetReportListByAccount(ctx *fiber.Ctx) error

GetReportListByAccount godoc @Summary Get reports under this account. @Description Get reports under this account. @Tags report @Param order query string false "order" @Param page query int true "page" @Param pagesize query int true "pagesize" @Produce json @Success 200 {object} models.JSONResult{data=[]models.Roguelike_Report_With_ID} @Router /api/v1/report [get]

func Login

func Login(ctx *fiber.Ctx) error

Login godoc @Summary Login with UUID. @Description Login with UUID,it return a token. @Tags auth @Accept multipart/form-data @Accept json @Param uuid body models.Login true "uuid" @Produce json @Success 200 {object} models.JSONResult{data=models.NewToken} @Router /auth/login [post]

Types

type Controller

type Controller struct {
}

func NewController

func NewController() *Controller

Jump to

Keyboard shortcuts

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