Documentation ¶
Index ¶
- Variables
- func Add_Handle(method, pattern string, handler http.Handler)
- func Add_HandleFunc(method, pattern string, handler func(http.ResponseWriter, *http.Request))
- func Init_Templates(dirName string, suffix string) error
- func Pprof_handler(w http.ResponseWriter, r *http.Request)
- func Run()
- func SSHWebSocketHandler(w http.ResponseWriter, r *http.Request)
- type Console
- func (c *Console) ChkSSHSrvAddr(w http.ResponseWriter, r *http.Request)
- func (c *Console) ConsoleLogin(w http.ResponseWriter, r *http.Request)
- func (c *Console) ConsoleLoginPage(w http.ResponseWriter, r *http.Request)
- func (c *Console) ConsoleLogout(w http.ResponseWriter, r *http.Request)
- func (c *Console) ConsoleMainPage(w http.ResponseWriter, r *http.Request)
- type ConsoleMainPageData
- type Context
- func (c *Context) BasicAuth(s string)
- func (c *Context) GetFormValue(key string) string
- func (c *Context) GetFormValues(v string) []string
- func (c *Context) GetJsonByte() []byte
- func (c *Context) GetSessionUser() interface{}
- func (c *Context) IsLogin() bool
- func (c *Context) OutHtml(tpl string, obj interface{})
- func (c *Context) OutJson(obj interface{})
- func (c *Context) OutXML(obj interface{})
- func (c *Context) Redirect(url string)
- func (c *Context) SetContentType(t string)
- type LoginPageData
- type Result
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Conf, _ = apibox.Get_Conf()
)
Functions ¶
func Add_Handle ¶
func Add_HandleFunc ¶
func Add_HandleFunc(method, pattern string, handler func(http.ResponseWriter, *http.Request))
func Init_Templates ¶
func Pprof_handler ¶
func Pprof_handler(w http.ResponseWriter, r *http.Request)
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 ¶
func NewContext ¶
func NewContext(w http.ResponseWriter, r *http.Request) *Context
func (*Context) GetFormValue ¶
func (*Context) GetFormValues ¶
func (*Context) GetJsonByte ¶
func (*Context) GetSessionUser ¶
func (c *Context) GetSessionUser() interface{}
func (*Context) SetContentType ¶
type LoginPageData ¶
Click to show internal directories.
Click to hide internal directories.