Documentation ¶
Index ¶
- func Authorize(db *sql.DB, userIdentifier string, userPassword string) (bool, string, error)
- func CheckMemLock(bucket string, key string) bool
- func GetExtensionAuthComponents(config map[string]interface{}) map[string]interface{}
- func GetLocalVaultAddr() string
- func GetSupportedSourceRegions() []string
- func GetSyncedTables() []string
- func GetTestConfig(tokenPtr *string, wantPluginPaths bool) map[string]interface{}
- func GetTestDeployConfig(tokenPtr *string) map[string]interface{}
- func GetTrcDbUrl(data map[string]interface{}) string
- func NewOptionsBuilder(opts ...Option)
- func ProcessPluginEnvConfig(pluginEnvConfig map[string]interface{}) map[string]interface{}
- func SetErrorLogger(logger interface{})
- func SetLogger(logger interface{})
- type Option
- type OptionsBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authorize ¶
Authorize - override to provide a custom authorization function for use by the web interface. This function should return true and use user name authorized if the user is authorized, false if not, and an error if an error occurs. The web interface is not presently maintained.
func CheckMemLock ¶
CheckMemLock - override to provide a custom mem lock check function. Utilizing the bucket (ex: super-secrets/Index/FlumeDatabase) and key (ex: tenantId), decides whether or not to memlock the indicated value retrieved from vault. Returns true if the value should be memlocked, false if not.
func GetExtensionAuthComponents ¶
GetExtensionAuthComponents - obtains an auth components for an identity provider to be used by business logic flows... Fields to be provided by the map include: authDomain, authHeaders, bodyData, and authUrl. This components will by used by a standard http client to authenticate with the authUrl. The response from the query will be provided to the Flow Context in the ExtensionAuthData field That can then be used by business logic flows residing in TrcDb to query additional services requiring authentication.
func GetSupportedSourceRegions ¶
func GetSupportedSourceRegions() []string
GetSupportedSourceRegions provide source regions supported by TrcDb.
func GetSyncedTables ¶
func GetSyncedTables() []string
GetSyncedTables - return a list of synced tables from a remote source in TrcDb. Override this function to provide a list of synced tables.
func GetTestConfig ¶
Test configurations.
func GetTestDeployConfig ¶
GetTestDeployConfig - returns a list of templates used in defining tables for Trcdb. Supported attributes include templatePath, connectionPath, certifyPath, env, exitOnFailure, pluginNameList, and logNamespace:
func GetTrcDbUrl ¶ added in v1.0.1
GetTrcDbUrl - Utilized by speculatio/fenestra to obtain a jdbc compliant connection url to the TrcDb database This can be used to perform direct queries against the TrcDb database using the go sql package. The data map is provided by the caller as convenience to provide things like dbport, etc... The override should return a jdbc compliant connection url to the TrcDb database.
func NewOptionsBuilder ¶ added in v1.0.1
func NewOptionsBuilder(opts ...Option)
func ProcessPluginEnvConfig ¶
ProcessPluginEnvConfig - returns a list of templates used in defining tables for Trcdb. Supported attributes include templatePath, connectionPath, certifyPath, env, exitOnFailure, pluginNameList, and logNamespace:
Here is an example expanded templatePath:
templatePath: []string{ "trc_templates/DatabaseName/TableNameA/TableNameA.tmpl", "trc_templates/DatabaseName/TableNameB/TableNameB.tmpl", "trc_templates/FlumeDatabase/TierceronFlow/TierceronFlow.tmpl", }
func SetErrorLogger ¶
func SetErrorLogger(logger interface{})
SetErrorLogger is called by TrcDb and other utilities to provide the extensions a handle to the error logger for custom libraries that need a hook into the logging infrastructure. In extension implementation, set global variables with type func(string, ...interface{}) assign the globals to the return value of convLogger... You'll have to copy convLogger into your custom library implementation.
func SetLogger ¶
func SetLogger(logger interface{})
SetLogger is called by TrcDb and other utilities to provide the extensions a handle to the error logger for custom libraries that need a hook into the logging infrastructure. In extension implementation, set global variables with type func(string, ...interface{}) assign the globals to the return value of convLogger... You'll have to copy convLogger into your custom library implementation.
Types ¶
type Option ¶ added in v1.0.1
type Option func(*OptionsBuilder)
func LoadOptions ¶ added in v1.0.1
func LoadOptions() Option
type OptionsBuilder ¶ added in v1.0.1
type OptionsBuilder struct { SetLogger func(logger interface{}) SetErrorLogger func(logger interface{}) GetLocalVaultAddr func() string GetSupportedSourceRegions func() []string GetTestDeployConfig func(tokenPtr *string) map[string]interface{} ProcessPluginEnvConfig func(pluginEnvConfig map[string]interface{}) map[string]interface{} GetExtensionAuthComponents func(config map[string]interface{}) map[string]interface{} GetSyncedTables func() []string Authorize func(db *sql.DB, userIdentifier string, userPassword string) (bool, string, error) CheckMemLock func(bucket string, key string) bool GetTrcDbUrl func(data map[string]interface{}) string }
var BuildOptions *OptionsBuilder