From c714f29fd151d7039328033c22779470061e81da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 7 Jun 2022 14:17:19 +0000 Subject: [PATCH] lint init.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- ocis/pkg/init/init.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ocis/pkg/init/init.go b/ocis/pkg/init/init.go index a4411ac2d..8fd77b7a6 100644 --- a/ocis/pkg/init/init.go +++ b/ocis/pkg/init/init.go @@ -28,15 +28,15 @@ type InsecureExtension struct { } type InsecureProxyExtension struct { - Insecure_backends bool + InsecureBackends bool `yaml:"insecure_backends"` } type DataProviderInsecureSettings struct { - Data_provider_insecure bool + DataProviderInsecure bool `yaml:"data_provider_insecure"` } type LdapSettings struct { - Bind_password string + BindPassword string `yaml:"bind_password"` } type LdapBasedExtension struct { Ldap LdapSettings @@ -100,7 +100,7 @@ type ThumbnailExtension struct { // - marshal it to yaml type OcisConfig struct { TokenManager TokenManager `yaml:"token_manager"` - MachineAuthApiKey string `yaml:"machine_auth_api_key"` + MachineAuthAPIKey string `yaml:"machine_auth_api_key"` SystemUserAPIKey string `yaml:"system_user_api_key"` TransferSecret string `yaml:"transfer_secret"` SystemUserID string `yaml:"system_user_id"` @@ -193,11 +193,11 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin if err != nil { return fmt.Errorf("could not generate random password for tokenmanager: %s", err) } - machineAuthApiKey, err := generators.GenerateRandomPassword(passwordLength) + machineAuthAPIKey, err := generators.GenerateRandomPassword(passwordLength) if err != nil { return fmt.Errorf("could not generate random password for machineauthsecret: %s", err) } - systemUserApiKey, err := generators.GenerateRandomPassword(passwordLength) + systemUserAPIKey, err := generators.GenerateRandomPassword(passwordLength) if err != nil { return fmt.Errorf("could not generate random system user API key: %s", err) } @@ -214,8 +214,8 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin TokenManager: TokenManager{ JWTSecret: tokenManagerJwtSecret, }, - MachineAuthApiKey: machineAuthApiKey, - SystemUserAPIKey: systemUserApiKey, + MachineAuthAPIKey: machineAuthAPIKey, + SystemUserAPIKey: systemUserAPIKey, TransferSecret: revaTransferSecret, SystemUserID: systemUserID, AdminUserID: adminUserID, @@ -229,34 +229,34 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin }, Idp: LdapBasedExtension{ Ldap: LdapSettings{ - Bind_password: idpServicePassword, + BindPassword: idpServicePassword, }, }, AuthBasic: AuthbasicExtension{ AuthProviders: LdapBasedExtension{ Ldap: LdapSettings{ - Bind_password: revaServicePassword, + BindPassword: revaServicePassword, }, }, }, Groups: UsersAndGroupsExtension{ Drivers: LdapBasedExtension{ Ldap: LdapSettings{ - Bind_password: revaServicePassword, + BindPassword: revaServicePassword, }, }, }, Users: UsersAndGroupsExtension{ Drivers: LdapBasedExtension{ Ldap: LdapSettings{ - Bind_password: revaServicePassword, + BindPassword: revaServicePassword, }, }, }, Graph: GraphExtension{ Identity: LdapBasedExtension{ Ldap: LdapSettings{ - Bind_password: idmServicePassword, + BindPassword: idmServicePassword, }, }, }, @@ -287,13 +287,13 @@ func CreateConfig(insecure, forceOverwrite bool, configPath, adminPassword strin Insecure: true, } cfg.Proxy = InsecureProxyExtension{ - Insecure_backends: true, + InsecureBackends: true, } cfg.StorageSystem = DataProviderInsecureSettings{ - Data_provider_insecure: true, + DataProviderInsecure: true, } cfg.StorageUsers = DataProviderInsecureSettings{ - Data_provider_insecure: true, + DataProviderInsecure: true, } cfg.Thumbnails.Thumbnail.WebdavAllowInsecure = true