Skip to content

Instantly share code, notes, and snippets.

@zacharysyoung
Last active July 11, 2023 19:38
Show Gist options
  • Save zacharysyoung/0fafae7fbc5032b87a2115f251e45b86 to your computer and use it in GitHub Desktop.
Save zacharysyoung/0fafae7fbc5032b87a2115f251e45b86 to your computer and use it in GitHub Desktop.
SO-76611276
package main
import (
"encoding/csv"
"fmt"
"io"
"os"
"os/exec"
"reflect"
"strings"
)
const (
inputCSV = "my_configs.csv"
// inputCSV = "test.csv"
outputGo = "output.go"
fmtOutput = true
)
type ConfigRow struct {
tomlKey string
yamlKey string
goVar string
goType string
}
type TypeDef struct {
yamlKeyPath string // original YAML key dot-path
tomlName string
yamlName string
goName string
goType string
fields []*TypeDef
}
// topLevelTDs holds the parent-less top-level TypeDefs
var toplevelTDs = make([]*TypeDef, 0)
func main() {
crs := readConfigRows()
tds := toTypeDefs(crs)
for _, td := range tds {
add(td)
}
for _, tlTD := range toplevelTDs {
printTD(tlTD, "")
}
writeGo()
if fmtOutput {
fmtCmd := exec.Command("go", "fmt", outputGo)
bFmtOut, err := fmtCmd.Output()
must(err)
fmtOut := string(bFmtOut)
fmt.Println("formatted", fmtOut[:len(fmtOut)-1])
}
}
// readConfigRows reads the CSV and returns the rows as a slice of ConfigRow.
func readConfigRows() (crs []ConfigRow) {
doneReading := func(err error) bool {
if err != nil {
if err == io.EOF {
return true
}
must(err)
}
return false
}
f, err := os.Open(inputCSV)
must(err)
r := csv.NewReader(f)
header, err := r.Read()
if doneReading(err) {
must(fmt.Errorf("finished reading CSV prematurely"))
}
wantHeader := []string{"toml_key", "yaml_key", "go_var", "go_type"}
if !reflect.DeepEqual(header, wantHeader) {
must(fmt.Errorf("header %v != %v", header, wantHeader))
}
for rowNum := 1; ; rowNum++ {
record, err := r.Read()
if doneReading(err) {
break
}
for i, field := range record {
if strings.TrimSpace(field) == "" {
must(fmt.Errorf("found empty field %d in row %d", i+1, rowNum))
}
}
crs = append(crs,
ConfigRow{record[0], record[1], record[2], record[3]},
)
}
return
}
func toTypeDefs(crs []ConfigRow) (tds []*TypeDef) {
// Returns the final part of a dot-separated TOML or YAML key.
var getName = func(key string) string {
parts := strings.Split(key, ".")
return parts[len(parts)-1]
}
for _, cr := range crs {
tds = append(tds,
&TypeDef{
yamlKeyPath: cr.yamlKey,
tomlName: getName(cr.tomlKey),
yamlName: getName(cr.yamlKey),
goName: cr.goVar,
goType: cr.goType,
},
)
}
return
}
func getParent(parts []string, parent *TypeDef) *TypeDef {
for _, intermediateName := range parts[:len(parts)-1] {
for _, xtd := range parent.fields {
if xtd.yamlName == intermediateName {
parent = xtd
}
}
}
return parent
}
func add(td *TypeDef) {
parts := strings.Split(td.yamlKeyPath, ".")
if len(parts) == 1 {
toplevelTDs = append(toplevelTDs, td)
return
}
var (
tlName = parts[0]
tlTD *TypeDef
found bool
)
for _, tlTD = range toplevelTDs {
if tlTD.yamlName == tlName {
found = true
break
}
}
if !found {
must(fmt.Errorf("could not find top-level TypeDef w/name %s", tlName))
}
parent := getParent(parts[1:], tlTD)
parent.fields = append(parent.fields, td)
}
func getGoSource(td *TypeDef, s string) string {
getStructTag := func(td *TypeDef) string {
return fmt.Sprintf("`json:\"%s,omitempty\" toml:\"%s\"`", td.yamlName, td.tomlName)
}
s += "\n"
s += td.goName + " "
// not a struct, simple Go type
if len(td.fields) == 0 {
return s + td.goType
}
s += "struct {"
for _, subTD := range td.fields {
s = getGoSource(subTD, s)
s += getStructTag(subTD)
}
s += "}"
return s
}
func writeGo() {
f, err := os.Create(outputGo)
must(err)
defer func() {
must(f.Close())
}()
w := f.WriteString
w("// Code generated by ... DO NOT EDIT.\n")
w("package main\n")
w("\n")
// Top-level TypeDefs are 'types' in Go
for _, tlTD := range toplevelTDs {
w("type ")
w(getGoSource(tlTD, ""))
w("\n\n")
}
}
func printTD(td *TypeDef, indent string) {
fmt.Printf("%s%s\n", indent, td.yamlName)
if len(td.fields) == 0 {
return
}
for _, subTD := range td.fields {
printTD(subTD, indent+" ")
}
}
func must(err error) {
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
#!/usr/bin/env python3
import csv
from typing import TypedDict
CSV_FILE = "test.csv"
# CSV_FILE = "my_configs.csv"
OUTPUT_TL_TDS = True
OUTPUT_TL_TDS_PY = "tl_tds.py"
OUTPUT_GO = "output.go"
FORMAT_GO = True
class TypeDef(TypedDict):
"""A (possible) hierarchy of config values that will be materialized into (possibly nested) Go structs."""
yaml_key_path: str
"""The original dot-separated YAML key path."""
toml_name: str
yaml_name: str
go_name: str
go_type: str
fields: list["TypeDef"]
def main():
TopLevel_TDs: list[TypeDef] = []
"""A list of all the top-level TypeDefs (eventually Go structs) each with possible nested TypeDefs."""
with open(CSV_FILE) as f:
reader = csv.reader(f)
header = next(reader)
assert header == ["toml_key", "yaml_key", "go_var", "go_type"]
for row in reader:
for i, x in enumerate(row):
assert x != "", f"on line {reader.line_num} field {i+1} was empty"
cr = ConfigRow(toml_key=row[0], yaml_key=row[1], go_var=row[2], go_type=row[3])
td = cr_to_td(cr)
add(td, TopLevel_TDs)
write_output_file(TopLevel_TDs)
# Extra goodies
# -------------
if FORMAT_GO:
import subprocess
args = ["go", "fmt", OUTPUT_GO]
try:
subprocess.run(args, check=True)
except subprocess.CalledProcessError as e:
print(f"could not run `{' '.join(args)}`: {e}")
if OUTPUT_TL_TDS:
"""Visualize/debug TypeDefs."""
import pprint
with open(OUTPUT_TL_TDS_PY, "w") as f:
f.write("x = ")
pprint.pprint(TopLevel_TDs, f, sort_dicts=False)
class ConfigRow(TypedDict):
"""A row of config values from the CSV."""
toml_key: str
yaml_key: str
go_var: str
go_type: str
def cr_to_td(row: ConfigRow) -> TypeDef:
"""Convert a ConfigRow to a TypeDef."""
yaml_key = row["yaml_key"]
toml_name = row["toml_key"].rsplit(".", 1)[-1]
yaml_name = row["yaml_key"].rsplit(".", 1)[-1]
go_name = row["go_var"]
go_type = row["go_type"]
return TypeDef(
yaml_key_path=yaml_key,
toml_name=toml_name,
yaml_name=yaml_name,
go_name=go_name,
go_type=go_type,
fields=[],
)
def add(td: TypeDef, tl_tds: list[TypeDef]):
"""
Adds td either as a top-level TypeDef, directly to a top-level TypeDef's fields, or to
a sub-field of a top-level TypeDef.
"""
print(f"adding {td['yaml_key_path']}")
path_keys = td["yaml_key_path"].split(".")
if len(path_keys) == 1:
tl_tds.append(td)
return
tl_key = path_keys[0]
tl_td: TypeDef | None = None
for x_td in tl_tds:
if x_td["yaml_name"] == tl_key:
tl_td = x_td
break
assert tl_td is not None, f"could not find top-level TypeDef with key {tl_key}"
if len(path_keys) == 2:
tl_td["fields"].append(td)
return
parent_td = tl_td # rename top-level to parent (same object)
# Skip top-level key and omit final key. If not all intermediate keys exist as
# prescribed by YAML key the last-found parent will be used.
intermediate_keys = path_keys[1:-1]
for key in intermediate_keys:
for child_td in parent_td["fields"]:
if child_td["yaml_name"] == key:
parent_td = child_td
break
parent_td["fields"].append(td)
def write_output_file(tl_tds: list[TypeDef]):
def write_td(td: TypeDef):
"""Write a TypeDef (and recursively its fields)."""
def write_struct_tag(td: TypeDef):
w(f"`json:\"{td['yaml_name']},omitempty\" toml:\"{td['toml_name']}\"`")
w("\n")
w(td["go_name"] + " ")
# If not a struct (simple Go type)
if td["fields"] == []:
w(td["go_type"])
return
# Else a struct
w("struct {")
for x_td in td["fields"]:
write_td(x_td)
write_struct_tag(x_td)
w("}")
with open(OUTPUT_GO, "w", encoding="utf-8") as f:
w = f.write
w("// Code generated by ... DO NOT EDIT.\n")
w("package main\n")
w("\n")
# Top-level TypeDefs are 'types' in Go
for tl_td in tl_tds:
w("type ")
write_td(tl_td)
w("\n\n")
if __name__ == "__main__":
main()
toml_key yaml_key go_var go_type
server server Server Server
server.hostname server.hostname HostName string
server.node_ip server.nodeIp NodeIp string
server.base_path server.basePath BasePath string
super_admin superAdmin SuperAdmin SuperAdmin
super_admin.username superAdmin.username Username string
super_admin.password superAdmin.password Password string
super_admin.admin_role superAdmin.adminRole AdminRole string
super_admin.create_admin_account superAdmin.createAdminAccount CreateAdminAccount bool
user_store userStore UserStore UserStore
user_store.type userStore.type Type string
user_store.username_java_regex userStore.usernameJavaRegex UserNameJavaRegex string
user_store.connection_url userStore.connectionUrl ConnectionUrl string
user_store.connection_name userStore.connectionName ConnectionName string
user_store.connection_password userStore.connectionPassword ConnectionPassword string
user_store.properties.CaseInsensitiveUsername userStore.properties.caseInsensitiveUsername CaseInsensitiveUsername bool
user_store.base_dn userStore.baseDn BaseDn string
user_store.user_name_attribute userStore.usernameAttribute UsernameAttribute string
database database Database Database
database.user database.user UserDb UserDb
database.user.type database.user.type Type string
database.user.url database.user.url Url string
database.user.hostname database.user.hostname Hostname string
database.user.username database.user.username Username string
database.user.password database.user.password Password string
database.user.driver database.user.driver Driver string
database.user.pool_options database.user.poolOptions PoolOptions PoolOptions
database.user.pool_options.validationQuery database.user.poolOptions.validationQuery ValidationQuery string
database.identity_db database.identityDb IdentityDb IdentityDb
database.identity_db.type database.identityDb.type Type string
database.identity_db.url database.identityDb.url Url string
database.identity_db.hostname database.identityDb.hostname Hostname string
database.identity_db.username database.identityDb.username Username string
database.identity_db.password database.identityDb.password Password string
database.identity_db.driver database.identityDb.driver Driver string
database.identity_db.pool_options database.identityDb.poolOptions PoolOptions PoolOptions
database.identity_db.pool_options.validationQuery database.identityDb.poolOptions.validationQuery ValidationQuery string
database.identity_db.pool_options.maxActive database.identityDb.poolOptions.maxActive MaxActive string
database.identity_db.pool_options.maxWait database.identityDb.poolOptions.maxWait MaxWait string
database.identity_db.pool_options.minIdle database.identityDb.poolOptions.minIdle MinIdle string
database.identity_db.pool_options.testOnBorrow database.identityDb.poolOptions.testOnBorrow TestOnBorrow string
database.identity_db.pool_options.validationInterval database.identityDb.poolOptions.validationInterval ValidationInterval string
database.identity_db.pool_options.defaultAutoCommit database.identityDb.poolOptions.defaultAutoCommit DefaultAutoCommit string
database.identity_db.pool_options.commitOnReturn database.identityDb.poolOptions.commitOnReturn CommitOnReturn string
database.shared_db database.sharedDb SharedDb SharedDb
database.shared_db.type database.sharedDb.type Type string
database.shared_db.url database.sharedDb.url Url string
database.shared_db.hostname database.sharedDb.hostname Hostname string
database.shared_db.username database.sharedDb.username Username string
database.shared_db.password database.sharedDb.password Password string
database.shared_db.driver database.sharedDb.driver Driver string
database.shared_db.pool_options database.sharedDb.poolOptions PoolOptions PoolOptions
database.shared_db.pool_options.validationQuery database.sharedDb.poolOptions.validationQuery ValidationQuery string
transport transport Transport Transport
transport.https transport.https Https Https
transport.https.properties transport.https.properties Properties HttpsProperties
transport.https.properties.proxyPort transport.https.properties.proxyPort ProxyPort string
keystore keystore KeyStore KeyStore
keystore.primary keystore.primary Primary Primary
keystore.primary.name keystore.primary.name Name string
keystore.primary.password keystore.primary.password Password string
keystore.internal keystore.internal Internal Internal
keystore.internal.file_name keystore.internal.fileName FileName string
keystore.internal.type keystore.internal.type Type string
keystore.internal.password keystore.internal.password Password string
keystore.internal.alias keystore.internal.alias Alias string
keystore.internal.key_password keystore.internal.keyPassword KeyPassword string
keystore.tls keystore.tls Tls Tls
keystore.tls.file_name keystore.tls.fileName FileName string
keystore.tls.type keystore.tls.type Type string
keystore.tls.password keystore.tls.password Password string
keystore.tls.alias keystore.tls.alias Alias string
keystore.tls.key_password keystore.tls.keyPassword KeyPassword string
truststore truststore TrustStore TrustStore
truststore.file_name truststore.fileName FileName string
truststore.password truststore.password Password string
truststore.type truststore.type Type string
identity identity Identity Identity
identity.auth_framework identity.authFramework AuthFramework AuthFramework
identity.auth_framework.endpoint identity.authFramework.endpoint Endpoint Endpoint
identity.auth_framework.endpoint.app_password identity.authFramework.endpoint.appPassword AppPassword string
account_recovery accountRecovery AccountRecovery AccountRecovery
account_recovery.endpoint accountRecovery.endpoint Endpoint Endpoint
account_recovery.endpoint.auth accountRecovery.endpoint.auth Auth string
account_recovery.endpoint.auth.hash accountRecovery.endpoint.auth.hash Hash string
monitoring monitoring Monitoring Monitoring
monitoring.jmx monitoring.jmx Jmx Jmx
monitoring.jmx.rmi_server_start monitoring.jmx.rmiServerStart RmiServerStart bool
hazelcast hazelcast Hazelcast Hazelcast
hazelcast.shutdownhook hazelcast.shutdownhook HazelcastShutdownHook HazelcastShutdownHook
hazelcast.shutdownhook.enabled hazelcast.shutdownhook.enabled Enabled bool
hazelcast.logging hazelcast.logging Logging Logging
hazelcast.logging.type hazelcast.logging.type Type string
authentication authentication Authentication Authentication
authentication.consent authentication.consent Consent Consent
authentication.consent.data_source authentication.consent.dataSource DataSource string
authentication.authenticator authentication.authenticator Authenticator Authenticator
authentication.authenticator.basic authentication.authenticator.basic Basic Basic
authentication.authenticator.basic.parameters authentication.authenticator.basic.parameters BasicParameters BasicParameters
authentication.authenticator.basic.parameters.showAuthFailureReason authentication.authenticator.basic.parameters.showAuthFailureReason ShowAuthFailureReason bool
authentication.authenticator.basic.parameters.showAuthFailureReasonOnLoginPage authentication.authenticator.basic.parameters.showAuthFailureReasonOnLoginPage ShowAuthFailureReasonOnLoginPage bool
authentication.authenticator.totp authentication.authenticator.totp Totp Totp
authentication.authenticator.totp.parameters authentication.authenticator.totp.parameters TotpParameters TotpParameters
authentication.authenticator.totp.parameters.showAuthFailureReason authentication.authenticator.totp.parameters.showAuthFailureReason ShowAuthFailureReason bool
authentication.authenticator.totp.parameters.showAuthFailureReasonOnLoginPage authentication.authenticator.totp.parameters.showAuthFailureReasonOnLoginPage ShowAuthFailureReasonOnLoginPage bool
authentication.authenticator.totp.parameters.encodingMethod authentication.authenticator.totp.parameters.encodingMethod EncodingMethod string
authentication.authenticator.totp.parameters.timeStepSize authentication.authenticator.totp.parameters.timeStepSize TimeStepSize string
authentication.authenticator.totp.parameters.windowSize authentication.authenticator.totp.parameters.windowSize WindowSize string
authentication.authenticator.totp.parameters.authenticationMandatory authentication.authenticator.totp.parameters.authenticationMandatory AuthenticationMandatory string
authentication.authenticator.totp.parameters.enrolUserInAuthenticationFlow authentication.authenticator.totp.parameters.enrolUserInAuthenticationFlow EnrolUserInAuthenticationFlow string
authentication.authenticator.totp.parameters.usecase authentication.authenticator.totp.parameters.usecase UseCase string
authentication.authenticator.totp.parameters.secondaryUserstore authentication.authenticator.totp.parameters.secondaryUserstore SecondaryUserstore string
authentication.authenticator.totp.parameters.TOTPAuthenticationEndpointURL authentication.authenticator.totp.parameters.totpAuthenticationEndpointUrl TotpAuthenticationEndpointUrl string
authentication.authenticator.totp.parameters.TOTPAuthenticationEndpointErrorPage authentication.authenticator.totp.parameters.totpAuthenticationEndpointErrorPage TotpAuthenticationEndpointErrorPage string
authentication.authenticator.totp.parameters.TOTPAuthenticationEndpointEnableTOTPPage authentication.authenticator.totp.parameters.totpAuthenticationEndpointEnableTotpPage TotpAuthenticationEndpointEnableTotpPage string
authentication.authenticator.totp.parameters.Issuer authentication.authenticator.totp.parameters.Issuer Issuer string
authentication.authenticator.totp.parameters.UseCommonIssuer authentication.authenticator.totp.parameters.useCommonIssuer UserCommonIssuer string
authentication.authenticator.totp.enable authentication.authenticator.totp.enable Enable bool
authentication.authenticator.email_otp authentication.authenticator.emailOtp EmailOtp EmailOtp
authentication.authenticator.email_otp.name authentication.authenticator.emailOtp.name Name string
authentication.authenticator.email_otp.enable authentication.authenticator.emailOtp.enable Enable bool
authentication.authenticator.email_otp.parameters authentication.authenticator.emailOtp.parameters EmailOtpParameters EmailOtpParameters
authentication.authenticator.email_otp.parameters.showAuthFailureReason authentication.authenticator.emailOtp.parameters.showAuthFailureReason ShowAuthFailureReason bool
authentication.authenticator.email_otp.parameters.showAuthFailureReasonOnLoginPage authentication.authenticator.emailOtp.parameters.showAuthFailureReasonOnLoginPage ShowAuthFailureReasonOnLoginPage bool
authentication.authenticator.email_otp.parameters.EMAILOTPAuthenticationEndpointURL authentication.authenticator.emailOtp.parameters.emailOtpAuthenticationEndpointUrl EmailOtpAuthenticationEndpointUrl string
authentication.authenticator.email_otp.parameters.EmailOTPAuthenticationEndpointErrorPage authentication.authenticator.emailOtp.parameters.emailOtpAuthenticationEndpointErrorPage EmailOtpAuthenticationEndpointErrorPage string
authentication.authenticator.email_otp.parameters.EmailAddressRequestPage authentication.authenticator.emailOtp.parameters.emailAddressRequestPage EmailAddressRequestPage string
authentication.authenticator.email_otp.parameters.usecase authentication.authenticator.emailOtp.parameters.usecase UseCase string
authentication.authenticator.email_otp.parameters.secondaryUserstore authentication.authenticator.emailOtp.parameters.secondaryUserstore SecondaryUserstore string
authentication.authenticator.email_otp.parameters.EMAILOTPMandatory authentication.authenticator.emailOtp.parameters.emailOtpMandatory EmailOtpMandatory bool
authentication.authenticator.email_otp.parameters.sendOTPToFederatedEmailAttribute authentication.authenticator.emailOtp.parameters.sendOtpToFederatedEmailAttribute SendOtpToFederatedEmailAttribute bool
authentication.authenticator.email_otp.parameters.federatedEmailAttributeKey authentication.authenticator.emailOtp.parameters.federatedEmailAttributeKey FederatedEmailAttributeKey string
authentication.authenticator.email_otp.parameters.EmailOTPEnableByUserClaim authentication.authenticator.emailOtp.parameters.emailOtpEnableByUserClaim EmailOtpEnableByUserClaim bool
authentication.authenticator.email_otp.parameters.CaptureAndUpdateEmailAddress authentication.authenticator.emailOtp.parameters.captureAndUpdateEmailAddress CaptureAndUpdateEmailAddress bool
authentication.authenticator.email_otp.parameters.showEmailAddressInUI authentication.authenticator.emailOtp.parameters.showEmailAddressInUi ShowEmailAddressInUi bool
authentication.authenticator.email_otp.parameters.useEventHandlerBasedEmailSender authentication.authenticator.emailOtp.parameters.useEventHandlerBasedEmailSender UseEventHandlerBasedEmailSender string
authentication.authenticator.sms_otp authentication.authenticator.smsOtp SmsOtp SmsOtp
authentication.authenticator.sms_otp.name authentication.authenticator.smsOtp.name Name string
authentication.authenticator.sms_otp.parameters authentication.authenticator.smsOtp.parameters SmsParameters SmsParameters
authentication.authenticator.sms_otp.parameters.SMSOTPAuthenticationEndpointURL authentication.authenticator.smsOtp.parameters.smsOtpAuthenticationEndpointUrl SmsOtpAuthenticationEndpointUrl string
authentication.authenticator.sms_otp.parameters.SMSOTPAuthenticationEndpointErrorPage authentication.authenticator.smsOtp.parameters.smsOtpAuthenticationEndpointErrorPage SmsOtpAuthenticationEndpointErrorPage string
authentication.authenticator.sms_otp.parameters.MobileNumberRegPage authentication.authenticator.smsOtp.parameters.mobileNumberRegPage MobileNumberRegPage string
authentication.authenticator.sms_otp.parameters.RetryEnable authentication.authenticator.smsOtp.parameters.retryEnable RetryEnable bool
authentication.authenticator.sms_otp.parameters.ResendEnable authentication.authenticator.smsOtp.parameters.resendEnable ResendEnable bool
authentication.authenticator.sms_otp.parameters.BackupCode authentication.authenticator.smsOtp.parameters.backupCode BackupCode string
authentication.authenticator.sms_otp.parameters.SMSOTPEnableByUserClaim authentication.authenticator.smsOtp.parameters.smsOtpEnableByUserClaim SmsOtpEnabledByUserClaim bool
authentication.authenticator.sms_otp.parameters.SMSOTPMandatory authentication.authenticator.smsOtp.parameters.smsOtpMandatory SmsOtpMandatory bool
authentication.authenticator.sms_otp.parameters.CaptureAndUpdateMobileNumber authentication.authenticator.smsOtp.parameters.captureAndUpdateMobileNumber CaptureAndUpdateMobileNumber bool
authentication.authenticator.sms_otp.parameters.SendOTPDirectlyToMobile authentication.authenticator.smsOtp.parameters.sendOtpDirectlyToMobile SendOtpDirectlyToMobile bool
authentication.authenticator.sms_otp.parameters.redirectToMultiOptionPageOnFailure authentication.authenticator.smsOtp.parameters.redirectToMultiOptionPageOnFailure RedirectToMultiOptionPageOnFailure bool
authentication.authenticator.sms_otp.enable authentication.authenticator.smsOtp.enable Enable string
authentication.authenticator.magiclink authentication.authenticator.magiclink MagicLink MagicLink
authentication.authenticator.magiclink.name authentication.authenticator.magiclink.name Name string
authentication.authenticator.magiclink.enable authentication.authenticator.magiclink.enable Enable bool
authentication.authenticator.magiclink.parameters authentication.authenticator.magiclink.parameters MagicLinkParameters MagicLinkParameters
authentication.authenticator.magiclink.parameters.ExpiryTime authentication.authenticator.magiclink.parameters.expiryTime ExpiryTime string
authentication.authenticator.magiclink.parameters.Tags authentication.authenticator.magiclink.parameters.tags Tags string
authentication.authenticator.magiclink.parameters.BlockedUserStoreDomains authentication.authenticator.magiclink.parameters.blockedUserStoreDomains BlockedUserStoreDomains string
authentication.authenticator.fido authentication.authenticator.fido Fido Fido
authentication.authenticator.fido.parameters authentication.authenticator.fido.parameters FidoParameters FidoParameters
authentication.authenticator.fido.parameters.Tags authentication.authenticator.fido.parameters.tags Tags string
authentication.endpoint authentication.endpoint Endpoint Endpoint
authentication.endpoint.enableCustomClaimMappings authentication.endpoint.enableCustomClaimMappings EnableCustomClaimMappings bool
authentication.endpoint.enableMergingCustomClaimMappingsWithDefault authentication.endpoint.enableMergingCustomClaimMappingsWithDefault EnableMergingCustomClaimMappingsWithDefault bool
authentication.adaptive authentication.adaptive Adaptive Adaptive
authentication.adaptive.allow_loops authentication.adaptive.allowLoops AllowLoops bool
authentication.adaptive.execution_supervisor authentication.adaptive.executionSupervisor ExecutionSupervisor string
authentication.adaptive.execution_supervisor.timeout authentication.adaptive.executionSupervisor.timeout Timeout string
authentication.custom_authenticator authentication.customAuthenticator CustomAuthenticator string
authentication.jit_provisioning authentication.jitProvisioning JitProvisioning JitProvisioning
authentication.jit_provisioning.enable_enhanced_feature authentication.jitProvisioning.enableEnhancedFeature EnableEnhancedFeature bool
recaptcha recaptcha Recaptcha Recaptcha
recaptcha.enabled recaptcha.enabled Enabled bool
recaptcha.api_url recaptcha.apiUrl ApiUrl string
recaptcha.verify_url recaptcha.verifyUrl VerifyUrl string
recaptcha.request_wrap_urls recaptcha.requestWrapUrls RequestWrapUrls string
recaptcha.site_key recaptcha.siteKey SiteKey string
recaptcha.secret_key recaptcha.secretKey SecretKey string
output_adapter outputAdapter OutputAdapter OutputAdapter
output_adapter.email outputAdapter.email Email string
output_adapter.email.from_address outputAdapter.email.fromAddress FromAddress string
output_adapter.email.username outputAdapter.email.username Username string
output_adapter.email.password outputAdapter.email.password Password string
output_adapter.email.hostname outputAdapter.email.hostname Hostname string
output_adapter.email.port outputAdapter.email.port Port string
output_adapter.email.enable_start_tls outputAdapter.email.enableStartTls EnableStartTls string
output_adapter.email.enable_authentication outputAdapter.email.enableAuthentication EnableAuthentication string
clustering clustering Clustering Clustering
clustering.membership_scheme clustering.membershipScheme MembershipScheme string
clustering.properties clustering.properties ClusteringProperties ClusterinProperties
clustering.properties.membershipSchemeClassName clustering.properties.membershipSchemeClassName MembershipSchemeClassName string
clustering.properties.KUBERNETES_NAMESPACE clustering.properties.kubernetesNamespace KubernetesNamespace string
clustering.properties.KUBERNETES_SERVICES clustering.properties.kubernetesServices KubernetesServices string
clustering.properties.KUBERNETES_MASTER_SKIP_SSL_VERIFICATION clustering.properties.kubernetesMasterSkipSslVerification KubernetesMasterSkipSslVerification string
clustering.properties.USE_DNS clustering.properties.useDns UseDns bool
tenant_mgt tenantMgt TenantMgt TenantMgt
tenant_mgt.enable_email_domain tenantMgt.enableEmailDomain EnableEmailDomain bool
tenant_context tenantContext TenantContext TenantContext
tenant_context.enable_tenant_qualified_urls tenantContext.enableTenantQualifiedUrls EnableTenantQualifiedUrls bool
tenant_context.enable_tenanted_sessions tenantContext.enableTenantedSessions EnableTenantedSessions bool
tenant_context.rewrite tenantContext.rewrite Rewrite bool
tenant_context.rewrite.custom_webapps tenantContext.rewrite.customWebapps CustomWebapps bool
admin_service adminService AdminService AdminService
admin_service.wsdl adminService.wsdl Wsdl string
admin_service.wsdl.enable adminService.wsdl.enable Enable bool
system_roles systemRoles SystemRoles SystemRoles
system_roles.enable systemRoles.enable Enable bool
system_roles.read_only_roles systemRoles.readOnlyRoles ReadOnlyRoles bool
carbon_health_check carbonHealthCheck CarbonHealthCheck CarbonHealthCheck
carbon_health_check.enable carbonHealthCheck.enable Enable bool
carbon_health_check.health_checker carbonHealthCheck.healthChecker HealthChecker HealthChecker
carbon_health_check.health_checker.data_source_health_checker carbonHealthCheck.healthChecker.dataSourceHealthChecker DatasourceHealthChecker string
carbon_health_check.health_checker.data_source_health_checker.properties carbonHealthCheck.healthChecker.dataSourceHealthChecker.properties DatasourceHealthCheckerProperties string
carbon_health_check.health_checker.data_source_health_checker.properties.monitored carbonHealthCheck.healthChecker.dataSourceHealthChecker.properties.monitored Monitored Monitored
carbon_health_check.health_checker.data_source_health_checker.properties.monitored.datasources carbonHealthCheck.healthChecker.dataSourceHealthChecker.properties.monitored.datasources Datasources string
system_applications systemApplications SystemApplications SystemApplications
system_applications.read_only_roles systemApplications.readOnlyRoles ReadOnlyRoles bool
system_applications.fidp_role_based_authz_enabled_apps systemApplications.fidpRoleBasedAuthzEnabledApps FidpRoleBasedAuthzEnabledApps string
catalina catalina Catalina Catalina
catalina.valves catalina.valves Valves Valves
catalina.valves.valve catalina.valves.valve Valve Valve
catalina.valves.valve.properties catalina.valves.valve.properties ValveProperties ValveProperties
catalina.valves.valve.properties.className catalina.valves.valve.properties.className ClassName string
// Code generated by ... DO NOT EDIT.
package main
type Server struct {
HostName string `json:"hostname,omitempty" toml:"hostname"`
NodeIp string `json:"nodeIp,omitempty" toml:"node_ip"`
BasePath string `json:"basePath,omitempty" toml:"base_path"`
}
type SuperAdmin struct {
Username string `json:"username,omitempty" toml:"username"`
Password string `json:"password,omitempty" toml:"password"`
AdminRole string `json:"adminRole,omitempty" toml:"admin_role"`
CreateAdminAccount bool `json:"createAdminAccount,omitempty" toml:"create_admin_account"`
}
type UserStore struct {
Type string `json:"type,omitempty" toml:"type"`
UserNameJavaRegex string `json:"usernameJavaRegex,omitempty" toml:"username_java_regex"`
ConnectionUrl string `json:"connectionUrl,omitempty" toml:"connection_url"`
ConnectionName string `json:"connectionName,omitempty" toml:"connection_name"`
ConnectionPassword string `json:"connectionPassword,omitempty" toml:"connection_password"`
CaseInsensitiveUsername bool `json:"caseInsensitiveUsername,omitempty" toml:"CaseInsensitiveUsername"`
BaseDn string `json:"baseDn,omitempty" toml:"base_dn"`
UsernameAttribute string `json:"usernameAttribute,omitempty" toml:"user_name_attribute"`
}
type Database struct {
UserDb struct {
Type string `json:"type,omitempty" toml:"type"`
Url string `json:"url,omitempty" toml:"url"`
Hostname string `json:"hostname,omitempty" toml:"hostname"`
Username string `json:"username,omitempty" toml:"username"`
Password string `json:"password,omitempty" toml:"password"`
Driver string `json:"driver,omitempty" toml:"driver"`
PoolOptions struct {
ValidationQuery string `json:"validationQuery,omitempty" toml:"validationQuery"`
} `json:"poolOptions,omitempty" toml:"pool_options"`
} `json:"user,omitempty" toml:"user"`
IdentityDb struct {
Type string `json:"type,omitempty" toml:"type"`
Url string `json:"url,omitempty" toml:"url"`
Hostname string `json:"hostname,omitempty" toml:"hostname"`
Username string `json:"username,omitempty" toml:"username"`
Password string `json:"password,omitempty" toml:"password"`
Driver string `json:"driver,omitempty" toml:"driver"`
PoolOptions struct {
ValidationQuery string `json:"validationQuery,omitempty" toml:"validationQuery"`
MaxActive string `json:"maxActive,omitempty" toml:"maxActive"`
MaxWait string `json:"maxWait,omitempty" toml:"maxWait"`
MinIdle string `json:"minIdle,omitempty" toml:"minIdle"`
TestOnBorrow string `json:"testOnBorrow,omitempty" toml:"testOnBorrow"`
ValidationInterval string `json:"validationInterval,omitempty" toml:"validationInterval"`
DefaultAutoCommit string `json:"defaultAutoCommit,omitempty" toml:"defaultAutoCommit"`
CommitOnReturn string `json:"commitOnReturn,omitempty" toml:"commitOnReturn"`
} `json:"poolOptions,omitempty" toml:"pool_options"`
} `json:"identityDb,omitempty" toml:"identity_db"`
SharedDb struct {
Type string `json:"type,omitempty" toml:"type"`
Url string `json:"url,omitempty" toml:"url"`
Hostname string `json:"hostname,omitempty" toml:"hostname"`
Username string `json:"username,omitempty" toml:"username"`
Password string `json:"password,omitempty" toml:"password"`
Driver string `json:"driver,omitempty" toml:"driver"`
PoolOptions struct {
ValidationQuery string `json:"validationQuery,omitempty" toml:"validationQuery"`
} `json:"poolOptions,omitempty" toml:"pool_options"`
} `json:"sharedDb,omitempty" toml:"shared_db"`
}
type Transport struct {
Https struct {
Properties struct {
ProxyPort string `json:"proxyPort,omitempty" toml:"proxyPort"`
} `json:"properties,omitempty" toml:"properties"`
} `json:"https,omitempty" toml:"https"`
}
type KeyStore struct {
Primary struct {
Name string `json:"name,omitempty" toml:"name"`
Password string `json:"password,omitempty" toml:"password"`
} `json:"primary,omitempty" toml:"primary"`
Internal struct {
FileName string `json:"fileName,omitempty" toml:"file_name"`
Type string `json:"type,omitempty" toml:"type"`
Password string `json:"password,omitempty" toml:"password"`
Alias string `json:"alias,omitempty" toml:"alias"`
KeyPassword string `json:"keyPassword,omitempty" toml:"key_password"`
} `json:"internal,omitempty" toml:"internal"`
Tls struct {
FileName string `json:"fileName,omitempty" toml:"file_name"`
Type string `json:"type,omitempty" toml:"type"`
Password string `json:"password,omitempty" toml:"password"`
Alias string `json:"alias,omitempty" toml:"alias"`
KeyPassword string `json:"keyPassword,omitempty" toml:"key_password"`
} `json:"tls,omitempty" toml:"tls"`
}
type TrustStore struct {
FileName string `json:"fileName,omitempty" toml:"file_name"`
Password string `json:"password,omitempty" toml:"password"`
Type string `json:"type,omitempty" toml:"type"`
}
type Identity struct {
AuthFramework struct {
Endpoint struct {
AppPassword string `json:"appPassword,omitempty" toml:"app_password"`
} `json:"endpoint,omitempty" toml:"endpoint"`
} `json:"authFramework,omitempty" toml:"auth_framework"`
}
type AccountRecovery struct {
Endpoint struct {
Auth struct {
Hash string `json:"hash,omitempty" toml:"hash"`
} `json:"auth,omitempty" toml:"auth"`
} `json:"endpoint,omitempty" toml:"endpoint"`
}
type Monitoring struct {
Jmx struct {
RmiServerStart bool `json:"rmiServerStart,omitempty" toml:"rmi_server_start"`
} `json:"jmx,omitempty" toml:"jmx"`
}
type Hazelcast struct {
HazelcastShutdownHook struct {
Enabled bool `json:"enabled,omitempty" toml:"enabled"`
} `json:"shutdownhook,omitempty" toml:"shutdownhook"`
Logging struct {
Type string `json:"type,omitempty" toml:"type"`
} `json:"logging,omitempty" toml:"logging"`
}
type Authentication struct {
Consent struct {
DataSource string `json:"dataSource,omitempty" toml:"data_source"`
} `json:"consent,omitempty" toml:"consent"`
Authenticator struct {
Basic struct {
BasicParameters struct {
ShowAuthFailureReason bool `json:"showAuthFailureReason,omitempty" toml:"showAuthFailureReason"`
ShowAuthFailureReasonOnLoginPage bool `json:"showAuthFailureReasonOnLoginPage,omitempty" toml:"showAuthFailureReasonOnLoginPage"`
} `json:"parameters,omitempty" toml:"parameters"`
} `json:"basic,omitempty" toml:"basic"`
Totp struct {
TotpParameters struct {
ShowAuthFailureReason bool `json:"showAuthFailureReason,omitempty" toml:"showAuthFailureReason"`
ShowAuthFailureReasonOnLoginPage bool `json:"showAuthFailureReasonOnLoginPage,omitempty" toml:"showAuthFailureReasonOnLoginPage"`
EncodingMethod string `json:"encodingMethod,omitempty" toml:"encodingMethod"`
TimeStepSize string `json:"timeStepSize,omitempty" toml:"timeStepSize"`
WindowSize string `json:"windowSize,omitempty" toml:"windowSize"`
AuthenticationMandatory string `json:"authenticationMandatory,omitempty" toml:"authenticationMandatory"`
EnrolUserInAuthenticationFlow string `json:"enrolUserInAuthenticationFlow,omitempty" toml:"enrolUserInAuthenticationFlow"`
UseCase string `json:"usecase,omitempty" toml:"usecase"`
SecondaryUserstore string `json:"secondaryUserstore,omitempty" toml:"secondaryUserstore"`
TotpAuthenticationEndpointUrl string `json:"totpAuthenticationEndpointUrl,omitempty" toml:"TOTPAuthenticationEndpointURL"`
TotpAuthenticationEndpointErrorPage string `json:"totpAuthenticationEndpointErrorPage,omitempty" toml:"TOTPAuthenticationEndpointErrorPage"`
TotpAuthenticationEndpointEnableTotpPage string `json:"totpAuthenticationEndpointEnableTotpPage,omitempty" toml:"TOTPAuthenticationEndpointEnableTOTPPage"`
Issuer string `json:"Issuer,omitempty" toml:"Issuer"`
UserCommonIssuer string `json:"useCommonIssuer,omitempty" toml:"UseCommonIssuer"`
} `json:"parameters,omitempty" toml:"parameters"`
Enable bool `json:"enable,omitempty" toml:"enable"`
} `json:"totp,omitempty" toml:"totp"`
EmailOtp struct {
Name string `json:"name,omitempty" toml:"name"`
Enable bool `json:"enable,omitempty" toml:"enable"`
EmailOtpParameters struct {
ShowAuthFailureReason bool `json:"showAuthFailureReason,omitempty" toml:"showAuthFailureReason"`
ShowAuthFailureReasonOnLoginPage bool `json:"showAuthFailureReasonOnLoginPage,omitempty" toml:"showAuthFailureReasonOnLoginPage"`
EmailOtpAuthenticationEndpointUrl string `json:"emailOtpAuthenticationEndpointUrl,omitempty" toml:"EMAILOTPAuthenticationEndpointURL"`
EmailOtpAuthenticationEndpointErrorPage string `json:"emailOtpAuthenticationEndpointErrorPage,omitempty" toml:"EmailOTPAuthenticationEndpointErrorPage"`
EmailAddressRequestPage string `json:"emailAddressRequestPage,omitempty" toml:"EmailAddressRequestPage"`
UseCase string `json:"usecase,omitempty" toml:"usecase"`
SecondaryUserstore string `json:"secondaryUserstore,omitempty" toml:"secondaryUserstore"`
EmailOtpMandatory bool `json:"emailOtpMandatory,omitempty" toml:"EMAILOTPMandatory"`
SendOtpToFederatedEmailAttribute bool `json:"sendOtpToFederatedEmailAttribute,omitempty" toml:"sendOTPToFederatedEmailAttribute"`
FederatedEmailAttributeKey string `json:"federatedEmailAttributeKey,omitempty" toml:"federatedEmailAttributeKey"`
EmailOtpEnableByUserClaim bool `json:"emailOtpEnableByUserClaim,omitempty" toml:"EmailOTPEnableByUserClaim"`
CaptureAndUpdateEmailAddress bool `json:"captureAndUpdateEmailAddress,omitempty" toml:"CaptureAndUpdateEmailAddress"`
ShowEmailAddressInUi bool `json:"showEmailAddressInUi,omitempty" toml:"showEmailAddressInUI"`
UseEventHandlerBasedEmailSender string `json:"useEventHandlerBasedEmailSender,omitempty" toml:"useEventHandlerBasedEmailSender"`
} `json:"parameters,omitempty" toml:"parameters"`
} `json:"emailOtp,omitempty" toml:"email_otp"`
SmsOtp struct {
Name string `json:"name,omitempty" toml:"name"`
SmsParameters struct {
SmsOtpAuthenticationEndpointUrl string `json:"smsOtpAuthenticationEndpointUrl,omitempty" toml:"SMSOTPAuthenticationEndpointURL"`
SmsOtpAuthenticationEndpointErrorPage string `json:"smsOtpAuthenticationEndpointErrorPage,omitempty" toml:"SMSOTPAuthenticationEndpointErrorPage"`
MobileNumberRegPage string `json:"mobileNumberRegPage,omitempty" toml:"MobileNumberRegPage"`
RetryEnable bool `json:"retryEnable,omitempty" toml:"RetryEnable"`
ResendEnable bool `json:"resendEnable,omitempty" toml:"ResendEnable"`
BackupCode string `json:"backupCode,omitempty" toml:"BackupCode"`
SmsOtpEnabledByUserClaim bool `json:"smsOtpEnableByUserClaim,omitempty" toml:"SMSOTPEnableByUserClaim"`
SmsOtpMandatory bool `json:"smsOtpMandatory,omitempty" toml:"SMSOTPMandatory"`
CaptureAndUpdateMobileNumber bool `json:"captureAndUpdateMobileNumber,omitempty" toml:"CaptureAndUpdateMobileNumber"`
SendOtpDirectlyToMobile bool `json:"sendOtpDirectlyToMobile,omitempty" toml:"SendOTPDirectlyToMobile"`
RedirectToMultiOptionPageOnFailure bool `json:"redirectToMultiOptionPageOnFailure,omitempty" toml:"redirectToMultiOptionPageOnFailure"`
} `json:"parameters,omitempty" toml:"parameters"`
Enable string `json:"enable,omitempty" toml:"enable"`
} `json:"smsOtp,omitempty" toml:"sms_otp"`
MagicLink struct {
Name string `json:"name,omitempty" toml:"name"`
Enable bool `json:"enable,omitempty" toml:"enable"`
MagicLinkParameters struct {
ExpiryTime string `json:"expiryTime,omitempty" toml:"ExpiryTime"`
Tags string `json:"tags,omitempty" toml:"Tags"`
BlockedUserStoreDomains string `json:"blockedUserStoreDomains,omitempty" toml:"BlockedUserStoreDomains"`
} `json:"parameters,omitempty" toml:"parameters"`
} `json:"magiclink,omitempty" toml:"magiclink"`
Fido struct {
FidoParameters struct {
Tags string `json:"tags,omitempty" toml:"Tags"`
} `json:"parameters,omitempty" toml:"parameters"`
} `json:"fido,omitempty" toml:"fido"`
} `json:"authenticator,omitempty" toml:"authenticator"`
Endpoint struct {
EnableCustomClaimMappings bool `json:"enableCustomClaimMappings,omitempty" toml:"enableCustomClaimMappings"`
EnableMergingCustomClaimMappingsWithDefault bool `json:"enableMergingCustomClaimMappingsWithDefault,omitempty" toml:"enableMergingCustomClaimMappingsWithDefault"`
} `json:"endpoint,omitempty" toml:"endpoint"`
Adaptive struct {
AllowLoops bool `json:"allowLoops,omitempty" toml:"allow_loops"`
ExecutionSupervisor struct {
Timeout string `json:"timeout,omitempty" toml:"timeout"`
} `json:"executionSupervisor,omitempty" toml:"execution_supervisor"`
} `json:"adaptive,omitempty" toml:"adaptive"`
CustomAuthenticator string `json:"customAuthenticator,omitempty" toml:"custom_authenticator"`
JitProvisioning struct {
EnableEnhancedFeature bool `json:"enableEnhancedFeature,omitempty" toml:"enable_enhanced_feature"`
} `json:"jitProvisioning,omitempty" toml:"jit_provisioning"`
}
type Recaptcha struct {
Enabled bool `json:"enabled,omitempty" toml:"enabled"`
ApiUrl string `json:"apiUrl,omitempty" toml:"api_url"`
VerifyUrl string `json:"verifyUrl,omitempty" toml:"verify_url"`
RequestWrapUrls string `json:"requestWrapUrls,omitempty" toml:"request_wrap_urls"`
SiteKey string `json:"siteKey,omitempty" toml:"site_key"`
SecretKey string `json:"secretKey,omitempty" toml:"secret_key"`
}
type OutputAdapter struct {
Email struct {
FromAddress string `json:"fromAddress,omitempty" toml:"from_address"`
Username string `json:"username,omitempty" toml:"username"`
Password string `json:"password,omitempty" toml:"password"`
Hostname string `json:"hostname,omitempty" toml:"hostname"`
Port string `json:"port,omitempty" toml:"port"`
EnableStartTls string `json:"enableStartTls,omitempty" toml:"enable_start_tls"`
EnableAuthentication string `json:"enableAuthentication,omitempty" toml:"enable_authentication"`
} `json:"email,omitempty" toml:"email"`
}
type Clustering struct {
MembershipScheme string `json:"membershipScheme,omitempty" toml:"membership_scheme"`
ClusteringProperties struct {
MembershipSchemeClassName string `json:"membershipSchemeClassName,omitempty" toml:"membershipSchemeClassName"`
KubernetesNamespace string `json:"kubernetesNamespace,omitempty" toml:"KUBERNETES_NAMESPACE"`
KubernetesServices string `json:"kubernetesServices,omitempty" toml:"KUBERNETES_SERVICES"`
KubernetesMasterSkipSslVerification string `json:"kubernetesMasterSkipSslVerification,omitempty" toml:"KUBERNETES_MASTER_SKIP_SSL_VERIFICATION"`
UseDns bool `json:"useDns,omitempty" toml:"USE_DNS"`
} `json:"properties,omitempty" toml:"properties"`
}
type TenantMgt struct {
EnableEmailDomain bool `json:"enableEmailDomain,omitempty" toml:"enable_email_domain"`
}
type TenantContext struct {
EnableTenantQualifiedUrls bool `json:"enableTenantQualifiedUrls,omitempty" toml:"enable_tenant_qualified_urls"`
EnableTenantedSessions bool `json:"enableTenantedSessions,omitempty" toml:"enable_tenanted_sessions"`
Rewrite struct {
CustomWebapps bool `json:"customWebapps,omitempty" toml:"custom_webapps"`
} `json:"rewrite,omitempty" toml:"rewrite"`
}
type AdminService struct {
Wsdl struct {
Enable bool `json:"enable,omitempty" toml:"enable"`
} `json:"wsdl,omitempty" toml:"wsdl"`
}
type SystemRoles struct {
Enable bool `json:"enable,omitempty" toml:"enable"`
ReadOnlyRoles bool `json:"readOnlyRoles,omitempty" toml:"read_only_roles"`
}
type CarbonHealthCheck struct {
Enable bool `json:"enable,omitempty" toml:"enable"`
HealthChecker struct {
DatasourceHealthChecker struct {
DatasourceHealthCheckerProperties struct {
Monitored struct {
Datasources string `json:"datasources,omitempty" toml:"datasources"`
} `json:"monitored,omitempty" toml:"monitored"`
} `json:"properties,omitempty" toml:"properties"`
} `json:"dataSourceHealthChecker,omitempty" toml:"data_source_health_checker"`
} `json:"healthChecker,omitempty" toml:"health_checker"`
}
type SystemApplications struct {
ReadOnlyRoles bool `json:"readOnlyRoles,omitempty" toml:"read_only_roles"`
FidpRoleBasedAuthzEnabledApps string `json:"fidpRoleBasedAuthzEnabledApps,omitempty" toml:"fidp_role_based_authz_enabled_apps"`
}
type Catalina struct {
Valves struct {
Valve struct {
ValveProperties struct {
ClassName string `json:"className,omitempty" toml:"className"`
} `json:"properties,omitempty" toml:"properties"`
} `json:"valve,omitempty" toml:"valve"`
} `json:"valves,omitempty" toml:"valves"`
}
toml_key yaml_key go_var go_type
a a A A
a.b a.b B string
a.c a.c C string
a.d a.d D bool
e e E E
e.f e.f F F
e.f.g e.f.g G string
e.h e.h H string
package main
type A struct {
B string `json:"b,omitempty" toml:"b"`
C string `json:"c,omitempty" toml:"c"`
D bool `json:"d,omitempty" toml:"d"`
}
type E struct {
F struct {
G string `json:"g,omitempty" toml:"g"`
} `json:"f,omitempty" toml:"f"`
H string `json:"h,omitempty" toml:"h"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment