Versions in this module Expand all Collapse all v0 v0.2.0 Jul 13, 2026 Changes in this version type AuditOrgsResource + func (r *AuditOrgsResource) Archive(ctx context.Context, organizationID string) (map[string]any, error) + func (r *AuditOrgsResource) Delete(ctx context.Context, organizationID string) (map[string]any, error) + func (r *AuditOrgsResource) Unarchive(ctx context.Context, organizationID string) (map[string]any, error) + func (r *AuditOrgsResource) Update(ctx context.Context, organizationID string, params UpdateAuditOrgParams) (map[string]any, error) type Client + func (c *Client) Me(ctx context.Context) (map[string]any, error) + type ListAuditOrgsParams struct + IncludeArchived bool + type UpdateAuditOrgParams struct + Name *string v0.1.0 Jul 6, 2026 Changes in this version + const AuditSchemaID + const SDKVersion + func CanonicalAuditBytes(event map[string]any) ([]byte, error) + func ContentIdempotencyKey(body map[string]any) string + func IsAuthentication(err error) bool + func IsConflict(err error) bool + func IsForbidden(err error) bool + func IsNetwork(err error) bool + func IsNotFound(err error) bool + func IsQuotaExceeded(err error) bool + func IsServer(err error) bool + func IsTimeout(err error) bool + func IsValidation(err error) bool + func NormalizeTS(value string) (string, error) + func PayloadHashHex(canonical []byte) string + type AiAttestation struct + AttestationHash string + AttestationID string + AttestationType string + CreatedAt string + InputHash *string + ModelName *string + ModelProvider *string + ModelVersion *string + Organization *OrganizationPublic + OutputHash *string + PublicKey string + RetentionPolicy string + Signature string + SignatureAlg string + SignedPayload string + TenantID string + type AnchorDocumentParams struct + DocumentHash string + DocumentRef string + EventType string + IdempotencyKey string + Metadata map[string]any + OriginalBytesB64 string + TraceID string + type AnchorDocumentResponse struct + CreatedAt string + DocumentHash string + EventID string + Status string + type AnchorFileParams struct + Bytes []byte + DocumentRef string + EventType string + IdempotencyKey string + Metadata map[string]any + Path string + SkipOriginal bool + TraceID string + type AttestationListItem struct + AttestationHash string + AttestationID string + AttestationType string + CreatedAt string + ModelName *string + ModelProvider *string + RetentionPolicy string + type AttestationSubject struct + Extra map[string]any + SessionID string + UserID string + type AttestationsResource struct + func (r *AttestationsResource) Get(ctx context.Context, attestationID string) (AiAttestation, error) + func (r *AttestationsResource) GetRaw(ctx context.Context, attestationID string) (map[string]any, error) + func (r *AttestationsResource) Ingest(ctx context.Context, params IngestAttestationParams) (IngestAttestationResponse, error) + func (r *AttestationsResource) List(ctx context.Context, params ListAttestationsParams) (ListAttestationsResponse, error) + func (r *AttestationsResource) Verify(ctx context.Context, attestationID string, params VerifyAttestationParams) (VerifyAttestationResponse, error) + func (r *AttestationsResource) VerifyPayload(ctx context.Context, attestationID string, payload []byte) (VerifyAttestationResponse, error) + func (r *AttestationsResource) VerifyPayloadString(ctx context.Context, attestationID string, payload string) (VerifyAttestationResponse, error) + func (r *AttestationsResource) VerifySignature(ctx context.Context, attestationID string) (SignatureVerificationResult, error) + type AuditEvent struct + Action string + Actor map[string]any + Context map[string]any + ID string + IngestedAt string + Metadata map[string]any + OccurredAt string + OrgID string + PayloadHash string + Seq int64 + Signature string + SigningPublicKey string + Targets []any + type AuditEventsResource struct + func (r *AuditEventsResource) Get(ctx context.Context, eventID string) (AuditEvent, error) + func (r *AuditEventsResource) Ingest(ctx context.Context, params IngestAuditEventParams) (map[string]any, error) + func (r *AuditEventsResource) List(ctx context.Context, params ListAuditEventsParams) (ListAuditEventsResponse, error) + func (r *AuditEventsResource) Verify(ctx context.Context, eventID string) (map[string]any, error) + type AuditExportsResource struct + func (r *AuditExportsResource) Create(ctx context.Context, params CreateAuditExportParams) (map[string]any, error) + func (r *AuditExportsResource) Get(ctx context.Context, exportID string) (map[string]any, error) + type AuditKeySource string + const KeySourceEvent + const KeySourcePinned + type AuditOrgsResource struct + func (r *AuditOrgsResource) Create(ctx context.Context, params CreateAuditOrgParams) (map[string]any, error) + func (r *AuditOrgsResource) Integrity(ctx context.Context, organizationID string) (map[string]any, error) + func (r *AuditOrgsResource) List(ctx context.Context) (map[string]any, error) + func (r *AuditOrgsResource) SetRetention(ctx context.Context, organizationID string, days int) (map[string]any, error) + type AuditPortalSessionsResource struct + func (r *AuditPortalSessionsResource) Create(ctx context.Context, params CreatePortalSessionParams) (map[string]any, error) + type AuditResource struct + Events *AuditEventsResource + Exports *AuditExportsResource + Orgs *AuditOrgsResource + PortalSessions *AuditPortalSessionsResource + Streams *AuditStreamsResource + type AuditStreamsResource struct + func (r *AuditStreamsResource) Create(ctx context.Context, organizationID string, params CreateAuditStreamParams) (map[string]any, error) + func (r *AuditStreamsResource) Delete(ctx context.Context, organizationID, streamID string) (map[string]any, error) + func (r *AuditStreamsResource) List(ctx context.Context, organizationID string) (map[string]any, error) + func (r *AuditStreamsResource) Test(ctx context.Context, organizationID, streamID string) (map[string]any, error) + type AuditVerifyOptions struct + PublicKey any + type AuditVerifyResult struct + KeySource AuditKeySource + PayloadHash string + Reason string + Valid bool + func VerifyAuditEvent(event map[string]any, opts *AuditVerifyOptions) AuditVerifyResult + func VerifyAuditEventStruct(event AuditEvent, opts *AuditVerifyOptions) AuditVerifyResult + type Client struct + Attestations *AttestationsResource + Audit *AuditResource + Documents *DocumentsResource + Events *EventsResource + Traces *TracesResource + func New(opts ...Option) (*Client, error) + func (c *Client) Validate(ctx context.Context) ValidationResult + type ComplianceEvent struct + APIKeyID *string + AccessTier *string + EventHash string + EventID string + EventTime *string + EventType string + ExpiresAt *string + IdempotencyKey *string + IngestedAt string + Organization *OrganizationPublic + Payload map[string]any + PayloadHash string + RequestHash string + RetentionPolicy string + TenantID string + UserID *string + type CreateAuditExportParams struct + Filters map[string]any + Format string + OrganizationID string + type CreateAuditOrgParams struct + Name string + OrganizationID string + type CreateAuditStreamParams struct + Type string + URL string + type CreatePortalSessionParams struct + Intent string + LinkDurationSeconds *int + OrganizationID string + SessionDurationSeconds *int + type CreateTraceParams struct + Label string + Metadata map[string]any + type CreateTraceResponse struct + CreatedAt string + Label string + Status string + TraceID string + type DeleteTraceResponse struct + Deleted bool + TraceID string + type DocumentEvent struct + CreatedAt string + DocumentHash string + DocumentRef string + EventID string + HasOriginal bool + Metadata map[string]any + Organization *OrganizationPublic + PublicKeyB64 string + SignatureB64 string + SignedPayloadB64 string + TenantID string + type DocumentListItem struct + CreatedAt string + DocumentHash string + DocumentRef string + EventID string + EventType string + HasOriginal bool + type DocumentsResource struct + func (r *DocumentsResource) Anchor(ctx context.Context, params AnchorDocumentParams) (AnchorDocumentResponse, error) + func (r *DocumentsResource) AnchorFile(ctx context.Context, params AnchorFileParams) (AnchorDocumentResponse, error) + func (r *DocumentsResource) Get(ctx context.Context, eventID string) (DocumentEvent, error) + func (r *DocumentsResource) GetOriginal(ctx context.Context, eventID string) ([]byte, error) + func (r *DocumentsResource) List(ctx context.Context, params ListDocumentsParams) (ListDocumentsResponse, error) + func (r *DocumentsResource) Verify(ctx context.Context, eventID string, params VerifyDocumentParams) (VerifyDocumentResponse, error) + type Error struct + Body map[string]any + ErrorCode string + Kind ErrorKind + Message string + Request *RequestContext + RetryAfterSeconds *float64 + StatusCode int + func (e *Error) Error() string + func (e *Error) Unwrap() error + type ErrorKind string + const KindAuthentication + const KindConflict + const KindForbidden + const KindNetwork + const KindNotFound + const KindQuotaExceeded + const KindServer + const KindTimeout + const KindUnknown + const KindValidation + type EventListItem struct + EventHash string + EventID string + EventTime *string + EventType string + IdempotencyKey *string + IngestedAt string + PayloadHash string + RetentionPolicy string + type EventsResource struct + func (r *EventsResource) Get(ctx context.Context, eventID string) (ComplianceEvent, error) + func (r *EventsResource) Ingest(ctx context.Context, params IngestEventParams) (IngestEventResponse, error) + func (r *EventsResource) List(ctx context.Context, params ListEventsParams) (ListEventsResponse, error) + func (r *EventsResource) Verify(ctx context.Context, eventID string, params VerifyEventParams) (VerifyEventResponse, error) + type GetTraceParams struct + EventLimit *int + EventPage *int + type IngestAttestationParams struct + IdempotencyKey string + Input string + ModelName string + ModelProvider string + ModelVersion string + Output string + Subject *AttestationSubject + TraceID string + Type string + type IngestAttestationResponse struct + AttestationID string + CreatedAt string + InputHash string + OutputHash string + PayloadHash string + Status string + type IngestAuditEventParams struct + Action string + Actor map[string]any + Context map[string]any + IdempotencyKey string + Metadata map[string]any + OccurredAt string + OrganizationID string + Targets []map[string]any + type IngestEventParams struct + EventTime string + EventType string + IdempotencyKey string + Payload map[string]any + TraceID string + type IngestEventResponse struct + EventID string + IngestedAt string + type ListAttestationsParams struct + AttestationType string + DateFrom string + DateTo string + Limit *int + ModelProvider string + Page *int + type ListAttestationsResponse struct + Attestations []AttestationListItem + HasMore bool + Limit int + Page int + Total int + type ListAuditEventsParams struct + Actions string + ActorID string + Cursor string + Limit *int + OrganizationID string + RangeEnd string + RangeStart string + TargetID string + type ListAuditEventsResponse struct + Events []AuditEvent + NextCursor *string + type ListDocumentsParams struct + DateFrom string + DateTo string + DocumentRef string + Limit *int + Page *int + type ListDocumentsResponse struct + Documents []DocumentListItem + HasMore bool + Limit int + Page int + Total int + type ListEventsParams struct + DateFrom string + DateTo string + EventType string + Limit *int + Page *int + type ListEventsResponse struct + Events []EventListItem + HasMore bool + Limit int + Page int + Total int + type ListTracesParams struct + Limit *int + Page *int + Status string + type ListTracesResponse struct + HasMore bool + Limit int + Page int + Total int + Traces []TraceListItem + type Option func(*config) + func WithAPIKey(key string) Option + func WithAPIVersion(version string) Option + func WithBaseURL(url string) Option + func WithExtraHeaders(headers map[string]string) Option + func WithHTTPClient(client *http.Client) Option + func WithIdempotencyKey(key string) Option + func WithTimeout(d time.Duration) Option + type OrganizationPublic struct + DomainVerified bool + DomainVerifiedAt *string + IssuerName string + LogoURL *string + Name string + PrimaryDomain string + type RequestContext struct + Method string + Path string + type SealTraceResponse struct + Message string + Status string + TraceID string + type SignatureVerificationResult struct + Attestation AiAttestation + Reason string + SignedData map[string]any + Valid bool + type TraceDetail struct + CompositeHash *string + CreatedAt string + EventCount *int + EventHasMore bool + EventLimit int + EventPage int + EventTotal int + Events []TraceEventSummary + Label string + Metadata map[string]any + SealEventID *string + SealedAt *string + Status string + TraceID string + type TraceEventSummary struct + EventID string + EventType string + IngestedAt string + PayloadHash string + type TraceListItem struct + CompositeHash *string + CreatedAt string + EventCount *int + Label string + SealedAt *string + Status string + TraceID string + type TraceProofBundle struct + CompositeHash string + CreatedAt string + EventCount int + Events []TraceProofEvent + Label string + SealEvent TraceProofSealEvent + SealedAt string + Status string + TenantDomain string + TraceID string + Verification TraceProofVerification + Version string + type TraceProofEvent struct + ContentHash string + EventID string + EventType string + Payload map[string]any + PublicKey string + Signature string + Timestamp string + type TraceProofSealEvent struct + ContentHash string + EventID string + EventType string + PublicKey string + Signature string + Timestamp string + type TraceProofVerification struct + AllSignaturesValid bool + CompositeHashValid bool + type TracesResource struct + func (r *TracesResource) Create(ctx context.Context, params CreateTraceParams) (CreateTraceResponse, error) + func (r *TracesResource) Delete(ctx context.Context, traceID string) (DeleteTraceResponse, error) + func (r *TracesResource) Get(ctx context.Context, traceID string, params GetTraceParams) (TraceDetail, error) + func (r *TracesResource) List(ctx context.Context, params ListTracesParams) (ListTracesResponse, error) + func (r *TracesResource) Proof(ctx context.Context, traceID string) (TraceProofBundle, error) + func (r *TracesResource) ProofPDF(ctx context.Context, traceID string) ([]byte, error) + func (r *TracesResource) Seal(ctx context.Context, traceID string) (SealTraceResponse, error) + type ValidationResult struct + BaseURL string + Reason string + Valid bool + type VerifyAttestationParams struct + ContentHash string + type VerifyAttestationResponse struct + AnchoredAt string + AnchoredHash string + AttestationID string + MatchResult bool + MatchedField *string + Organization *OrganizationPublic + SubmittedHash string + type VerifyDocumentParams struct + DocumentHash string + type VerifyDocumentResponse struct + AnchoredAt string + AnchoredHash string + DocumentRef string + EventID string + MatchResult bool + Organization *OrganizationPublic + SubmittedHash string + type VerifyEventParams struct + Payload map[string]any + PayloadHash string + type VerifyEventResponse struct + AnchoredAt string + AnchoredHash string + EventID string + MatchResult bool + MatchedField *string + Method string + Organization *OrganizationPublic + SubmittedHash string