Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertMessageDataToJSON(data string) ([]byte, error)
- func GetUserName(user *casdoorsdk.User) string
- func InitAuthConfig()
- type ApiController
- func (c *ApiController) AddAsset()
- func (c *ApiController) AddAssetTunnel()
- func (c *ApiController) AddCommand()
- func (c *ApiController) AddRecord()
- func (c *ApiController) AddSession()
- func (c *ApiController) DeleteAsset()
- func (c *ApiController) DeleteCommand()
- func (c *ApiController) DeleteRecord()
- func (c *ApiController) DeleteSession()
- func (c *ApiController) ExecCommand()
- func (c *ApiController) GetAccount()
- func (c *ApiController) GetAsset()
- func (c *ApiController) GetAssetTunnel()
- func (c *ApiController) GetAssets()
- func (c *ApiController) GetCommand()
- func (c *ApiController) GetCommands()
- func (c *ApiController) GetConnSession()
- func (c *ApiController) GetExecOutput()
- func (c *ApiController) GetRecord()
- func (c *ApiController) GetRecords()
- func (c *ApiController) GetSessionClaims() *casdoorsdk.Claims
- func (c *ApiController) GetSessionUser() *casdoorsdk.User
- func (c *ApiController) GetSessionUsername() string
- func (c *ApiController) GetSessions()
- func (c *ApiController) IsAdmin() bool
- func (c *ApiController) IsGlobalAdmin() bool
- func (c *ApiController) RequireAdmin() (string, bool)
- func (c *ApiController) RequireSignedIn() bool
- func (c *ApiController) ResponseError(error string, data ...interface{})
- func (c *ApiController) ResponseErrorStream(errorText string)
- func (c *ApiController) ResponseOk(data ...interface{})
- func (c *ApiController) SetSessionClaims(claims *casdoorsdk.Claims)
- func (c *ApiController) SetSessionUser(user *casdoorsdk.User)
- func (c *ApiController) Signin()
- func (c *ApiController) Signout()
- func (c *ApiController) StartSession()
- func (c *ApiController) StopSession()
- func (c *ApiController) TunnelMonitor()
- func (c *ApiController) UpdateAsset()
- func (c *ApiController) UpdateCommand()
- func (c *ApiController) UpdateRecord()
- func (c *ApiController) UpdateSession()
- type Cleaner
- type GuacamoleHandler
- type RefinedWriter
- type Response
Constants ¶
Variables ¶
var JwtPublicKey string
Functions ¶
func ConvertMessageDataToJSON ¶ added in v1.32.0
func GetUserName ¶
func GetUserName(user *casdoorsdk.User) string
func InitAuthConfig ¶
func InitAuthConfig()
Types ¶
type ApiController ¶
type ApiController struct {
beego.Controller
}
func (*ApiController) AddAsset ¶
func (c *ApiController) AddAsset()
AddAsset @Title AddAsset @Tag Asset API @Description add a asset @Param body body object.Asset true "The details of the asset" @Success 200 {object} controllers.Response The Response object @router /add-asset [post]
func (*ApiController) AddAssetTunnel ¶
func (c *ApiController) AddAssetTunnel()
AddAssetTunnel @Title AddAssetTunnel @Tag Session API @Description add session @Param assetId query string true "The id of asset" @Success 200 {object} Response @router /add-asset-tunnel [get]
func (*ApiController) AddCommand ¶ added in v1.32.0
func (c *ApiController) AddCommand()
AddCommand @Title AddCommand @Tag Command API @Description add a command @Param command body object.Command true "The command object" @Success 200 {string} The Response object @router /add-command [post]
func (*ApiController) AddRecord ¶
func (c *ApiController) AddRecord()
AddRecord @Title AddRecord @Tag Record API @Description add a record @Param body body object.Record true "The details of the record" @Success 200 {object} controllers.Response The Response object @router /add-record [post]
func (*ApiController) AddSession ¶
func (c *ApiController) AddSession()
AddSession @Title AddSession @Tag Session API @Description add session @Param body body object.Session @Success 200 {object} Response @router /add-session [post]
func (*ApiController) DeleteAsset ¶
func (c *ApiController) DeleteAsset()
DeleteAsset @Title DeleteAsset @Tag Asset API @Description delete a asset @Param body body object.Asset true "The details of the asset" @Success 200 {object} controllers.Response The Response object @router /delete-asset [post]
func (*ApiController) DeleteCommand ¶ added in v1.32.0
func (c *ApiController) DeleteCommand()
DeleteCommand @Title DeleteCommand @Tag Command API @Description delete the command @Param id query string true "The id ( owner/name ) of the command" @Success 200 {string} The Response object @router /delete-command [post]
func (*ApiController) DeleteRecord ¶
func (c *ApiController) DeleteRecord()
DeleteRecord @Title DeleteRecord @Tag Record API @Description delete a record @Param body body object.Record true "The details of the record" @Success 200 {object} controllers.Response The Response object @router /delete-record [post]
func (*ApiController) DeleteSession ¶
func (c *ApiController) DeleteSession()
DeleteSession @Title DeleteSession @Tag Session API @Description delete session @Param id query string true "The id of session" @Success 200 {object} Response @router /delete-session [post]
func (*ApiController) ExecCommand ¶ added in v1.32.0
func (c *ApiController) ExecCommand()
ExecCommand @Title ExecCommand @Tag Command API @Description execute the command @Param id query string true "The id ( owner/name ) of the command" @Param assetId query string true "The id of the asset" @Success 200 {stream} string "An event stream of the command output in multiple ssh terminal" @router /exec-command [get]
func (*ApiController) GetAccount ¶
func (c *ApiController) GetAccount()
func (*ApiController) GetAsset ¶
func (c *ApiController) GetAsset()
GetAsset @Title GetAsset @Tag Asset API @Description get asset @Param id query string true "The id ( owner/name ) of the asset" @Success 200 {object} object.Asset The Response object @router /get-asset [get]
func (*ApiController) GetAssetTunnel ¶
func (c *ApiController) GetAssetTunnel()
func (*ApiController) GetAssets ¶
func (c *ApiController) GetAssets()
GetAssets @Title GetAssets @Tag Asset API @Description get all assets @Param pageSize query string true "The size of each page" @Param p query string true "The number of the page" @Success 200 {object} object.Asset The Response object @router /get-assets [get]
func (*ApiController) GetCommand ¶ added in v1.32.0
func (c *ApiController) GetCommand()
GetCommand @Title GetCommand @Tag Command API @Description get the command @Param id query string true "The id ( owner/name ) of the command" @Success 200 {object} object.Command The Response object @router /get-command [get]
func (*ApiController) GetCommands ¶ added in v1.32.0
func (c *ApiController) GetCommands()
GetCommands @Title GetCommands @Tag Command API @Description get all commands @Param pageSize query string true "The size of each page" @Param p query string true "The number of the page" @Success 200 {object} object.Command The Response object @router /get-commands [get]
func (*ApiController) GetConnSession ¶
func (c *ApiController) GetConnSession()
GetConnSession @Title GetConnSession @Tag Session API @Description get session @Param id query string true "The id of session" @Success 200 {object} object.Session @router /get-session [get]
func (*ApiController) GetExecOutput ¶ added in v1.32.0
func (c *ApiController) GetExecOutput()
func (*ApiController) GetRecord ¶
func (c *ApiController) GetRecord()
GetRecord @Title GetRecord @Tag Record API @Description get record @Param id query string true "The id ( owner/name ) of the record" @Success 200 {object} object.Record The Response object @router /get-record [get]
func (*ApiController) GetRecords ¶
func (c *ApiController) GetRecords()
GetRecords @Title GetRecords @Tag Record API @Description get all records @Param pageSize query string true "The size of each page" @Param p query string true "The number of the page" @Success 200 {object} object.Record The Response object @router /get-records [get]
func (*ApiController) GetSessionClaims ¶
func (c *ApiController) GetSessionClaims() *casdoorsdk.Claims
func (*ApiController) GetSessionUser ¶
func (c *ApiController) GetSessionUser() *casdoorsdk.User
func (*ApiController) GetSessionUsername ¶
func (c *ApiController) GetSessionUsername() string
func (*ApiController) GetSessions ¶
func (c *ApiController) GetSessions()
GetSessions @Title GetSessions @Tag Session API @Description get all sessions @Param pageSize query string true "The size of each page" @Param p query string true "The number of the page" @Success 200 {object} object.Session The Response object @router /get-sessions [get]
func (*ApiController) IsAdmin ¶
func (c *ApiController) IsAdmin() bool
func (*ApiController) IsGlobalAdmin ¶
func (c *ApiController) IsGlobalAdmin() bool
func (*ApiController) RequireAdmin ¶
func (c *ApiController) RequireAdmin() (string, bool)
func (*ApiController) RequireSignedIn ¶
func (c *ApiController) RequireSignedIn() bool
func (*ApiController) ResponseError ¶
func (c *ApiController) ResponseError(error string, data ...interface{})
func (*ApiController) ResponseErrorStream ¶ added in v1.32.0
func (c *ApiController) ResponseErrorStream(errorText string)
func (*ApiController) ResponseOk ¶
func (c *ApiController) ResponseOk(data ...interface{})
func (*ApiController) SetSessionClaims ¶
func (c *ApiController) SetSessionClaims(claims *casdoorsdk.Claims)
func (*ApiController) SetSessionUser ¶
func (c *ApiController) SetSessionUser(user *casdoorsdk.User)
func (*ApiController) Signin ¶
func (c *ApiController) Signin()
func (*ApiController) Signout ¶
func (c *ApiController) Signout()
func (*ApiController) StartSession ¶
func (c *ApiController) StartSession()
func (*ApiController) StopSession ¶
func (c *ApiController) StopSession()
func (*ApiController) TunnelMonitor ¶
func (c *ApiController) TunnelMonitor()
func (*ApiController) UpdateAsset ¶
func (c *ApiController) UpdateAsset()
UpdateAsset @Title UpdateAsset @Tag Asset API @Description update asset @Param id query string true "The id ( owner/name ) of the asset" @Param body body object.Asset true "The details of the asset" @Success 200 {object} controllers.Response The Response object @router /update-asset [post]
func (*ApiController) UpdateCommand ¶ added in v1.32.0
func (c *ApiController) UpdateCommand()
UpdateCommand @Title UpdateCommand @Tag Command API @Description update the command @Param id query string true "The id ( owner/name ) of the command" @Param command body object.Command true "The command object" @Success 200 {string} The Response object @router /update-command [post]
func (*ApiController) UpdateRecord ¶
func (c *ApiController) UpdateRecord()
UpdateRecord @Title UpdateRecord @Tag Record API @Description update record @Param id query string true "The id ( owner/name ) of the record" @Param body body object.Record true "The details of the record" @Success 200 {object} controllers.Response The Response object @router /update-record [post]
func (*ApiController) UpdateSession ¶
func (c *ApiController) UpdateSession()
UpdateSession @Title UpdateSession @Tag Session API @Description update session @Param id query string true "The id of session" @Param body body object.Session @Success 200 {object} Response @router /update-session [post]
type Cleaner ¶ added in v1.32.0
type Cleaner struct {
// contains filtered or unexported fields
}
func NewCleaner ¶ added in v1.32.0
func (*Cleaner) GetCleanedData ¶ added in v1.32.0
type GuacamoleHandler ¶
type GuacamoleHandler struct {
// contains filtered or unexported fields
}
func NewGuacamoleHandler ¶
func NewGuacamoleHandler(ws *websocket.Conn, tunnel *guacamole.Tunnel) *GuacamoleHandler
func (GuacamoleHandler) Start ¶
func (r GuacamoleHandler) Start()
func (GuacamoleHandler) Stop ¶
func (r GuacamoleHandler) Stop()
type RefinedWriter ¶ added in v1.32.0
func (*RefinedWriter) String ¶ added in v1.32.0
func (w *RefinedWriter) String() string