Documentation ¶
Index ¶
- type Scope
- func (s Scope) Add(ctx domain.RequestContext, document doc.Document) (err error)
- func (s Scope) ChangeDocumentSpace(ctx domain.RequestContext, document, space string) (err error)
- func (s Scope) Delete(ctx domain.RequestContext, documentID string) (rows int64, err error)
- func (s Scope) DeleteBySpace(ctx domain.RequestContext, spaceID string) (rows int64, err error)
- func (s Scope) DocumentList(ctx domain.RequestContext) (documents []doc.Document, err error)
- func (s Scope) DocumentMeta(ctx domain.RequestContext, id string) (meta doc.DocumentMeta, err error)
- func (s Scope) Get(ctx domain.RequestContext, id string) (document doc.Document, err error)
- func (s Scope) GetAll() (ctx domain.RequestContext, documents []doc.Document, err error)
- func (s Scope) GetBySpace(ctx domain.RequestContext, spaceID string) (documents []doc.Document, err error)
- func (s Scope) MoveDocumentSpace(ctx domain.RequestContext, id, move string) (err error)
- func (s Scope) PublicDocuments(ctx domain.RequestContext, orgID string) (documents []doc.SitemapDocument, err error)
- func (s Scope) Templates(ctx domain.RequestContext) (documents []doc.Document, err error)
- func (s Scope) TemplatesBySpace(ctx domain.RequestContext, spaceID string) (documents []doc.Document, err error)
- func (s Scope) Update(ctx domain.RequestContext, document doc.Document) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scope ¶
Scope provides data access to MySQL.
func (Scope) Add ¶
Add inserts the given document record into the document table and audits that it has been done.
func (Scope) ChangeDocumentSpace ¶
func (s Scope) ChangeDocumentSpace(ctx domain.RequestContext, document, space string) (err error)
ChangeDocumentSpace assigns the specified space to the document.
func (Scope) Delete ¶
Delete removes the specified document. Remove document pages, revisions, attachments, updates the search subsystem.
func (Scope) DeleteBySpace ¶ added in v1.54.0
DeleteBySpace removes all documents for given space. Remove document pages, revisions, attachments, updates the search subsystem.
func (Scope) DocumentList ¶
DocumentList returns a slice containing the documents available as templates to the client's organisation, in title order.
func (Scope) DocumentMeta ¶
func (s Scope) DocumentMeta(ctx domain.RequestContext, id string) (meta doc.DocumentMeta, err error)
DocumentMeta returns the metadata for a specified document.
func (Scope) Get ¶
Get fetches the document record with the given id fromt the document table and audits that it has been got.
func (Scope) GetAll ¶
GetAll returns a slice containg all of the the documents for the client's organisation.
func (Scope) GetBySpace ¶
func (s Scope) GetBySpace(ctx domain.RequestContext, spaceID string) (documents []doc.Document, err error)
GetBySpace returns a slice containing the documents for a given space. No attempt is made to hide documents that are protected by category permissions -- caller must filter as required.
func (Scope) MoveDocumentSpace ¶
func (s Scope) MoveDocumentSpace(ctx domain.RequestContext, id, move string) (err error)
MoveDocumentSpace changes the space for client's organization's documents which have space "id", to "move".
func (Scope) PublicDocuments ¶
func (s Scope) PublicDocuments(ctx domain.RequestContext, orgID string) (documents []doc.SitemapDocument, err error)
PublicDocuments returns a slice of SitemapDocument records, holding documents in folders of type 1 (entity.TemplateTypePublic).
func (Scope) Templates ¶
Templates returns a slice containing the documents available as templates to the client's organisation, in title order.
func (Scope) TemplatesBySpace ¶ added in v1.52.1
func (s Scope) TemplatesBySpace(ctx domain.RequestContext, spaceID string) (documents []doc.Document, err error)
TemplatesBySpace returns a slice containing the documents available as templates for given space.