api

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2017 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DbClient   *client.Client
	DbSessions = map[string]*client.Client{}
)

Functions

func Connect

func Connect(c *gin.Context)

func ConnectWithBackend added in v0.9.9

func ConnectWithBackend(c *gin.Context)

func DB added in v0.8.0

func DB(c *gin.Context) *client.Client

func DataExport added in v0.9.9

func DataExport(c *gin.Context)

Export database or table data

func Disconnect added in v0.9.2

func Disconnect(c *gin.Context)

func ExplainQuery

func ExplainQuery(c *gin.Context)

func GetActivity

func GetActivity(c *gin.Context)

func GetAsset

func GetAsset(c *gin.Context)

func GetBookmarks

func GetBookmarks(c *gin.Context)

func GetConnectionInfo

func GetConnectionInfo(c *gin.Context)

func GetDatabases

func GetDatabases(c *gin.Context)

func GetHistory

func GetHistory(c *gin.Context)

func GetHome

func GetHome(c *gin.Context)

func GetInfo

func GetInfo(c *gin.Context)

func GetObjects added in v0.9.0

func GetObjects(c *gin.Context)

func GetSchemas

func GetSchemas(c *gin.Context)

func GetSessions added in v0.8.0

func GetSessions(c *gin.Context)

func GetTable

func GetTable(c *gin.Context)

func GetTableConstraints added in v0.7.0

func GetTableConstraints(c *gin.Context)

func GetTableIndexes

func GetTableIndexes(c *gin.Context)

func GetTableInfo

func GetTableInfo(c *gin.Context)

func GetTableRows

func GetTableRows(c *gin.Context)

func HandleQuery

func HandleQuery(query string, c *gin.Context)

func RunQuery

func RunQuery(c *gin.Context)

func SetupMiddlewares added in v0.6.3

func SetupMiddlewares(group *gin.RouterGroup)

func SetupRoutes

func SetupRoutes(router *gin.Engine)

func StartSessionCleanup added in v0.9.9

func StartSessionCleanup()

func SwitchDb added in v0.9.6

func SwitchDb(c *gin.Context)

Types

type Backend added in v0.9.9

type Backend struct {
	Endpoint    string
	Token       string
	PassHeaders string
}

func (Backend) FetchCredential added in v0.9.9

func (be Backend) FetchCredential(resource string, c *gin.Context) (*BackendCredential, error)

type BackendCredential added in v0.9.9

type BackendCredential struct {
	DatabaseUrl string `json:"database_url"`
}

type BackendRequest added in v0.9.9

type BackendRequest struct {
	Resource string            `json:"resource"`
	Token    string            `json:"token"`
	Headers  map[string]string `json:"headers"`
}

type Error

type Error struct {
	Message string `json:"error"`
}

func NewError

func NewError(err error) Error

Jump to

Keyboard shortcuts

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