link

package
v2.4.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2019 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContentLinks(body string) (links []link.Link)

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

type Handler struct {
	Runtime *env.Runtime
	Store   *store.Store
}

Handler contains the runtime information such as logging and database.

func (h *Handler) GetLink(w http.ResponseWriter, r *http.Request)

GetLink returns link object for given ID.

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

func (s Store) Add(ctx domain.RequestContext, l link.Link) (err error)

Add inserts wiki-link into the store. These links exist when content references another document or content.

func (s Store) DeleteLink(ctx domain.RequestContext, id string) (rows int64, err error)

DeleteLink removes saved link from the store.

func (s Store) DeleteSourceDocumentLinks(ctx domain.RequestContext, documentID string) (rows int64, err error)

DeleteSourceDocumentLinks removes saved links for given document.

func (s Store) DeleteSourcePageLinks(ctx domain.RequestContext, pageID string) (rows int64, err error)

DeleteSourcePageLinks removes saved links for given source.

func (s Store) GetDocumentOutboundLinks(ctx domain.RequestContext, documentID string) (links []link.Link, err error)

GetDocumentOutboundLinks returns outbound links for specified document.

func (s Store) GetLink(ctx domain.RequestContext, linkID string) (l link.Link, err error)

GetLink returns specified link.

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 (s Store) MarkOrphanAttachmentLink(ctx domain.RequestContext, attachmentID string) (err error)

MarkOrphanAttachmentLink marks all link records referencing specified attachment.

func (s Store) MarkOrphanDocumentLink(ctx domain.RequestContext, documentID string) (err error)

MarkOrphanDocumentLink marks all link records referencing specified document.

func (s Store) MarkOrphanPageLink(ctx domain.RequestContext, pageID string) (err error)

MarkOrphanPageLink marks all link records referencing specified page.

func (Store) SearchCandidates added in v1.71.0

func (s Store) SearchCandidates(ctx domain.RequestContext, keywords string) (docs []link.Candidate,
	pages []link.Candidate, attachments []link.Candidate, err error)

SearchCandidates returns matching documents, sections and attachments using keywords.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL