salt

package
v0.0.0-...-17112b8 Latest Latest
Warning

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

Go to latest
Published: May 6, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken() string

获取token

Types

type Jreturn

type Jreturn struct {
	Perms  []string `json:"perms"`
	Start  float64  `json:"start"`
	Token  string   `json:"token"`
	Expire float64  `json:"expire"`
	User   string   `json:"user"`
	Eauth  string   `json:"eauth"`
}

type Jslice

type Jslice struct {
	Return []Jreturn `json:"return"`
}

type Juser

type Juser struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Eauth    string `json:"eauth"`
}

type LoginResult

type LoginResult struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data struct {
		Token interface{} `json:"token"`
	} `json:"data"`
}

type Salt

type Salt struct {
	Match string
	Cmd   string
	Arg   string
	Run   string
	Tgt   string
	Arg1  string
	Arg2  string
}

type SaltController

type SaltController struct {
	beego.Controller
}

salt

func (*SaltController) GetKeyList

func (this *SaltController) GetKeyList()

@Title 获取salt节点 @Description 获取salt节点 @Success 200 {string} @Failure 404 body is empty @router /keylist [get]

func (*SaltController) KeyAccept

func (this *SaltController) KeyAccept()

@Title 认证获取salt节点 @Description 认证获取salt节点 @Param match query string true "match" @Success 200 {string} @Failure 404 body is empty @router /keyaccept [post]

func (*SaltController) KeyCopyFile

func (this *SaltController) KeyCopyFile()

@Title salt推送文件 @Description salt执行部署 @Param run query string true "run" @Param tgt query string true "match" @Param arg1 query string true "arg1" @Param arg2 query string true "arg1" @Success 200 {string} @Failure 404 body is empty @router /keycopy [post]

func (*SaltController) KeyDelete

func (this *SaltController) KeyDelete()

@Title 认证获取salt节点 @Description 认证获取salt节点 @Param match query string false "match" @Success 200 {string} @Failure 404 body is empty @router /keydelete [post]

func (*SaltController) KeyDeploy

func (this *SaltController) KeyDeploy()

@Title salt执行部署 @Description salt执行部署 @Param match query string true "match" @Param arg query string true "arg" @Success 200 {string} @Failure 404 body is empty @router /keydeploy [post]

func (*SaltController) KeyPing

func (this *SaltController) KeyPing()

@Title 获取salt节点连通性 @Description 获取salt节点连通性 @Success 200 {string} @Failure 404 body is empty @router /keyping [get]

func (*SaltController) KeyRun

func (this *SaltController) KeyRun()

@Title salt执行命令 @Description salt执行命令 @Param match query string false "match" @Param cmd query string false "cmd" @Success 200 {string} @Failure 404 body is empty @router /keyrun [post]

func (*SaltController) ResponseJson

func (this *SaltController) ResponseJson(httpCode, errCode int, data interface{})

func (*SaltController) URLMapping

func (this *SaltController) URLMapping()

Jump to

Keyboard shortcuts

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