Rename Go client package from mciasgoclient to mcias
- Update package declaration in client.go - Update error message strings to reference new package name - Update test package and imports to use new name - Update README.md documentation and examples with new package name - All tests pass
This commit is contained in:
26
PROGRESS.md
26
PROGRESS.md
@@ -4,6 +4,32 @@ Source of truth for current development state.
|
||||
---
|
||||
All phases complete. **v1.0.0 tagged.** All packages pass `go test ./...`; `golangci-lint run ./...` clean.
|
||||
|
||||
### 2026-03-13 — Make pgcreds discoverable via CLI and UI
|
||||
|
||||
**Problem:** Users had no way to discover which pgcreds were available to them or what their credential IDs were, making it functionally impossible to use the system without manual database inspection.
|
||||
|
||||
**Solution:** Added two complementary discovery paths:
|
||||
|
||||
**REST API:**
|
||||
- New `GET /v1/pgcreds` endpoint (requires authentication) returns all accessible credentials (owned + explicitly granted) with their IDs, host, port, database, username, and timestamps
|
||||
- Response includes `id` field so users can then fetch full credentials via `GET /v1/accounts/{id}/pgcreds`
|
||||
|
||||
**CLI (`cmd/mciasctl/main.go`):**
|
||||
- New `pgcreds list` subcommand calls `GET /v1/pgcreds` and displays accessible credentials with IDs
|
||||
- Updated usage documentation to include `pgcreds list`
|
||||
|
||||
**Web UI (`web/templates/pgcreds.html`):**
|
||||
- Credential ID now displayed in a `<code>` element at the top of each credential's metadata block
|
||||
- Styled with monospace font for easy copying and reference
|
||||
|
||||
**Files modified:**
|
||||
- `internal/server/server.go`: Added route `GET /v1/pgcreds` (requires auth, not admin) + handler `handleListAccessiblePGCreds`
|
||||
- `cmd/mciasctl/main.go`: Added `pgCredsList` function and switch case
|
||||
- `web/templates/pgcreds.html`: Display credential ID in the credentials list
|
||||
- Struct field alignment fixed in `pgCredResponse` to pass `go vet`
|
||||
|
||||
All tests pass; `go vet ./...` clean.
|
||||
|
||||
### 2026-03-12 — Update web UI and model for all compile-time roles
|
||||
|
||||
- `internal/model/model.go`: added `RoleGuest`, `RoleViewer`, `RoleEditor`, and
|
||||
|
||||
Reference in New Issue
Block a user