mysql

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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FIELD_CONTEXT = "context"
	FIELD_QUERY   = "query"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQLConnector

type MySQLConnector struct {
	Resource MySQLOptions
	Action   MySQLQuery
}

func (*MySQLConnector) GetMetaInfo

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

func (*MySQLConnector) Run

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

func (*MySQLConnector) TestConnection

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

func (*MySQLConnector) ValidateActionTemplate

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

func (*MySQLConnector) ValidateResourceOptions

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

type MySQLOptions

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

type MySQLQuery

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

func (*MySQLQuery) IsSafeMode

func (q *MySQLQuery) IsSafeMode() bool

func (*MySQLQuery) SetRawQueryAndContext

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

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