Documentation ¶
Index ¶
- Constants
- Variables
- func InitLogger(level slog.Level)
- func LoadTLSConfig(x509SSLCertPath string) (*tls.Config, error)
- type BackendWrapper
- type Conn
- type Cursor
- type CursorType
- type DBOpener
- type DeclareCursorQuery
- type FetchQuery
- type Listener
- type MessageBuffer
- type MessageBufferInterface
- type ParsedConnString
- type PreparedStatement
- type QueryExecutor
- type QueryUtil
- type RealDBOpener
- type Receiver
- type SchemasSynchronizator
- type Server
- type ServerConfig
Constants ¶
View Source
const (
ApplicationName = "PostgresProxy"
)
View Source
const (
ServerVersion = "15.2.0"
)
Postgres settings.
Variables ¶
View Source
var ( POSTGRES_TO_VERTICA_TYPE_MAPPING = map[string]string{ "boolean": "boolean", "smallint": "int", "integer": "int", "bigint": "int", "real": "float", "numeric": "numeric", "decimal": "numeric", "date": "date", "timestamp": "timestamp", "timestamptz": "timestamptz", "time": "time", "interval": "interval", "varchar": "varchar", "text": "varchar", "bytea": "varbinary", "json": "long varchar", "jsonb": "long varchar", "uuid": "varchar(50)", "inet": "varchar(39)", "cidr": "varchar(43)", } VERTICA_TO_POSTGRES_TYPE_MAPPING = map[string]string{ "boolean": "boolean", "int": "bigint", "float": "double precision", "numeric": "numeric", "date": "date", "timestamp": "timestamp", "timestamptz": "timestamptz", "time": "time", "timetz": "timetz", "interval": "interval", } )
View Source
var Logger *slog.Logger = slog.Default()
Functions ¶
func InitLogger ¶
Types ¶
type BackendWrapper ¶
type BackendWrapper struct {
// contains filtered or unexported fields
}
func (*BackendWrapper) Receive ¶
func (bw *BackendWrapper) Receive() (pgproto3.FrontendMessage, error)
func (*BackendWrapper) ReceiveStartupMessage ¶
func (bw *BackendWrapper) ReceiveStartupMessage() (pgproto3.FrontendMessage, error)
type CursorType ¶
type CursorType string
const ( BINARY CursorType = "BINARY" TEXT CursorType = "TEXT" )
type DeclareCursorQuery ¶
type DeclareCursorQuery struct {
// contains filtered or unexported fields
}
type FetchQuery ¶
type MessageBuffer ¶
type MessageBuffer struct {
// contains filtered or unexported fields
}
type MessageBufferInterface ¶
type MessageBufferInterface interface {
// contains filtered or unexported methods
}
type ParsedConnString ¶
type ParsedConnString struct {
// contains filtered or unexported fields
}
type PreparedStatement ¶
type PreparedStatement struct {
// contains filtered or unexported fields
}
type QueryExecutor ¶
type QueryExecutor struct {
// contains filtered or unexported fields
}
type RealDBOpener ¶
type RealDBOpener struct{}
type SchemasSynchronizator ¶
type SchemasSynchronizator struct {
// contains filtered or unexported fields
}
func NewSchemasSynchronizator ¶
func NewSchemasSynchronizator(vConnStr string, pgConnStr string) (*SchemasSynchronizator, error)
func (*SchemasSynchronizator) Close ¶
func (s *SchemasSynchronizator) Close() (err error)
func (*SchemasSynchronizator) ListSchemas ¶
func (s *SchemasSynchronizator) ListSchemas() ([]string, error)
func (*SchemasSynchronizator) SyncDBschemas ¶
func (s *SchemasSynchronizator) SyncDBschemas() error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(config *ServerConfig) *Server
func (*Server) CloseClientConnection ¶
CloseClientConnection disconnects a Postgres connections.
func (*Server) CloseClientConnections ¶
CloseClientConnections disconnects all Postgres connections.
Click to show internal directories.
Click to hide internal directories.