controller

package
v1.22.38 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdController

type CmdController struct {
	RootController `path:"/cmds"`

	GetCmdByID gin.HandlerFunc `path:"/:id"`

	PostExecuteCmd gin.HandlerFunc `path:"/"`
	// contains filtered or unexported fields
}

func NewCmdController

func NewCmdController(router *gin.Engine) *CmdController

NewCmdController create new instance of CmdController

func (*CmdController) GetCmdByIDImpl

func (c *CmdController) GetCmdByIDImpl(context *gin.Context)

GetCmdByIDImpl http get to get detail of cmd by id

func (*CmdController) PostExecuteCmdImpl

func (c *CmdController) PostExecuteCmdImpl(context *gin.Context)

PostExecuteCmdImpl http post request to execute cmd from request body

type HealthController

type HealthController struct {
	RootController `path:"/health"`

	GetInfo gin.HandlerFunc `path:"/"`
}

func NewHealthController

func NewHealthController(router *gin.Engine) *HealthController

NewHealthController create new instance of HealthController

func (*HealthController) GetInfoImpl

func (c *HealthController) GetInfoImpl(context *gin.Context)

type HealthInfo

type HealthInfo struct {
	CPU    int              `json:"cpu"`
	Memory runtime.MemStats `json:"memory"`
}

type ResponseMessage

type ResponseMessage struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

ResponseMessage the response body

type RootController

type RootController struct {
}

RootController supper controller type

Jump to

Keyboard shortcuts

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