dto

package
v0.5.612 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthAPIKeyStr                   string = "api_key"
	AuthAWSSigningv4Str             string = "aws_signing_v4"
	AuthAzureDefaultStr             string = "azure_default"
	AuthBasicStr                    string = "basic"
	AuthBearerStr                   string = "bearer"
	AuthCustomStr                   string = "custom"
	AuthInteractiveStr              string = "interactive"
	AuthServiceAccountStr           string = "service_account"
	AuthNullStr                     string = "null_auth"
	DarkColorScheme                 string = "dark"
	LightColorScheme                string = "light"
	NullColorScheme                 string = "null"
	DefaultColorScheme              string = DarkColorScheme
	DefaultWindowsColorScheme       string = NullColorScheme
	DryRunFlagKey                   string = "dryrun"
	ExecutionConcurrencyLimitKey    string = "execution.concurrency.limit"
	AuthCtxKey                      string = "auth"
	APIRequestTimeoutKey            string = "apirequesttimeout"
	CacheKeyCountKey                string = "cachekeycount"
	CacheTTLKey                     string = "metadatattl"
	ColorSchemeKey                  string = "colorscheme"
	ConfigFilePathKey               string = "configfile"
	CPUProfileKey                   string = "cpuprofile"
	CSVHeadersDisableKey            string = "hideheaders"
	DelimiterKey                    string = "delimiter"
	ErrorPresentationKey            string = "errorpresentation"
	IndirectDepthMaxKey             string = "indirect.depth.max"
	DataflowDependencyMaxKey        string = "dataflow.dependency.max"
	HTTPLogEnabledKey               string = "http.log.enabled"
	HTTPMaxResultsKey               string = "http.response.maxResults"
	HTTPPAgeLimitKey                string = "http.response.pageLimit"
	HTTPProxyHostKey                string = "http.proxy.host"
	HTTPProxyPasswordKey            string = "http.proxy.password" //nolint:gosec // no hardcoded credentials
	HTTPProxyPortKey                string = "http.proxy.port"
	HTTPProxySchemeKey              string = "http.proxy.scheme"
	HTTPProxyUserKey                string = "http.proxy.user"
	CABundleKey                     string = "tls.CABundle"
	AllowInsecureKey                string = "tls.allowInsecure"
	InfilePathKey                   string = "infile"
	LogLevelStrKey                  string = "loglevel"
	OutfilePathKey                  string = "outfile"
	OutputFormatKey                 string = "output"
	ApplicationFilesRootPathKey     string = "approot"
	ApplicationFilesRootPathModeKey string = "approotfilemode"
	PgSrvAddressKey                 string = "pgsrv.address"
	PgSrvLogLevelKey                string = "pgsrv.loglevel"
	PgSrvPortKey                    string = "pgsrv.port"
	PgSrvRawTLSCfgKey               string = "pgsrv.tls"
	ProviderStrKey                  string = "provider"
	QueryCacheSizeKey               string = "querycachesize"
	RegistryRawKey                  string = "registry"
	SessionCtxKey                   string = "session"
	GCCfgRawKey                     string = "gc"
	ACIDCfgRawKey                   string = "acid"
	NamespaceCfgRawKey              string = "namespaces"
	SQLBackendCfgRawKey             string = "sqlBackend"
	DBInternalCfgRawKey             string = "dbInternal"
	StoreTxnCfgRawKey               string = "store.txn"
	TemplateCtxFilePathKey          string = "iqldata"
	TestWithoutAPICallsKey          string = "TestWithoutAPICalls"
	UseNonPreferredAPIsKEy          string = "usenonpreferredapis"
	VarListKey                      string = "var"
	VerboseFlagKey                  string = "verbose"
	ViperCfgFileNameKey             string = "viperconfigfilename"
	WorkOfflineKey                  string = "offline"
)

Variables

This section is empty.

Functions

func GetNamespaceCfg

func GetNamespaceCfg(s string) (map[string]NamespaceCfg, error)

Types

type AuthCtx

type AuthCtx struct {
	Scopes                  []string       `json:"scopes,omitempty" yaml:"scopes,omitempty"`
	SQLCfg                  *SQLBackendCfg `json:"sqlDataSource" yaml:"sqlDataSource"`
	Type                    string         `json:"type" yaml:"type"`
	ValuePrefix             string         `json:"valuePrefix" yaml:"valuePrefix"`
	ID                      string         `json:"-" yaml:"-"`
	KeyID                   string         `json:"keyID" yaml:"keyID"`
	KeyIDEnvVar             string         `json:"keyIDenvvar" yaml:"keyIDenvvar"`
	KeyFilePath             string         `json:"credentialsfilepath" yaml:"credentialsfilepath"`
	KeyFilePathEnvVar       string         `json:"credentialsfilepathenvvar" yaml:"credentialsfilepathenvvar"`
	KeyEnvVar               string         `json:"credentialsenvvar" yaml:"credentialsenvvar"`
	APIKeyStr               string         `json:"api_key" yaml:"api_key"`
	APISecretStr            string         `json:"api_secret" yaml:"api_secret"`
	Username                string         `json:"username" yaml:"username"`
	Password                string         `json:"password" yaml:"password"`
	EnvVarAPIKeyStr         string         `json:"api_key_var" yaml:"api_key_var"`
	EnvVarAPISecretStr      string         `json:"api_secret_var" yaml:"api_secret_var"`
	EnvVarUsername          string         `json:"username_var" yaml:"username_var"`
	EnvVarPassword          string         `json:"password_var" yaml:"password_var"`
	EncodedBasicCredentials string         `json:"-" yaml:"-"`
	Successor               *AuthCtx       `json:"successor" yaml:"successor"`
	Active                  bool           `json:"-" yaml:"-"`
	Location                string         `json:"location" yaml:"location"`
	Name                    string         `json:"name" yaml:"name"`
}

