Documentation ¶
Index ¶
- func GetContentLinks(body string) (links []link.Link)
- type Handler
- type Store
- func (s Store) Add(ctx domain.RequestContext, l link.Link) (err error)
- func (s Store) DeleteLink(ctx domain.RequestContext, id string) (rows int64, err error)
- func (s Store) DeleteSourceDocumentLinks(ctx domain.RequestContext, documentID string) (rows int64, err error)
- func (s Store) DeleteSourcePageLinks(ctx domain.RequestContext, pageID string) (rows int64, err error)
- func (s Store) GetDocumentOutboundLinks(ctx domain.RequestContext, documentID string) (links []link.Link, err error)
- func (s Store) GetPageLinks(ctx domain.RequestContext, documentID, pageID string) (links []link.Link, err error)
- func (s Store) MarkOrphanAttachmentLink(ctx domain.RequestContext, attachmentID string) (err error)
- func (s Store) MarkOrphanDocumentLink(ctx domain.RequestContext, documentID string) (err error)
- func (s Store) MarkOrphanPageLink(ctx domain.RequestContext, pageID string) (err error)
- func (s Store) SearchCandidates(ctx domain.RequestContext, keywords string) (docs []link.Candidate, pages []link.Candidate, attachments []link.Candidate, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContentLinks ¶
GetContentLinks returns Documize generated <a> links. such links have an identifying attribute e.g. <a data-documize='true'...
Types ¶
type Handler ¶ added in v1.51.0
Handler contains the runtime information such as logging and database.
func (*Handler) GetLinkCandidates ¶ added in v1.51.0
func (h *Handler) GetLinkCandidates(w http.ResponseWriter, r *http.Request)
GetLinkCandidates returns references to documents/sections/attachments.
func (*Handler) SearchLinkCandidates ¶ added in v1.51.0
func (h *Handler) SearchLinkCandidates(w http.ResponseWriter, r *http.Request)
SearchLinkCandidates endpoint takes a list of keywords and returns a list of document references matching those keywords.
type Store ¶ added in v1.71.0
type Store struct { store.Context store.LinkStorer }
Store provides data access to space category information.
func (Store) Add ¶ added in v1.71.0
Add inserts wiki-link into the store. These links exist when content references another document or content.
func (Store) DeleteLink ¶ added in v1.71.0
DeleteLink removes saved link from the store.
func (Store) DeleteSourceDocumentLinks ¶ added in v1.71.0
func (s Store) DeleteSourceDocumentLinks(ctx domain.RequestContext, documentID string) (rows int64, err error)
DeleteSourceDocumentLinks removes saved links for given document.
func (Store) DeleteSourcePageLinks ¶ added in v1.71.0
func (s Store) DeleteSourcePageLinks(ctx domain.RequestContext, pageID string) (rows int64, err error)
DeleteSourcePageLinks removes saved links for given source.
func (Store) GetDocumentOutboundLinks ¶ added in v1.71.0
func (s Store) GetDocumentOutboundLinks(ctx domain.RequestContext, documentID string) (links []link.Link, err error)
GetDocumentOutboundLinks returns outbound links for specified document.
func (Store) GetPageLinks ¶ added in v1.71.0
func (s Store) GetPageLinks(ctx domain.RequestContext, documentID, pageID string) (links []link.Link, err error)
GetPageLinks returns outbound links for specified page in document.
func (Store) MarkOrphanAttachmentLink ¶ added in v1.71.0
func (s Store) MarkOrphanAttachmentLink(ctx domain.RequestContext, attachmentID string) (err error)
MarkOrphanAttachmentLink marks all link records referencing specified attachment.
func (Store) MarkOrphanDocumentLink ¶ added in v1.71.0
func (s Store) MarkOrphanDocumentLink(ctx domain.RequestContext, documentID string) (err error)
MarkOrphanDocumentLink marks all link records referencing specified document.
func (Store) MarkOrphanPageLink ¶ added in v1.71.0
func (s Store) MarkOrphanPageLink(ctx domain.RequestContext, pageID string) (err error)
MarkOrphanPageLink marks all link records referencing specified page.