Documentation
¶
Index ¶
- Variables
- func GetHistory(c echo.Context) (err error)
- func GetLoadSession(c echo.Context) (err error)
- func GetSettings(c echo.Context) (err error)
- func PostFileOperation(c echo.Context) (err error)
- func PostSaveSession(c echo.Context) (err error)
- type FileItem
- type FileRequest
- type Operation
- type Request
- type RouteName
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Connections is all connections // Sync syncs to store Sync = store.Sync HomeDir = "" HomeDirEnvFile = "" )
View Source
var StandardRoutes = []echo.Route{ { Name: "Static", Method: "GET", Path: "/static/:folder/:name", Handler: contentHandler, Middlewares: []echo.MiddlewareFunc{contentRewrite}, }, { Name: "Assets Root", Method: "GET", Path: "/assets/:name", Handler: contentHandler, Middlewares: []echo.MiddlewareFunc{contentRewrite}, }, { Name: "Assets Connections", Method: "GET", Path: "/assets/:folder/:name", Handler: contentHandler, Middlewares: []echo.MiddlewareFunc{contentRewrite}, }, { Name: "getSettings", Method: "GET", Path: "/get-settings", Handler: GetSettings, }, { Name: "getHistory", Method: "GET", Path: "/get-history", Handler: GetHistory, }, { Name: "fileOperation", Method: "POST", Path: "/file-operation", Handler: PostFileOperation, }, { Name: "loadSession", Method: "GET", Path: "/load-session", Handler: GetLoadSession, }, { Name: "saveSession", Method: "POST", Path: "/save-session", Handler: PostSaveSession, }, }
Functions ¶
func GetHistory ¶
func GetHistory(c echo.Context) (err error)
GetHistory returns a a list of queries from the history.
func GetLoadSession ¶
func GetLoadSession(c echo.Context) (err error)
GetLoadSession loads session from store
func GetSettings ¶
func GetSettings(c echo.Context) (err error)
func PostFileOperation ¶
func PostFileOperation(c echo.Context) (err error)
PostFileOperation operates with the file system
func PostSaveSession ¶
func PostSaveSession(c echo.Context) (err error)
PostSaveSession saves a session to store
Types ¶
type FileItem ¶
type FileItem struct { Name string `json:"name" query:"name"` Path string `json:"path" query:"path"` IsDir bool `json:"isDir" query:"isDir"` ModTs int64 `json:"modTs" query:"modTs"` Body string `json:"body" query:"body"` }
FileItem represents a file
type FileRequest ¶
type FileRequest struct { Operation Operation `json:"operation" query:"operation"` File FileItem `json:"file" query:"file"` Overwrite bool `json:"overwrite" query:"overwrite"` }
FileRequest is the typical request struct for file operations
func (*FileRequest) List ¶
func (f *FileRequest) List() (items []FileItem, err error)
List lists files in a folder
func (*FileRequest) Read ¶
func (f *FileRequest) Read() (file FileItem, err error)
Read opens the file
type Request ¶
type Request struct { Name string `json:"name" query:"name"` Conn string `json:"conn" query:"conn"` Database string `json:"database" query:"database"` Schema string `json:"schema" query:"schema"` Table string `json:"table" query:"table"` Procedure string `json:"procedure" query:"procedure"` Data interface{} `json:"data" query:"data"` }
Request is the typical request struct
type RouteName ¶
type RouteName string
RouteName is the name of a route
const ( // RouteWs is the websocket route RouteIndex RouteName = "/" )
Click to show internal directories.
Click to hide internal directories.