func GetAuthCtx

func GetAuthCtx(scopes []string, keyFilePath string, keyFileType string) *AuthCtx

func (*AuthCtx) Clone

func (ac *AuthCtx) Clone() *AuthCtx

func (*AuthCtx) GetAwsSessionTokenString added in v0.5.587

func (ac *AuthCtx) GetAwsSessionTokenString() (string, error)

func (*AuthCtx) GetCredentialsBytes

func (ac *AuthCtx) GetCredentialsBytes() ([]byte, error)

func (*AuthCtx) GetCredentialsSourceDescriptorString

func (ac *AuthCtx) GetCredentialsSourceDescriptorString() string

func (*AuthCtx) GetInlineBasicCredentials added in v0.5.375

func (ac *AuthCtx) GetInlineBasicCredentials() string

func (*AuthCtx) GetKeyIDString

func (ac *AuthCtx) GetKeyIDString() (string, error)

func (*AuthCtx) GetSQLCfg

func (ac *AuthCtx) GetSQLCfg() (SQLBackendCfg, bool)

func (*AuthCtx) GetSuccessor added in v0.5.547

func (ac *AuthCtx) GetSuccessor() (*AuthCtx, bool)

func (*AuthCtx) HasKey

func (ac *AuthCtx) HasKey() bool

func (*AuthCtx) InferAuthType

func (ac *AuthCtx) InferAuthType(authTypeRequested string) string

type DBMSInternalCfg

type DBMSInternalCfg struct {
	ShowRegex   string `json:"showRegex" yaml:"showRegex"`
	TableRegex  string `json:"tableRegex" yaml:"tableRegex"`
	SchemaRegex string `json:"schemaRegex" yaml:"schemaRegex"`
	FuncRegex   string `json:"funcRegex" yaml:"funcRegex"`
}

func GetDBMSInternalCfg

func GetDBMSInternalCfg(s string) (DBMSInternalCfg, error)

type GCCfg

type GCCfg struct {
	IsEager bool `json:"isEager" yaml:"isEager"`
}

func GetGCCfg

func GetGCCfg(s string) (GCCfg, error)

type KStoreCfg

type KStoreCfg struct {
	IsPlaceholder bool `json:"isPlaceholder" yaml:"isPlaceholder"`
}

func GetKStoreCfg

func GetKStoreCfg(s string) (KStoreCfg, error)

type NamespaceCfg

type NamespaceCfg struct {
	RegexpStr         string `json:"regex" yaml:"regex"`
	TTL               int    `json:"ttl" yaml:"ttl"`
	NamespaceTemplate string `json:"template" yaml:"template"`
}

func (NamespaceCfg) GetRegex

func (nc NamespaceCfg) GetRegex() (*regexp.Regexp, error)

func (NamespaceCfg) GetTemplate

func (nc NamespaceCfg) GetTemplate() (*template.Template, error)

type OutputPacket

type OutputPacket interface {
	GetRows() map[string]map[string]interface{}
	GetRawRows() map[int]map[int]interface{}
	GetColumnNames() []string
	GetColumnOIDs() []oid.Oid
}

func NewStandardOutputPacket

func NewStandardOutputPacket(
	rowMaps map[string]map[string]interface{},
	rawRows map[int]map[int]interface{},
	columnNames []string,
	columnOIDs []oid.Oid,
) OutputPacket

type PgTLSCfg

type PgTLSCfg struct {
	KeyFilePath  string   `json:"keyFilePath" yaml:"keyFilePath"`
	CertFilePath string   `json:"certFilePath" yaml:"certFilePath"`
	KeyContents  string   `json:"keyContents" yaml:"keyContents"`
	CertContents string   `json:"certContents" yaml:"certContents"`
	ClientCAs    []string `json:"clientCAs" yaml:"clientCAs"`
}

func (PgTLSCfg) GetKeyPair

func (pc PgTLSCfg) GetKeyPair() (tls.Certificate, error)

type RuntimeCtx

