postgresql

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetrieveToMap

func RetrieveToMap(rows pgx.Rows) ([]map[string]interface{}, error)

Types

type Connector

type Connector struct {
	Resource Options
	Action   Query
}

func (*Connector) GetMetaInfo

func (p *Connector) GetMetaInfo(resourceOptions map[string]interface{}) (common.MetaInfoResult, error)

func (*Connector) Run

func (p *Connector) Run(resourceOptions map[string]interface{}, actionOptions map[string]interface{}) (common.RuntimeResult, error)

func (*Connector) TestConnection

func (p *Connector) TestConnection(resourceOptions map[string]interface{}) (common.ConnectionResult, error)

func (*Connector) ValidateActionOptions

func (p *Connector) ValidateActionOptions(actionOptions map[string]interface{}) (common.ValidateResult, error)

func (*Connector) ValidateResourceOptions

func (p *Connector) ValidateResourceOptions(resourceOptions map[string]interface{}) (common.ValidateResult, error)

type Options

type Options struct {
	Host             string     `validate:"required"`
	Port             string     `validate:"required"`
	DatabaseName     string     `validate:"required"`
	DatabaseUsername string     `validate:"required"`
	DatabasePassword string     `validate:"required"`
	SSL              SSLOptions `validate:"required,omitempty"`
}

type Query

type Query struct {
	Mode  string `validate:"required,oneof=gui sql"`
	Query string
}

type SSLOptions

type SSLOptions struct {
	SSL        bool
	ServerCert string `validate:"required_unless=SSL false"`
	ClientKey  string
	ClientCert string
}

Jump to

Keyboard shortcuts

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