database

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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const CONNECTION_FAILURE string = `` /* 273-byte string literal not displayed */
View Source
const CONNECTION_SUCCESS string = `` /* 286-byte string literal not displayed */

Variables

This section is empty.

Functions

func ChangeConnection

func ChangeConnection(c *gin.Context)

Change the current connection in the session

func CreateConnection

func CreateConnection(c *gin.Context)

Create a new connection to a database and store the details in the session. The connections are stored as follows:

{
  "connections": {
    "connection-name": ["url", "driver"]
  },
  "current": "connection-name"
}

func EditConnections

func EditConnections(c *gin.Context)

func EnumTree

func EnumTree(c *gin.Context) string

Generate the tree of the database enums and their values

func QueryCurrent

func QueryCurrent(c *gin.Context)

func TableTree

func TableTree(c *gin.Context) string

Return an HTML string with the contents of the database tables in tree format

func TestConnectionURL

func TestConnectionURL(c *gin.Context)

Test a connection to a database

Types

type ConnectListItem

type ConnectListItem struct {
	Driver string `json:"driver"`
	URL    string `json:"url"`
}

Connections in the drop down are stored in a JSON format, which this object will be mapped to.

Jump to

Keyboard shortcuts

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