Back to godoc.org

Package meta

v3.2.0+incompatible
Latest Go to latest
Published: Aug 29, 2019 | License: AGPL-3.0 | Module: github.com/documize/community

Index

Package Files

type Handler

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

Handler contains the runtime information such as logging and database.

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

DefaultLogo write the default Documize logo to the HTTP response.

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

Logo returns site logo based upon request domain (e.g. acme.documize.com). The default Documize logo is returned if organization has not uploaded their own logo.

func (*Handler) Meta

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

Meta provides org meta data based upon request domain (e.g. acme.documize.com).

func (*Handler) RobotsTxt

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

RobotsTxt returns robots.txt depending on site configuration. Did we allow anonymouse access?

func (*Handler) Sitemap

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

Sitemap returns URLs that can be indexed. We only include public folders and documents (e.g. can be seen by everyone).

func (*Handler) Themes

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

Themes returns list of installed UI themes.

type Store

type Store struct {
	store.Context
	store.MetaStorer
}

Store provides data access to space category information.

func (Store) Attachments

func (s Store) Attachments(ctx domain.RequestContext, docID string) (a []attachment.Attachment, err error)

Attachments returns a slice containing the attachment records (excluding their data) for document docID, ordered by filename.

func (Store) Document

func (s Store) Document(ctx domain.RequestContext, id string) (document doc.Document, err error)

Document fetches the document record with the given id fromt the document table and audits that it has been got.

func (Store) Documents

func (s Store) Documents(ctx domain.RequestContext) (documents []string, err error)

Documents returns every document ID value stored. For global admins, the query runs at the instance level across all tenants. For tenant admins, the query is restricted to the tenant.

func (Store) Pages

func (s Store) Pages(ctx domain.RequestContext, documentID string) (p []page.Page, err error)

Pages returns a slice containing all published page records for a given documentID, in presentation sequence.

func (Store) SearchIndexCount

func (s Store) SearchIndexCount(ctx domain.RequestContext) (c int, err error)

SearchIndexCount returns the numnber of index entries.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier