Mostly implemented issue and provision commands. Restructured AI generateed code.

This commit is contained in:
2025-07-28 10:20:52 +02:00
parent 9696f95043
commit 0e86c49965
5 changed files with 286 additions and 208 deletions

View File

@@ -15,7 +15,6 @@ import (
)
// _CAState represents the persisted CA state in JSON
// (matches the structure of example_ca.json)
type _CAState struct {
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
@@ -24,6 +23,7 @@ type _CAState struct {
Certificates []CertificateRecord `json:"certificates"`
}
// CertificateRecord represents a single certificate record in the CA state
type CertificateRecord struct {
Name string `json:"name"`
Issued string `json:"issued"`
@@ -34,7 +34,7 @@ type CertificateRecord struct {
}
func caStatePath() string {
return filepath.Join(filepath.Dir(configPath), CAConfig.StateName())
return filepath.Join(filepath.Dir(CAConfigPath), CAConfig.StateName())
}
// LoadCAState loads the CA state from a JSON file