Documentation
¶
Overview ¶
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: AGPL-3.0-or-later
SPDX-License-Identifier: AGPL-3.0-or-later
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrSignatureNotFound = errors.New("signature not found") ErrSignatureAlreadyExists = errors.New("signature already exists") ErrInvalidUser = errors.New("invalid user") ErrInvalidDocument = errors.New("invalid document ID") ErrDatabaseConnection = errors.New("database connection error") ErrDomainNotAllowed = errors.New("domain not allowed") )
Functions ¶
This section is empty.
Types ¶
type ContactInfo ¶ added in v1.1.3
ContactInfo represents a contact with optional name and email
type DocCompletionStats ¶ added in v1.1.3
type DocCompletionStats struct {
DocID string `json:"doc_id"`
ExpectedCount int `json:"expected_count"`
SignedCount int `json:"signed_count"`
PendingCount int `json:"pending_count"`
CompletionRate float64 `json:"completion_rate"` // Percentage 0-100
}
DocCompletionStats provides completion statistics for a document
type Document ¶ added in v1.1.3
type Document struct {
DocID string `json:"doc_id" db:"doc_id"`
Title string `json:"title" db:"title"`
URL string `json:"url" db:"url"`
Checksum string `json:"checksum" db:"checksum"`
ChecksumAlgorithm string `json:"checksum_algorithm" db:"checksum_algorithm"`
Description string `json:"description" db:"description"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
CreatedBy string `json:"created_by" db:"created_by"`
}
Document represents document metadata for tracking and integrity verification
type DocumentInput ¶ added in v1.1.3
type DocumentInput struct {
Title string `json:"title"`
URL string `json:"url"`
Checksum string `json:"checksum"`
ChecksumAlgorithm string `json:"checksum_algorithm"`
Description string `json:"description"`
}
DocumentInput represents the input for creating/updating document metadata
type ExpectedSigner ¶ added in v1.1.3
type ExpectedSigner struct {
ID int64 `json:"id" db:"id"`
DocID string `json:"doc_id" db:"doc_id"`
Email string `json:"email" db:"email"`
Name string `json:"name" db:"name"`
AddedAt time.Time `json:"added_at" db:"added_at"`
AddedBy string `json:"added_by" db:"added_by"`
Notes *string `json:"notes,omitempty" db:"notes"`
}
ExpectedSigner represents an expected signer for a document
type ExpectedSignerWithStatus ¶ added in v1.1.3
type ExpectedSignerWithStatus struct {
ExpectedSigner
HasSigned bool `json:"has_signed"`
SignedAt *time.Time `json:"signed_at,omitempty"`
UserName *string `json:"user_name,omitempty"`
LastReminderSent *time.Time `json:"last_reminder_sent,omitempty"`
ReminderCount int `json:"reminder_count"`
DaysSinceAdded int `json:"days_since_added"`
DaysSinceLastReminder *int `json:"days_since_last_reminder,omitempty"`
}
ExpectedSignerWithStatus combines expected signer info with signature status
type ReminderLog ¶ added in v1.1.3
type ReminderLog struct {
ID int64 `json:"id" db:"id"`
DocID string `json:"doc_id" db:"doc_id"`
RecipientEmail string `json:"recipient_email" db:"recipient_email"`
SentAt time.Time `json:"sent_at" db:"sent_at"`
SentBy string `json:"sent_by" db:"sent_by"`
TemplateUsed string `json:"template_used" db:"template_used"`
Status string `json:"status" db:"status"`
ErrorMessage *string `json:"error_message,omitempty" db:"error_message"`
}
ReminderLog represents a log entry for an email reminder sent to a signer
type ReminderSendResult ¶ added in v1.1.3
type ReminderSendResult struct {
TotalAttempted int `json:"total_attempted"`
SuccessfullySent int `json:"successfully_sent"`
Failed int `json:"failed"`
Errors []string `json:"errors,omitempty"`
}
ReminderSendResult represents the result of a bulk reminder send operation
type ReminderStats ¶ added in v1.1.3
type ReminderStats struct {
TotalSent int `json:"total_sent"`
LastSentAt *time.Time `json:"last_sent_at,omitempty"`
PendingCount int `json:"pending_count"`
}
ReminderStats provides statistics about reminders for a document
type Signature ¶
type Signature struct {
ID int64 `json:"id" db:"id"`
DocID string `json:"doc_id" db:"doc_id"`
UserSub string `json:"user_sub" db:"user_sub"`
UserEmail string `json:"user_email" db:"user_email"`
UserName string `json:"user_name,omitempty" db:"user_name"`
SignedAtUTC time.Time `json:"signed_at" db:"signed_at"`
PayloadHash string `json:"payload_hash" db:"payload_hash"`
Signature string `json:"signature" db:"signature"`
Nonce string `json:"nonce" db:"nonce"`
CreatedAt time.Time `json:"created_at" db:"created_at"`
Referer *string `json:"referer,omitempty" db:"referer"`
PrevHash *string `json:"prev_hash,omitempty" db:"prev_hash"`
}
func (*Signature) ComputeRecordHash ¶
ComputeRecordHash Stable record hash supports tamper-evident chaining and integrity checks across migrations.
func (*Signature) GetServiceInfo ¶
func (s *Signature) GetServiceInfo() *services.ServiceInfo