Skip to content

Commit e740bdb

Browse files
committed
Fix inconsistent naming
1 parent af00e57 commit e740bdb

5 files changed

Lines changed: 20 additions & 20 deletions

File tree

src/java/frameworks/client_certificate_mapper.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ func (c *ClientCertificateMapperFramework) Finalize() error {
8383
return nil
8484
}
8585

86-
func (c *ClientCertificateMapperFramework) loadConfig() (*ccmConfig, error) {
86+
func (c *ClientCertificateMapperFramework) loadConfig() (*clientCertificateMapperConfig, error) {
8787
// initialize default values
88-
mapperConfig := ccmConfig{
88+
mapperConfig := clientCertificateMapperConfig{
8989
Enabled: true,
9090
}
9191
config := os.Getenv("JBP_CONFIG_CLIENT_CERTIFICATE_MAPPER")
@@ -103,11 +103,11 @@ func (c *ClientCertificateMapperFramework) loadConfig() (*ccmConfig, error) {
103103
return &mapperConfig, nil
104104
}
105105

106-
type ccmConfig struct {
106+
type clientCertificateMapperConfig struct {
107107
Enabled bool `yaml:"enabled"`
108108
}
109109

110110
// isEnabled checks if client certificate mapper is enabled
111-
func (c *ccmConfig) isEnabled() bool {
111+
func (c *clientCertificateMapperConfig) isEnabled() bool {
112112
return c.Enabled
113113
}

src/java/frameworks/container_security_provider.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ func (c *ContainerSecurityProviderFramework) getDefaultSecurityProviders() []str
218218
}
219219
}
220220

221-
func (c *ContainerSecurityProviderFramework) loadConfig() (*cspConfig, error) {
221+
func (c *ContainerSecurityProviderFramework) loadConfig() (*containerSecurityProviderConfig, error) {
222222
// initialize default values
223-
secConfig := cspConfig{
223+
secConfig := containerSecurityProviderConfig{
224224
KeyManagerEnabled: "",
225225
TrustManagerEnabled: "",
226226
}
@@ -240,16 +240,16 @@ func (c *ContainerSecurityProviderFramework) loadConfig() (*cspConfig, error) {
240240
}
241241

242242
// getKeyManagerEnabled returns the key_manager_enabled configuration value
243-
func (c *cspConfig) getKeyManagerEnabled() string {
243+
func (c *containerSecurityProviderConfig) getKeyManagerEnabled() string {
244244
return c.KeyManagerEnabled
245245
}
246246

247247
// getTrustManagerEnabled returns the trust_manager_enabled configuration value
248-
func (c *cspConfig) getTrustManagerEnabled() string {
248+
func (c *containerSecurityProviderConfig) getTrustManagerEnabled() string {
249249
return c.TrustManagerEnabled
250250
}
251251

252-
type cspConfig struct {
252+
type containerSecurityProviderConfig struct {
253253
KeyManagerEnabled string `yaml:"key_manager_enabled"`
254254
TrustManagerEnabled string `yaml:"trust_manager_enabled"`
255255
}

src/java/frameworks/google_stackdriver_profiler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,16 @@ func (g *GoogleStackdriverProfilerFramework) loadConfig() error {
265265
ApplicationName: "",
266266
ApplicationVersion: "",
267267
}
268-
config := os.Getenv("JBP_CONFIG_GOOGLE_STACK_DRIVE_PROFILER")
268+
config := os.Getenv("JBP_CONFIG_GOOGLE_STACKDRIVER_PROFILER")
269269
if config != "" {
270270
yamlHandler := common.YamlHandler{}
271271
err := yamlHandler.ValidateFields([]byte(config), &gsdConfig)
272272
if err != nil {
273273
g.context.Log.Warning("Unknown user config values: %s", err.Error())
274274
}
275-
// overlay JBP_CONFIG_GOOGLE_STACK_DRIVE_PROFILER over default values
275+
// overlay JBP_CONFIG_GOOGLE_STACKDRIVER_PROFILER over default values
276276
if err = yamlHandler.Unmarshal([]byte(config), &gsdConfig); err != nil {
277-
return fmt.Errorf("failed to parse JBP_CONFIG_GOOGLE_STACK_DRIVE_PROFILER: %w", err)
277+
return fmt.Errorf("failed to parse JBP_CONFIG_GOOGLE_STACKDRIVER_PROFILER: %w", err)
278278
}
279279
}
280280
g.config = &gsdConfig

src/java/frameworks/java_memory_assistant.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ func (j *JavaMemoryAssistantFramework) getConfigValue(config, key, defaultValue
190190
return defaultValue
191191
}
192192

193-
func (j *JavaMemoryAssistantFramework) loadConfig() (*jmaConfig, error) {
193+
func (j *JavaMemoryAssistantFramework) loadConfig() (*javaMemoryAssistantConfig, error) {
194194
// initialize default values
195-
jConfig := jmaConfig{
195+
jConfig := javaMemoryAssistantConfig{
196196
Enabled: false,
197197
Agent: Agent{
198198
HeapDumpFolder: "",
@@ -234,7 +234,7 @@ func (j *JavaMemoryAssistantFramework) loadConfig() (*jmaConfig, error) {
234234
}
235235

236236
// getThresholds extracts memory threshold configuration
237-
func (j *jmaConfig) getThresholds() map[string]string {
237+
func (j *javaMemoryAssistantConfig) getThresholds() map[string]string {
238238
yamlHandler := common.YamlHandler{}
239239
data, _ := yamlHandler.Marshal(j.Agent.Thresholds)
240240

@@ -246,11 +246,11 @@ func (j *jmaConfig) getThresholds() map[string]string {
246246

247247
// isEnabled checks if Java Memory Assistant is enabled
248248
// Default is false (disabled) unless explicitly enabled via configuration
249-
func (j *jmaConfig) isEnabled() bool {
249+
func (j *javaMemoryAssistantConfig) isEnabled() bool {
250250
return j.Enabled
251251
}
252252

253-
type jmaConfig struct {
253+
type javaMemoryAssistantConfig struct {
254254
Enabled bool `yaml:"enabled"`
255255
Agent Agent `yaml:"agent"`
256256
CleanUp CleanUp `yaml:"clean_up"`

src/java/frameworks/sealights_agent.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ func (f *SealightsAgentFramework) Finalize() error {
215215
return nil
216216
}
217217

218-
func (f *SealightsAgentFramework) loadConfig() (*sealightConfig, error) {
218+
func (f *SealightsAgentFramework) loadConfig() (*sealightsAgentConfig, error) {
219219
// initialize default values
220-
sConfig := sealightConfig{
220+
sConfig := sealightsAgentConfig{
221221
BuildSessionId: "",
222222
LabId: "",
223223
Proxy: "",
@@ -238,7 +238,7 @@ func (f *SealightsAgentFramework) loadConfig() (*sealightConfig, error) {
238238
return &sConfig, nil
239239
}
240240

241-
type sealightConfig struct {
241+
type sealightsAgentConfig struct {
242242
BuildSessionId string `yaml:"build_session_id"`
243243
LabId string `yaml:"lab_id"`
244244
Proxy string `yaml:"proxy"`

0 commit comments

Comments
 (0)