controller

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: AGPL-3.0 Imports: 47 Imported by: 0

Documentation

Overview

This file defines middlewares to be used in the pipeline defined in pipeline.go

This file defines a pipeline that can be used to modify a SQL query before running it on the server.

It works by chaining multiple middlewares For example it is used to rewrite MySQL specific queries to SQLite

Once the pipeline is run, the result is printed to the output file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AliasAdd

func AliasAdd(cmd *cobra.Command, args []string) error

func AliasDelete

func AliasDelete(cmd *cobra.Command, args []string) error

func AliasList

func AliasList(cmd *cobra.Command, args []string) error

func ConnectionAdd added in v0.1.4

func ConnectionAdd(cmd *cobra.Command, args []string) error

func ConnectionList added in v0.1.4

func ConnectionList(cmd *cobra.Command, args []string) error

func ConnectionRemove added in v0.1.4

func ConnectionRemove(cmd *cobra.Command, args []string) error

func DevInit

func DevInit(cmd *cobra.Command, args []string) error

func DevNewTable

func DevNewTable(cmd *cobra.Command, args []string) error

func HashDir

func HashDir(cmd *cobra.Command, args []string) error

func MySQLPassword

func MySQLPassword(cmd *cobra.Command, args []string) error

func PluginInstall

func PluginInstall(cmd *cobra.Command, args []string) error

func PluginUninstall

func PluginUninstall(cmd *cobra.Command, args []string) error

func PluginUpdate

func PluginUpdate(cmd *cobra.Command, args []string) error

func PluginsList

func PluginsList(cmd *cobra.Command, args []string) error

func ProfileDelete

func ProfileDelete(cmd *cobra.Command, args []string) error

func ProfileList

func ProfileList(cmd *cobra.Command, args []string) error

func ProfileNew

func ProfileNew(cmd *cobra.Command, args []string) error

func ProfileUpdate

func ProfileUpdate(cmd *cobra.Command, args []string) error

func Query

func Query(cmd *cobra.Command, args []string) error

func RegistryAdd

func RegistryAdd(cmd *cobra.Command, args []string) error

func RegistryGet

func RegistryGet(cmd *cobra.Command, args []string) error

func RegistryList

func RegistryList(cmd *cobra.Command, args []string) error

func RegistryRefresh

func RegistryRefresh(cmd *cobra.Command, args []string) error

func RegistryRemove

func RegistryRemove(cmd *cobra.Command, args []string) error

func Run added in v0.1.4

func Run(cmd *cobra.Command, args []string) error

func Server

func Server(cmd *cobra.Command, args []string) error

Types

type QueryData

type QueryData struct {

	// The query to exec before/after the query
	// Useful to create temporary tables
	PreExec, PostExec []string

	// The query to run
	SQLQuery string

	// The arguments to pass to the query
	Args []interface{}

	// The result of the query
	Result *sql.Rows

	// The database to connect to
	DB *sql.DB

	// The message to return to the client if Result is nil
	Message string

	// The status code of the message
	//
	//    - inferior or equal 0 => INFO
	//    - equal 1 => WARNING
	//    - greater than 2 => ERROR
	//
	StatusCode int

	// The configuration that will be passed to the middlewares
	// This is a reference to the configuration of the pipeline
	Config middlewareConfiguration
}

Directories

Path Synopsis
This file defines code to manage the internal database
This file defines code to manage the internal database

Jump to

Keyboard shortcuts

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