mssql

package
v0.0.0-...-9e48597 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERIFY_FULL_MODE     = "full"
	SKIP_CA_MODE         = "skip"
	ACTION_SQL_MODE      = "sql"
	ACTION_SQL_SAFE_MODE = "sql-safe"
	ACTION_GUI_MODE      = "gui"
	ACTION_GUI_TYPE      = "bulk_insert"
)
View Source
const (
	FIELD_CONTEXT = "context"
	FIELD_QUERY   = "query"
	FIELD_SQL     = "sql"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Query    map[string]interface{} `validate:"required"`
	Mode     string                 `validate:"required,oneof=gui sql sql-safe"`
	RawQuery string
	Context  map[string]interface{}
}

func (*Action) IsSafeMode

func (q *Action) IsSafeMode() bool

func (*Action) SetRawQueryAndContext

func (q *Action) SetRawQueryAndContext(rawTemplate map[string]interface{}) error

type Connector

type Connector struct {
	ResourceOpts Resource
	ActionOpts   Action
}

func (*Connector) GetMetaInfo

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

func (*Connector) Run

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

func (*Connector) TestConnection

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

func (*Connector) ValidateActionTemplate

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

func (*Connector) ValidateResourceOptions

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

type GUIQuery

type GUIQuery struct {
	Table   string
	Type    string
	Records []map[string]interface{}
}

type Resource

type Resource struct {
	Host           string `validate:"required"`
	Port           string `validate:"required"`
	DatabaseName   string `validate:"required"`
	Username       string
	Password       string
	ConnectionOpts []map[string]string `validate:"required"`
	SSL            SSLOptions
}

type SSLOptions

type SSLOptions struct {
	SSL              bool
	CACert           string
	PrivateKey       string
	ClientCert       string
	VerificationMode string `validate:"required,oneof=full skip"`
}

Jump to

Keyboard shortcuts

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