handler

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatClientTime

func FormatClientTime(c *model.Client) types.ClientWithFormattedTime

func FormatServerTime

func FormatServerTime(s *model.Server) types.ServerWithFormattedTime

func FormatTaskTime

func FormatTaskTime(t *model.Task) types.TaskWithFormattedTime

func GetClientProgress

func GetClientProgress(c *gin.Context)

func GetServerProgress

func GetServerProgress(c *gin.Context)

func GetTask

func GetTask(c *gin.Context)

func GetTaskList

func GetTaskList(c *gin.Context)

func HandleGrpcErrorToHttp

func HandleGrpcErrorToHttp(c *gin.Context, err error)

func HandleHttpResponse

func HandleHttpResponse(c *gin.Context, code int, xcode int, data interface{})

func HandleValidatorError

func HandleValidatorError(c *gin.Context, err error)

func Train

func Train(c *gin.Context)

Types

type Response

type Response struct {
	Code int         `json:"code"`
	Msg  interface{} `json:"msg"`
	Data interface{} `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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