MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / readOpenclawConfig

Function readOpenclawConfig

agent/app/service/agents_utils.go:85–99  ·  view source on GitHub ↗
(configPath string)

Source from the content-addressed store, hash-verified

83}
84
85func readOpenclawConfig(configPath string) (map[string]interface{}, error) {
86 if strings.TrimSpace(configPath) == "" {
87 return nil, buserr.New("ErrRecordNotFound")
88 }
89 fileOp := files.NewFileOp()
90 content, err := fileOp.GetContent(configPath)
91 if err != nil {
92 return nil, err
93 }
94 conf := map[string]interface{}{}
95 if err := json.Unmarshal(content, &conf); err != nil {
96 return nil, err
97 }
98 return conf, nil
99}
100
101func writeOpenclawConfigRaw(configPath string, conf map[string]interface{}) error {
102 ensureGatewaySecurityDefaults(conf)

Callers 15

ResetTokenMethod · 0.85
GetSecurityConfigMethod · 0.85
UpdateSecurityConfigMethod · 0.85
GetOtherConfigMethod · 0.85
UpdateOtherConfigMethod · 0.85
loadAgentConfigMethod · 0.85
syncAgentsByAccountMethod · 0.85
UpdateSkillMethod · 0.85
writeOpenclawConfigFunction · 0.85

Calls 1

GetContentMethod · 0.95

Tested by

no test coverage detected