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
Index ¶
- type AddExpectedSignerRequest
- type CSVPreviewResponse
- type CreateWebhookRequest
- type DocumentResponse
- type DocumentStatsResponse
- type DocumentStatusResponse
- type ExpectedSignerResponse
- type Handler
- func (h *Handler) HandleAddExpectedSigner(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleDeleteDocument(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleGetDocument(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleGetDocumentStatus(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleGetDocumentWithSigners(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleGetReminderHistory(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleImportSigners(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleListDocuments(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandlePreviewCSV(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleRemoveExpectedSigner(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleSendReminders(w http.ResponseWriter, r *http.Request)
- func (h *Handler) HandleUpdateDocumentMetadata(w http.ResponseWriter, r *http.Request)
- type ImportSignerEntry
- type ImportSignersRequest
- type ImportSignersResponse
- type OIDCResponse
- type ReminderLogResponse
- type ReminderStatsResponse
- type SMTPResponse
- type SendRemindersRequest
- type SettingsHandler
- func (h *SettingsHandler) HandleGetSettings(w http.ResponseWriter, r *http.Request)
- func (h *SettingsHandler) HandleResetFromENV(w http.ResponseWriter, r *http.Request)
- func (h *SettingsHandler) HandleTestConnection(w http.ResponseWriter, r *http.Request)
- func (h *SettingsHandler) HandleUpdateSection(w http.ResponseWriter, r *http.Request)
- type SettingsResponse
- type StorageResponse
- type UnexpectedSignatureResponse
- type UpdateDocumentMetadataRequest
- type WebhooksHandler
- func (h *WebhooksHandler) HandleCreateWebhook(w http.ResponseWriter, r *http.Request)
- func (h *WebhooksHandler) HandleDeleteWebhook(w http.ResponseWriter, r *http.Request)
- func (h *WebhooksHandler) HandleGetWebhook(w http.ResponseWriter, r *http.Request)
- func (h *WebhooksHandler) HandleListDeliveries(w http.ResponseWriter, r *http.Request)
- func (h *WebhooksHandler) HandleListWebhooks(w http.ResponseWriter, r *http.Request)
- func (h *WebhooksHandler) HandleToggleWebhook(w http.ResponseWriter, r *http.Request)
- func (h *WebhooksHandler) HandleUpdateWebhook(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddExpectedSignerRequest ¶
type AddExpectedSignerRequest struct {
Email string `json:"email"`
Name string `json:"name"`
Notes *string `json:"notes,omitempty"`
}
AddExpectedSignerRequest represents the request body for adding an expected signer
type CSVPreviewResponse ¶ added in v1.2.4
type CSVPreviewResponse struct {
Signers []services.CSVSignerEntry `json:"signers"`
Errors []services.CSVParseError `json:"errors"`
TotalLines int `json:"totalLines"`
ValidCount int `json:"validCount"`
InvalidCount int `json:"invalidCount"`
HasHeader bool `json:"hasHeader"`
ExistingEmails []string `json:"existingEmails"`
MaxSigners int `json:"maxSigners"`
}
CSVPreviewResponse represents the response for CSV preview
type CreateWebhookRequest ¶
type DocumentResponse ¶
type DocumentResponse struct {
DocID string `json:"docId"`
Title string `json:"title"`
URL string `json:"url"`
Checksum string `json:"checksum,omitempty"`
ChecksumAlgorithm string `json:"checksumAlgorithm,omitempty"`
Description string `json:"description"`
ReadMode string `json:"readMode"`
AllowDownload bool `json:"allowDownload"`
RequireFullRead bool `json:"requireFullRead"`
VerifyChecksum bool `json:"verifyChecksum"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
CreatedBy string `json:"createdBy"`
StorageKey string `json:"storageKey,omitempty"`
StorageProvider string `json:"storageProvider,omitempty"`
FileSize int64 `json:"fileSize,omitempty"`
MimeType string `json:"mimeType,omitempty"`
}
DocumentResponse represents a document in API responses
type DocumentStatsResponse ¶
type DocumentStatsResponse struct {
DocID string `json:"docId"`
ExpectedCount int `json:"expectedCount"`
SignedCount int `json:"signedCount"`
PendingCount int `json:"pendingCount"`
CompletionRate float64 `json:"completionRate"`
}
DocumentStatsResponse represents document statistics
type DocumentStatusResponse ¶
type DocumentStatusResponse struct {
DocID string `json:"docId"`
Document *DocumentResponse `json:"document,omitempty"`
ExpectedSigners []*ExpectedSignerResponse `json:"expectedSigners"`
UnexpectedSignatures []*UnexpectedSignatureResponse `json:"unexpectedSignatures"`
Stats *DocumentStatsResponse `json:"stats"`
ReminderStats *ReminderStatsResponse `json:"reminderStats,omitempty"`
}
DocumentStatusResponse represents complete document status including everything
type ExpectedSignerResponse ¶
type ExpectedSignerResponse struct {
ID int64 `json:"id"`
DocID string `json:"docId"`
Email string `json:"email"`
Name string `json:"name"`
AddedAt string `json:"addedAt"`
AddedBy string `json:"addedBy"`
Notes *string `json:"notes,omitempty"`
HasSigned bool `json:"hasSigned"`
SignedAt *string `json:"signedAt,omitempty"`
UserName *string `json:"userName,omitempty"`
LastReminderSent *string `json:"lastReminderSent,omitempty"`
ReminderCount int `json:"reminderCount"`
DaysSinceAdded int `json:"daysSinceAdded"`
DaysSinceLastReminder *int `json:"daysSinceLastReminder,omitempty"`
}
ExpectedSignerResponse represents an expected signer in API responses
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles admin API requests
func NewHandler ¶
func NewHandler(adminService adminService, reminderService reminderService, signatureService signatureService, baseURL string, importMaxSigners int) *Handler
NewHandler creates a new admin handler
func (*Handler) HandleAddExpectedSigner ¶
func (h *Handler) HandleAddExpectedSigner(w http.ResponseWriter, r *http.Request)
HandleAddExpectedSigner handles POST /api/v1/admin/documents/{docId}/signers
func (*Handler) HandleDeleteDocument ¶
func (h *Handler) HandleDeleteDocument(w http.ResponseWriter, r *http.Request)
HandleDeleteDocument handles DELETE /api/v1/admin/documents/{docId}
func (*Handler) HandleGetDocument ¶
func (h *Handler) HandleGetDocument(w http.ResponseWriter, r *http.Request)
HandleGetDocument handles GET /api/v1/admin/documents/{docId}
func (*Handler) HandleGetDocumentStatus ¶
func (h *Handler) HandleGetDocumentStatus(w http.ResponseWriter, r *http.Request)
HandleGetDocumentStatus handles GET /api/v1/admin/documents/{docId}/status
func (*Handler) HandleGetDocumentWithSigners ¶
func (h *Handler) HandleGetDocumentWithSigners(w http.ResponseWriter, r *http.Request)
HandleGetDocumentWithSigners handles GET /api/v1/admin/documents/{docId}/signers
func (*Handler) HandleGetReminderHistory ¶
func (h *Handler) HandleGetReminderHistory(w http.ResponseWriter, r *http.Request)
HandleGetReminderHistory handles GET /api/v1/admin/documents/{docId}/reminders
func (*Handler) HandleImportSigners ¶ added in v1.2.4
func (h *Handler) HandleImportSigners(w http.ResponseWriter, r *http.Request)
HandleImportSigners handles POST /api/v1/admin/documents/{docId}/signers/import
func (*Handler) HandleListDocuments ¶
func (h *Handler) HandleListDocuments(w http.ResponseWriter, r *http.Request)
HandleListDocuments handles GET /api/v1/admin/documents
func (*Handler) HandlePreviewCSV ¶ added in v1.2.4
func (h *Handler) HandlePreviewCSV(w http.ResponseWriter, r *http.Request)
HandlePreviewCSV handles POST /api/v1/admin/documents/{docId}/signers/preview-csv
func (*Handler) HandleRemoveExpectedSigner ¶
func (h *Handler) HandleRemoveExpectedSigner(w http.ResponseWriter, r *http.Request)
HandleRemoveExpectedSigner handles DELETE /api/v1/admin/documents/{docId}/signers/{email}
func (*Handler) HandleSendReminders ¶
func (h *Handler) HandleSendReminders(w http.ResponseWriter, r *http.Request)
HandleSendReminders handles POST /api/v1/admin/documents/{docId}/reminders
func (*Handler) HandleUpdateDocumentMetadata ¶
func (h *Handler) HandleUpdateDocumentMetadata(w http.ResponseWriter, r *http.Request)
HandleUpdateDocumentMetadata handles PUT /api/v1/admin/documents/{docId}/metadata
type ImportSignerEntry ¶ added in v1.2.4
ImportSignerEntry represents a single signer to import
type ImportSignersRequest ¶ added in v1.2.4
type ImportSignersRequest struct {
Signers []ImportSignerEntry `json:"signers"`
}
ImportSignersRequest represents the request body for importing signers
type ImportSignersResponse ¶ added in v1.2.4
type ImportSignersResponse struct {
Message string `json:"message"`
Imported int `json:"imported"`
Skipped int `json:"skipped"`
Total int `json:"total"`
}
ImportSignersResponse represents the response for signer import
type OIDCResponse ¶ added in v1.3.0
type OIDCResponse struct {
Enabled bool `json:"enabled"`
Provider string `json:"provider"`
ClientID string `json:"client_id"`
ClientSecret string `json:"client_secret"`
AuthURL string `json:"auth_url,omitempty"`
TokenURL string `json:"token_url,omitempty"`
UserInfoURL string `json:"userinfo_url,omitempty"`
LogoutURL string `json:"logout_url,omitempty"`
Scopes []string `json:"scopes,omitempty"`
AllowedDomain string `json:"allowed_domain,omitempty"`
AutoLogin bool `json:"auto_login"`
}
OIDCResponse is OIDCConfig with masked secrets
type ReminderLogResponse ¶
type ReminderLogResponse struct {
ID int64 `json:"id"`
DocID string `json:"docId"`
RecipientEmail string `json:"recipientEmail"`
SentAt string `json:"sentAt"`
SentBy string `json:"sentBy"`
TemplateUsed string `json:"templateUsed"`
Status string `json:"status"`
ErrorMessage *string `json:"errorMessage,omitempty"`
}
ReminderLogResponse represents a reminder log entry in API responses
type ReminderStatsResponse ¶
type ReminderStatsResponse struct {
TotalSent int `json:"totalSent"`
PendingCount int `json:"pendingCount"`
LastSentAt *string `json:"lastSentAt,omitempty"`
}
ReminderStatsResponse represents reminder statistics
type SMTPResponse ¶ added in v1.3.0
type SMTPResponse struct {
Host string `json:"host"`
Port int `json:"port"`
Username string `json:"username"`
Password string `json:"password"`
TLS bool `json:"tls"`
StartTLS bool `json:"starttls"`
InsecureSkipVerify bool `json:"insecure_skip_verify"`
Timeout string `json:"timeout"`
From string `json:"from"`
FromName string `json:"from_name"`
SubjectPrefix string `json:"subject_prefix,omitempty"`
}
SMTPResponse is SMTPConfig with masked secrets
type SendRemindersRequest ¶
type SendRemindersRequest struct {
Emails []string `json:"emails,omitempty"` // If empty, send to all pending signers
}
SendRemindersRequest represents the request body for sending reminders
type SettingsHandler ¶ added in v1.3.0
type SettingsHandler struct {
// contains filtered or unexported fields
}
SettingsHandler handles admin settings endpoints
func NewSettingsHandler ¶ added in v1.3.0
func NewSettingsHandler(configService configService) *SettingsHandler
NewSettingsHandler creates a new settings handler
func (*SettingsHandler) HandleGetSettings ¶ added in v1.3.0
func (h *SettingsHandler) HandleGetSettings(w http.ResponseWriter, r *http.Request)
HandleGetSettings handles GET /api/v1/admin/settings
func (*SettingsHandler) HandleResetFromENV ¶ added in v1.3.0
func (h *SettingsHandler) HandleResetFromENV(w http.ResponseWriter, r *http.Request)
HandleResetFromENV handles POST /api/v1/admin/settings/reset
func (*SettingsHandler) HandleTestConnection ¶ added in v1.3.0
func (h *SettingsHandler) HandleTestConnection(w http.ResponseWriter, r *http.Request)
HandleTestConnection handles POST /api/v1/admin/settings/test/{type}
func (*SettingsHandler) HandleUpdateSection ¶ added in v1.3.0
func (h *SettingsHandler) HandleUpdateSection(w http.ResponseWriter, r *http.Request)
HandleUpdateSection handles PUT /api/v1/admin/settings/{section}
type SettingsResponse ¶ added in v1.3.0
type SettingsResponse struct {
General models.GeneralConfig `json:"general"`
OIDC OIDCResponse `json:"oidc"`
MagicLink models.MagicLinkConfig `json:"magiclink"`
SMTP SMTPResponse `json:"smtp"`
Storage StorageResponse `json:"storage"`
UpdatedAt string `json:"updated_at"`
}
SettingsResponse represents the full settings response
type StorageResponse ¶ added in v1.3.0
type StorageResponse struct {
Type string `json:"type"`
MaxSizeMB int64 `json:"max_size_mb"`
LocalPath string `json:"local_path,omitempty"`
S3Endpoint string `json:"s3_endpoint,omitempty"`
S3Bucket string `json:"s3_bucket,omitempty"`
S3AccessKey string `json:"s3_access_key,omitempty"`
S3SecretKey string `json:"s3_secret_key,omitempty"`
S3Region string `json:"s3_region,omitempty"`
S3UseSSL bool `json:"s3_use_ssl"`
}
StorageResponse is StorageConfig with masked secrets
type UnexpectedSignatureResponse ¶
type UnexpectedSignatureResponse struct {
UserEmail string `json:"userEmail"`
UserName *string `json:"userName,omitempty"`
SignedAtUTC string `json:"signedAtUTC"`
}
UnexpectedSignatureResponse represents an unexpected signature
type UpdateDocumentMetadataRequest ¶
type UpdateDocumentMetadataRequest struct {
Title *string `json:"title,omitempty"`
URL *string `json:"url,omitempty"`
Checksum *string `json:"checksum,omitempty"`
ChecksumAlgorithm *string `json:"checksumAlgorithm,omitempty"`
Description *string `json:"description,omitempty"`
ReadMode *string `json:"readMode,omitempty"`
AllowDownload *bool `json:"allowDownload,omitempty"`
RequireFullRead *bool `json:"requireFullRead,omitempty"`
VerifyChecksum *bool `json:"verifyChecksum,omitempty"`
}
UpdateDocumentMetadataRequest represents the request body for updating document metadata
type WebhooksHandler ¶
type WebhooksHandler struct {
// contains filtered or unexported fields
}
WebhooksHandler groups operations on webhooks
func NewWebhooksHandler ¶
func NewWebhooksHandler(service webhookService) *WebhooksHandler
func (*WebhooksHandler) HandleCreateWebhook ¶
func (h *WebhooksHandler) HandleCreateWebhook(w http.ResponseWriter, r *http.Request)
func (*WebhooksHandler) HandleDeleteWebhook ¶
func (h *WebhooksHandler) HandleDeleteWebhook(w http.ResponseWriter, r *http.Request)
func (*WebhooksHandler) HandleGetWebhook ¶
func (h *WebhooksHandler) HandleGetWebhook(w http.ResponseWriter, r *http.Request)
func (*WebhooksHandler) HandleListDeliveries ¶
func (h *WebhooksHandler) HandleListDeliveries(w http.ResponseWriter, r *http.Request)
func (*WebhooksHandler) HandleListWebhooks ¶
func (h *WebhooksHandler) HandleListWebhooks(w http.ResponseWriter, r *http.Request)
func (*WebhooksHandler) HandleToggleWebhook ¶
func (h *WebhooksHandler) HandleToggleWebhook(w http.ResponseWriter, r *http.Request)
func (*WebhooksHandler) HandleUpdateWebhook ¶
func (h *WebhooksHandler) HandleUpdateWebhook(w http.ResponseWriter, r *http.Request)