Initial commit: Elydora Go SDK
Go SDK for Elydora agent operations, cryptographic signing, and audit trail integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
8916506ebc
26 files changed
+3381
No files matched your search
@@ -0,0 +1,26 @@
|
||||
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"`
|
||||
}
|
||||
Reference in new issue
Block a user