host

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(ctx *macaron.Context) string

All 获取所有主机

func Detail

func Detail(ctx *macaron.Context) string

Detail 主机详情

func Index

func Index(ctx *macaron.Context) string

Index 主机列表

func Ping

func Ping(ctx *macaron.Context) string

Ping 测试主机是否可连接

func Remove

func Remove(ctx *macaron.Context) string

Remove 删除主机

func Store

func Store(ctx *macaron.Context, form HostForm) string

Store 保存、修改主机信息

Types

type HostForm

type HostForm struct {
	Id     int16
	Name   string `binding:"Required;MaxSize(64)"`
	Alias  string `binding:"Required;MaxSize(32)"`
	Port   int    `binding:"Required;Range(1-65535)"`
	Remark string
}

func (HostForm) Error

func (f HostForm) Error(ctx *macaron.Context, errs binding.Errors)

Error 表单验证错误处理

Jump to

Keyboard shortcuts

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