(record configSetRecord)
| 1165 | } |
| 1166 | |
| 1167 | func configSetBundle(record configSetRecord) outputBundle { |
| 1168 | rows := []keyValue{ |
| 1169 | {Label: configPathValue, Value: stringOrDash(record.Path)}, |
| 1170 | {Label: configValueValue, Value: formatConfigValue(record.Value)}, |
| 1171 | {Label: configScopeValue, Value: stringOrDash(record.Scope)}, |
| 1172 | {Label: configTargetValue, Value: stringOrDash(record.Target)}, |
| 1173 | {Label: configRedactedValue, Value: strconv.FormatBool(record.Redacted)}, |
| 1174 | {Label: "Lifecycle", Value: stringOrDash(record.Lifecycle)}, |
| 1175 | {Label: "Applied", Value: strconv.FormatBool(record.Applied)}, |
| 1176 | {Label: cliNextActionValue, Value: stringOrDash(record.NextAction)}, |
| 1177 | {Label: "Apply Record", Value: stringOrDash(record.ApplyRecordID)}, |
| 1178 | {Label: "Active Generation", Value: strconv.FormatInt(record.ActiveGeneration, 10)}, |
| 1179 | {Label: "Restart Required", Value: strconv.FormatBool(record.RestartRequired)}, |
| 1180 | {Label: "Restart Scope", Value: stringOrDash(record.RestartScope)}, |
| 1181 | } |
| 1182 | return outputBundle{ |
| 1183 | jsonValue: record, |
| 1184 | human: func() (string, error) { |
| 1185 | return renderHumanSection("Config", rows), nil |
| 1186 | }, |
| 1187 | toon: func() (string, error) { |
| 1188 | return renderToonObject("config_set", []string{ |
| 1189 | configPathKey, |
| 1190 | hooksValueKey, |
| 1191 | configScopeKey, |
| 1192 | configTargetKey, |
| 1193 | configRedactedKey, |
| 1194 | "lifecycle", |
| 1195 | "applied", |
| 1196 | "next_action", |
| 1197 | "apply_record_id", |
| 1198 | "active_generation", |
| 1199 | "restart_required", |
| 1200 | "restart_scope", |
| 1201 | }, []string{ |
| 1202 | record.Path, |
| 1203 | formatConfigValue(record.Value), |
| 1204 | record.Scope, |
| 1205 | record.Target, |
| 1206 | strconv.FormatBool(record.Redacted), |
| 1207 | record.Lifecycle, |
| 1208 | strconv.FormatBool(record.Applied), |
| 1209 | record.NextAction, |
| 1210 | record.ApplyRecordID, |
| 1211 | strconv.FormatInt(record.ActiveGeneration, 10), |
| 1212 | strconv.FormatBool(record.RestartRequired), |
| 1213 | record.RestartScope, |
| 1214 | }), nil |
| 1215 | }, |
| 1216 | } |
| 1217 | } |
| 1218 | |
| 1219 | func maybeApplyConfigSetViaDaemon( |
| 1220 | ctx context.Context, |
no test coverage detected