type RuntimeCtx struct {
	APIRequestTimeout            int
	AuthRaw                      string
	CABundle                     string
	AllowInsecure                bool
	CacheKeyCount                int
	CacheTTL                     int
	ColorScheme                  string
	ConfigFilePath               string
	CPUProfile                   string
	CSVHeadersDisable            bool
	Delimiter                    string
	DryRunFlag                   bool
	ErrorPresentation            string
	ExecutionConcurrencyLimit    int
	HTTPLogEnabled               bool
	HTTPMaxResults               int
	HTTPPageLimit                int
	HTTPProxyHost                string
	HTTPProxyPassword            string
	HTTPProxyPort                int
	HTTPProxyScheme              string
	HTTPProxyUser                string
	IndirectDepthMax             int
	DataflowDependencyMax        int
	InfilePath                   string
	LogLevelStr                  string
	OutfilePath                  string
	OutputFormat                 string
	ApplicationFilesRootPath     string
	ApplicationFilesRootPathMode uint32
	PGSrvAddress                 string
	PGSrvLogLevel                string
	PGSrvPort                    int
	PGSrvRawTLSCfg               string
	ProviderStr                  string
	RegistryRaw                  string
	SessionCtxRaw                string
	SQLBackendCfgRaw             string
	DBInternalCfgRaw             string
	NamespaceCfgRaw              string
	StoreTxnCfgRaw               string
	GCCfgRaw                     string
	ACIDCfgRaw                   string
	QueryCacheSize               int
	TemplateCtxFilePath          string
	TestWithoutAPICalls          bool
	UseNonPreferredAPIs          bool
	VarList                      []string
	VerboseFlag                  bool
	ViperCfgFileName             string
	WorkOffline                  bool
}

func (*RuntimeCtx) Set

func (rc *RuntimeCtx) Set(key string, val string) error

type SQLBackendCfg

type SQLBackendCfg struct {
	DBEngine              string             `json:"dbEngine" yaml:"dbEngine"`
	DSN                   string             `json:"dsn" yaml:"dsn"`
	DSNEnvVar             string             `json:"dsnEnvVar" yaml:"dsnEnvVar"`
	Schemata              SQLBackendSchemata `json:"schemata" yaml:"schemata"`
	DbInitFilePath        string             `json:"dbInitFilepath" yaml:"dbInitFilepath"` //nolint:stylecheck,lll // parity with JSON key
	SQLSystem             string             `json:"sqlDialect" yaml:"sqlDialect"`
	SchemaType            string             `json:"schemaType" yaml:"schemaType"`
	InitMaxRetries        int                `json:"initMaxRetries" yaml:"initMaxRetries"`
	InitRetryInitialDelay int                `json:"initRetryInitialDelay" yaml:"initRetryInitialDelay"`
}

func GetSQLBackendCfg

func GetSQLBackendCfg(s string) (SQLBackendCfg, error)

func (SQLBackendCfg) GetDSN

func (sqlCfg SQLBackendCfg) GetDSN() string

func (SQLBackendCfg) GetDatabaseName

func (sqlCfg SQLBackendCfg) GetDatabaseName() (string, error)

func (SQLBackendCfg) GetIntelViewSchemaName

func (sqlCfg SQLBackendCfg) GetIntelViewSchemaName() string

func (SQLBackendCfg) GetOpsViewSchemaName

func (sqlCfg SQLBackendCfg) GetOpsViewSchemaName() string

func (SQLBackendCfg) GetSQLDialect added in v0.5.396

func (sqlCfg SQLBackendCfg) GetSQLDialect() string

func (SQLBackendCfg) GetSchemaType

func (sqlCfg SQLBackendCfg) GetSchemaType() string

func (SQLBackendCfg) GetTableSchemaName

func (sqlCfg SQLBackendCfg) GetTableSchemaName() string

type SQLBackendSchemata

type SQLBackendSchemata struct {
	TableSchema     string `json:"tableSchema" yaml:"tableSchema"`
	IntelViewSchema string `json:"intelViewSchema" yaml:"intelViewSchema"`
	OpsViewSchema   string `json:"opsViewSchema" yaml:"opsViewSchema"`
}

type SessionContext added in v0.5.403

type SessionContext interface {
	Clone() SessionContext
	GetIsolationLevel() constants.IsolationLevel
	UpdateIsolationLevel(string) error
	GetRollbackType() constants.RollbackType
	UpdateRollbackType(string) error
}

func NewSessionContext added in v0.5.403

func NewSessionContext(cfgStr string) (SessionContext, error)

type SessionCtxConfig added in v0.5.403

type SessionCtxConfig struct {
	IsolationLevel string `json:"isolation_level" yaml:"isolation_level"`
	RollbackType   string `json:"rollback_type" yaml:"rollback_type"`
}

type TxnCoordinatorCfg added in v0.5.375

type TxnCoordinatorCfg struct {
	MaxTxnDepth *int `json:"maxTransactionDepth" yaml:"maxTransactionDepth"`
}

func GetTxnCoordinatorCfgCfg added in v0.5.375

func GetTxnCoordinatorCfgCfg(s string) (TxnCoordinatorCfg, error)

func (TxnCoordinatorCfg) GetMaxTxnDepth added in v0.5.375

func (t TxnCoordinatorCfg) GetMaxTxnDepth() int

Jump to

Keyboard shortcuts

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