Documentation
¶
Overview ¶
Package toolkitcfg resolves typed per-toolkit connection configuration out of the platform's raw toolkits config (map[string]any decoded from YAML/JSON).
The platform stores toolkit config as toolkits.<kind>.instances.<name>.<key>; these helpers walk that structure, pick the default instance when none is named, and extract the typed DataHub / Trino / S3 settings the providers need. Split out of pkg/platform to keep that package under its size budget (#756); the primitive typed-map accessors live in the sibling cfgmap package.
Index ¶
Constants ¶
const ( DefaultTrinoPort = 8080 DefaultTrinoQueryLimit = 1000 DefaultTrinoMaxLimit = 10000 )
Trino connection defaults, applied when an instance omits the setting.
Variables ¶
This section is empty.
Functions ¶
func InstanceConfig ¶
InstanceConfig retrieves one instance's config map for a toolkit kind. When instance is "" it resolves the default (or first) instance. Returns nil if the kind, its instances map, or the named instance is absent or malformed.
func ResolveDefaultInstance ¶
ResolveDefaultInstance determines which instance to use: the one named by the kind's "default" key, else the first instance, else "".
Types ¶
type S3 ¶
type S3 struct {
Region string
Endpoint string
AccessKeyID string
SecretKey string
BucketPrefix string
ConnectionName string
UsePathStyle bool
}
S3 holds extracted S3 configuration.
type Trino ¶
type Trino struct {
Host string
Port int
User string
Password string // #nosec G117 -- Trino connection credential from admin config
Catalog string
Schema string
SSL bool
SSLVerify bool
Timeout time.Duration
DefaultLimit int
MaxLimit int
ReadOnly bool
ConnectionName string
}
Trino holds extracted Trino configuration.