Documentation
¶
Overview ¶
Package router contains the handler for the database
Index ¶
- Constants
- func CORS() func(next http.Handler) http.Handler
- func MountRouter(handler DBHandler) (*http.ServeMux, error)
- type BaseHTMLData
- type DBHandler
- func (h DBHandler) CreeteNewTable(w http.ResponseWriter, r *http.Request)
- func (h DBHandler) DeleteRow(w http.ResponseWriter, r *http.Request)
- func (h *DBHandler) DeleteTable(w http.ResponseWriter, r *http.Request)
- func (h DBHandler) InsertOrUpdateRow(w http.ResponseWriter, r *http.Request)
- func (h DBHandler) ListColumns(w http.ResponseWriter, r *http.Request)
- func (h *DBHandler) ListHistory(w http.ResponseWriter, r *http.Request)
- func (h *DBHandler) ListRecentHistory(w http.ResponseWriter, r *http.Request)
- func (h DBHandler) ListRows(w http.ResponseWriter, r *http.Request)
- func (h DBHandler) ListTables(w http.ResponseWriter, r *http.Request)
- func (h DBHandler) NewTableFormFileds(w http.ResponseWriter, r *http.Request)
- func (h DBHandler) RowInsertForm(w http.ResponseWriter, r *http.Request)
- type DeleteTableRequest
- type ErrorMessage
- type ListRowsResponse
Constants ¶
View Source
const ( GET methodType = "GET" POST methodType = "POST" PUT methodType = "PUT" DELETE methodType = "DELETE" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseHTMLData ¶
type BaseHTMLData struct {
Tables []models.ListTablesRow
Cols []models.ListDataCol
ActiveTable string
}
type DBHandler ¶
type DBHandler struct {
// contains filtered or unexported fields
}
func (DBHandler) CreeteNewTable ¶
func (h DBHandler) CreeteNewTable(w http.ResponseWriter, r *http.Request)
func (*DBHandler) DeleteTable ¶
func (h *DBHandler) DeleteTable(w http.ResponseWriter, r *http.Request)
func (DBHandler) InsertOrUpdateRow ¶
func (h DBHandler) InsertOrUpdateRow(w http.ResponseWriter, r *http.Request)
func (DBHandler) ListColumns ¶
func (h DBHandler) ListColumns(w http.ResponseWriter, r *http.Request)
func (*DBHandler) ListHistory ¶
func (h *DBHandler) ListHistory(w http.ResponseWriter, r *http.Request)
func (*DBHandler) ListRecentHistory ¶
func (h *DBHandler) ListRecentHistory(w http.ResponseWriter, r *http.Request)
func (DBHandler) ListTables ¶
func (h DBHandler) ListTables(w http.ResponseWriter, r *http.Request)
func (DBHandler) NewTableFormFileds ¶
func (h DBHandler) NewTableFormFileds(w http.ResponseWriter, r *http.Request)
func (DBHandler) RowInsertForm ¶
func (h DBHandler) RowInsertForm(w http.ResponseWriter, r *http.Request)
type DeleteTableRequest ¶
type ErrorMessage ¶
type ErrorMessage struct {
Message string
}
type ListRowsResponse ¶
type ListRowsResponse struct {
Page int `json:"page"`
Rows models.ListDataRow `json:"rows"`
Cols []models.ListDataCol `json:"cols"`
RowCount int `json:"rowCount"`
ActiveTable string `json:"activeTable"`
HasNextPage bool `json:"hasNextPage"`
TotalPages int `json:"totalPages"`
}
Click to show internal directories.
Click to hide internal directories.