Full self-hosted port of the Elydora tamper-evident audit protocol: - Hono API server with PostgreSQL, Redis, MinIO adapters - Ed25519 signed operations, chain hashing, Merkle epoch rollups - PBKDF2 password hashing, HMAC-SHA256 JWT, 5-role RBAC - Next.js management console - Node.js, Python, and Go SDKs - Docker Compose for local deployment - Helm chart for Kubernetes - Comprehensive security hardening and audit fixes applied Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
863 B
Go
27 lines
863 B
Go
package elydora
|
|
|
|
import "fmt"
|
|
|
|
// ElydoraError represents an error returned by the Elydora API.
|
|
type ElydoraError struct {
|
|
StatusCode int
|
|
Code ErrorCode `json:"code"`
|
|
Message string `json:"message"`
|
|
RequestID string `json:"request_id"`
|
|
Details map[string]interface{} `json:"details,omitempty"`
|
|
}
|
|
|
|
func (e *ElydoraError) Error() string {
|
|
return fmt.Sprintf("elydora: %s (code=%s, status=%d, request_id=%s)", e.Message, e.Code, e.StatusCode, e.RequestID)
|
|
}
|
|
|
|
// errorResponse is the wire format for API error responses.
|
|
type errorResponse struct {
|
|
Error struct {
|
|
Code ErrorCode `json:"code"`
|
|
Message string `json:"message"`
|
|
RequestID string `json:"request_id"`
|
|
Details map[string]interface{} `json:"details,omitempty"`
|
|
} `json:"error"`
|
|
}
|