website

package
v0.0.0-...-90c7a48 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Conf, _ = apibox.Get_Conf()
)

Functions

func Add_Handle

func Add_Handle(method, pattern string, handler http.Handler)

func Add_HandleFunc

func Add_HandleFunc(method, pattern string, handler func(http.ResponseWriter, *http.Request))

func Init_Templates

func Init_Templates(dirName string, suffix string) error

func Pprof_handler

func Pprof_handler(w http.ResponseWriter, r *http.Request)

func Run

func Run()

func SSHWebSocketHandler

func SSHWebSocketHandler(w http.ResponseWriter, r *http.Request)

Types

type Console

type Console struct {
}

func (*Console) ChkSSHSrvAddr

func (c *Console) ChkSSHSrvAddr(w http.ResponseWriter, r *http.Request)

func (*Console) ConsoleLogin

func (c *Console) ConsoleLogin(w http.ResponseWriter, r *http.Request)

func (*Console) ConsoleLoginPage

func (c *Console) ConsoleLoginPage(w http.ResponseWriter, r *http.Request)

func (*Console) ConsoleLogout

func (c *Console) ConsoleLogout(w http.ResponseWriter, r *http.Request)

func (*Console) ConsoleMainPage

func (c *Console) ConsoleMainPage(w http.ResponseWriter, r *http.Request)

type ConsoleMainPageData

type ConsoleMainPageData struct {
	Token    string `json:"token" xml:"token"`
	UserName string `json:"user_name" xml:"user_name"`
	UserPwd  string `json:"user_pwd" xml:"user_pwd"`
	VM_Name  string `json:"vm_name" xml:"vm_name"`
	VM_Addr  string `json:"vm_addr" xml:"vm_addr"`
	WS_Addr  string `json:"ws_addr" xml:"ws_addr"`
}

type Context

type Context struct {
	Session *server.Session
	// contains filtered or unexported fields
}

func NewContext

func NewContext(w http.ResponseWriter, r *http.Request) *Context

func (*Context) BasicAuth

func (c *Context) BasicAuth(s string)

func (*Context) GetFormValue

func (c *Context) GetFormValue(key string) string

func (*Context) GetFormValues

func (c *Context) GetFormValues(v string) []string

func (*Context) GetJsonByte

func (c *Context) GetJsonByte() []byte

func (*Context) GetSessionUser

func (c *Context) GetSessionUser() interface{}

func (*Context) IsLogin

func (c *Context) IsLogin() bool

func (*Context) OutHtml

func (c *Context) OutHtml(tpl string, obj interface{})

func (*Context) OutJson

func (c *Context) OutJson(obj interface{})

func (*Context) OutXML

func (c *Context) OutXML(obj interface{})

func (*Context) Redirect

func (c *Context) Redirect(url string)

func (*Context) SetContentType

func (c *Context) SetContentType(t string)

type LoginPageData

type LoginPageData struct {
	VM_Name    string `json:"vm_name" xml:"vm_name"`
	VM_Addr    string `json:"vm_addr" xml:"vm_addr"`
	EN_VM_Name string `json:"en_vm_name" xml:"en_vm_name"`
	EN_VM_Addr string `json:"en_vm_addr" xml:"en_vm_addr"`
	Token      string `json:"token" xml:"token"`
}

type Result

type Result struct {
	Ok   bool        `json:"ok" xml:"ok"`
	Msg  string      `json:"msg" xml:"msg"`
	Data interface{} `json:"data" xml:"data"`
}

Jump to

Keyboard shortcuts

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