templates

package
v0.0.0-...-84d0236 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const AUTO_QUERY string = `` /* 1224-byte string literal not displayed */
View Source
const ENUM_TEMPLATE string = `` /* 515-byte string literal not displayed */

Enum definition

View Source
const ENUM_TREE_BODY_TEMPLATE string = `<li>%s</li>`
View Source
const ENUM_TREE_CLOSE string = `</ul>`
View Source
const ENUM_TREE_ERROR_BODY string = `
	<li class="py-2">
		<p class="text-xs text-red-500">Error Loading Tables: %s</p>
	</li>
`
View Source
const ENUM_TREE_OPEN string = `<ul hx-swap-oob="outerHTML" id="database-enum-tree" class="space-y-2">`

Enum tree definition

View Source
const ENUM_VALUES_LIST_CLOSE string = `</ul>`
View Source
const ENUM_VALUES_LIST_OPEN string = `<ul id="enum-values-%s" class="hidden ml-6 mt-1 space-y-1 text-gray-600">`

Enum values definition

View Source
const ENUM_VALUE_TEMPLATE string = `` /* 335-byte string literal not displayed */
View Source
const LIST_CLOSE string = `</select>`
View Source
const LIST_ITEM string = `<option value='{"driver": "%s", "url": "%s"}'%s>%s</option>`
View Source
const LIST_OPEN string = `` /* 228-byte string literal not displayed */

List item templates

View Source
const MANAGER string = `` /* 2169-byte string literal not displayed */
View Source
const MANAGER_CLOSED string = `` /* 214-byte string literal not displayed */
View Source
const MANAGER_ENTRY string = `` /* 503-byte string literal not displayed */
View Source
const MANUAL_QUERY string = `` /* 1139-byte string literal not displayed */
View Source
const TABLE_FIELDS_LIST_CLOSE string = `</ul>`
View Source
const TABLE_FIELDS_LIST_OPEN string = `<ul id="fields-%s" class="hidden ml-6 mt-1 space-y-1 text-gray-600">`

Fields definition

View Source
const TABLE_FIELD_TEMPLATE string = `` /* 452-byte string literal not displayed */
View Source
const TABLE_TEMPLATE string = `` /* 993-byte string literal not displayed */

Table definition

View Source
const TABLE_TREE_BODY_TEMPLATE string = `<li>%s</li>`
View Source
const TABLE_TREE_CLOSE string = `</ul>`
View Source
const TABLE_TREE_ERROR_BODY string = `
	<li class="py-2">
		<p class="text-xs text-red-500">Error Loading Tables: %s</p>
	</li>
`
View Source
const TABLE_TREE_OPEN string = `<ul hx-swap-oob="outerHTML" id="database-table-tree" class="space-y-2">`

Table tree definition

View Source
const TREE_VIEW_NAME string = `<span hx-swap-oob="outerHTML" id="database-name-tree">%s</span>`

Variables

This section is empty.

Functions

func ConcatResults

func ConcatResults(items []string) string

func ConnectionsList

func ConnectionsList(connections map[string][2]string, current string) string

Generate a list of connections to display in the drop-down. Current connection will be toggled as selected

func EnumTree

func EnumTree(enums map[string][]string) string

Generate the HTML string for the enum tree

func EnumTreeError

func EnumTreeError(err error) string

When an error occurs while generating the enum tree, this function will return the HTML for the error message.

func ErrorQueryResults

func ErrorQueryResults(e error) string

func HideManager

func HideManager(c *gin.Context)

func OpenManager

func OpenManager(c *gin.Context)

func QueryResult

func QueryResult(cols []string, rows []map[string]interface{}) string

func TableTree

func TableTree(tree map[string][]model.Column) string

Generate the tree based on the database tables and columns

func TableTreeError

func TableTreeError(err error) string

When an error occurs while generating the table tree, this function will return the HTML for the error message.

func ToggleQueryType

func ToggleQueryType(c *gin.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

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