server

package
v0.0.0-...-61c1579 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RowsToMaps

func RowsToMaps(rows *sql.Rows) ([]map[string]string, error)

Types

type AnonymizingFunction

type AnonymizingFunction func(interface{}) interface{}

type Column

type Column struct {
	Name         string `yaml:"name"`
	FunctionName string `yaml:"function"`
	// contains filtered or unexported fields
}

type Conf

type Conf struct {
	Columns   []*Column `yaml:"columns"`
	Port      int       `yaml:"port"`
	ServerURI string    `yaml:"server_uri"`
	// contains filtered or unexported fields
}

func GetConfig

func GetConfig() *Conf

func (*Conf) Anonymize

func (c *Conf) Anonymize(columnName string, columnType *sql.ColumnType, value interface{}) interface{}

type QueryColumnsHandler

type QueryColumnsHandler func(ctx context.Context, query string) (wire.Columns, error)

type QueryFuncs

type QueryFuncs struct {
	// contains filtered or unexported fields
}

type QueryHandler

type QueryHandler func(ctx context.Context, query string) QueryFuncs

type QueryType

type QueryType int
const (
	SELECT QueryType = iota
	INSERT
	UPDATE
	DELETE
	DROP
	CREATE
	DESCRIBE
)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer() (*Server, error)

func (*Server) Run

func (s *Server) Run() error

Jump to

Keyboard shortcuts

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