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
Index ¶
- func IsAdminUser(user *models.User, adminEmails []string) bool
- func RegisterAdminRoutes(cfg *config.Config, templates *template.Template, db *sql.DB, ...) func(r *chi.Mux)
- type DocumentHandlers
- type ExpectedSignersHandlers
- func (h *ExpectedSignersHandlers) HandleAddExpectedSigners(w http.ResponseWriter, r *http.Request)
- func (h *ExpectedSignersHandlers) HandleDocumentDetailsWithExpected(w http.ResponseWriter, r *http.Request)
- func (h *ExpectedSignersHandlers) HandleGetDocumentStatusJSON(w http.ResponseWriter, r *http.Request)
- func (h *ExpectedSignersHandlers) HandleGetReminderHistory(w http.ResponseWriter, r *http.Request)
- func (h *ExpectedSignersHandlers) HandleRemoveExpectedSigner(w http.ResponseWriter, r *http.Request)
- func (h *ExpectedSignersHandlers) HandleSendReminders(w http.ResponseWriter, r *http.Request)
- type Handlers
- type Middleware
- type ParsedContact
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DocumentHandlers ¶ added in v1.1.3
type DocumentHandlers struct {
// contains filtered or unexported fields
}
func NewDocumentHandlers ¶ added in v1.1.3
func NewDocumentHandlers( documentRepo *database.DocumentRepository, userService userService, ) *DocumentHandlers
func (*DocumentHandlers) HandleDeleteDocumentMetadata ¶ added in v1.1.3
func (h *DocumentHandlers) HandleDeleteDocumentMetadata(w http.ResponseWriter, r *http.Request)
HandleDeleteDocumentMetadata deletes document metadata
func (*DocumentHandlers) HandleGetDocumentMetadata ¶ added in v1.1.3
func (h *DocumentHandlers) HandleGetDocumentMetadata(w http.ResponseWriter, r *http.Request)
HandleGetDocumentMetadata retrieves document metadata as JSON
func (*DocumentHandlers) HandleUpdateDocumentMetadata ¶ added in v1.1.3
func (h *DocumentHandlers) HandleUpdateDocumentMetadata(w http.ResponseWriter, r *http.Request)
HandleUpdateDocumentMetadata creates or updates document metadata
type ExpectedSignersHandlers ¶ added in v1.1.3
type ExpectedSignersHandlers struct {
// contains filtered or unexported fields
}
func NewExpectedSignersHandlers ¶ added in v1.1.3
func NewExpectedSignersHandlers( expectedRepo *database.ExpectedSignerRepository, adminRepo *database.AdminRepository, documentRepo *database.DocumentRepository, userService userService, reminderService reminderService, templates *template.Template, baseURL string, ) *ExpectedSignersHandlers
func (*ExpectedSignersHandlers) HandleAddExpectedSigners ¶ added in v1.1.3
func (h *ExpectedSignersHandlers) HandleAddExpectedSigners(w http.ResponseWriter, r *http.Request)
HandleAddExpectedSigners adds expected signers to a document
func (*ExpectedSignersHandlers) HandleDocumentDetailsWithExpected ¶ added in v1.1.3
func (h *ExpectedSignersHandlers) HandleDocumentDetailsWithExpected(w http.ResponseWriter, r *http.Request)
HandleDocumentDetailsWithExpected displays document details with expected signers
func (*ExpectedSignersHandlers) HandleGetDocumentStatusJSON ¶ added in v1.1.3
func (h *ExpectedSignersHandlers) HandleGetDocumentStatusJSON(w http.ResponseWriter, r *http.Request)
HandleGetDocumentStatusJSON returns document status as JSON for AJAX requests
func (*ExpectedSignersHandlers) HandleGetReminderHistory ¶ added in v1.1.3
func (h *ExpectedSignersHandlers) HandleGetReminderHistory(w http.ResponseWriter, r *http.Request)
HandleGetReminderHistory returns reminder history as JSON
func (*ExpectedSignersHandlers) HandleRemoveExpectedSigner ¶ added in v1.1.3
func (h *ExpectedSignersHandlers) HandleRemoveExpectedSigner(w http.ResponseWriter, r *http.Request)
HandleRemoveExpectedSigner removes an expected signer from a document
func (*ExpectedSignersHandlers) HandleSendReminders ¶ added in v1.1.3
func (h *ExpectedSignersHandlers) HandleSendReminders(w http.ResponseWriter, r *http.Request)
HandleSendReminders sends reminder emails to pending signers
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
func NewAdminHandlers ¶
func (*Handlers) HandleChainIntegrityAPI ¶
func (h *Handlers) HandleChainIntegrityAPI(w http.ResponseWriter, r *http.Request)
func (*Handlers) HandleDashboard ¶
func (h *Handlers) HandleDashboard(w http.ResponseWriter, r *http.Request)
func (*Handlers) HandleDocumentDetails ¶
func (h *Handlers) HandleDocumentDetails(w http.ResponseWriter, r *http.Request)
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
func NewAdminMiddleware ¶
func NewAdminMiddleware(userService userService, baseURL string, adminEmails []string, templates *template.Template) *Middleware
func (*Middleware) RequireAdmin ¶
func (m *Middleware) RequireAdmin(next http.HandlerFunc) http.HandlerFunc
type ParsedContact ¶ added in v1.1.3
ParsedContact represents a contact with optional name and email