mysql

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scope

type Scope struct {
	Runtime *env.Runtime
}

Scope provides data access to MySQL.

func (Scope) Add

func (s Scope) Add(ctx domain.RequestContext, document doc.Document) (err error)

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

func (s Scope) Delete(ctx domain.RequestContext, documentID string) (rows int64, err error)

Delete removes the specified document. Remove document pages, revisions, attachments, updates the search subsystem.

func (Scope) DeleteBySpace added in v1.54.0

func (s Scope) DeleteBySpace(ctx domain.RequestContext, spaceID string) (rows int64, err error)

DeleteBySpace removes all documents for given space. Remove document pages, revisions, attachments, updates the search subsystem.

func (Scope) DocumentList

func (s Scope) DocumentList(ctx domain.RequestContext) (documents []doc.Document, err error)

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

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

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

func (Scope) GetAll

func (s Scope) GetAll() (ctx domain.RequestContext, documents []doc.Document, err error)

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

func (s Scope) Templates(ctx domain.RequestContext) (documents []doc.Document, err error)

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.

func (Scope) Update

func (s Scope) Update(ctx domain.RequestContext, document doc.Document) (err error)

Update changes the given document record to the new values, updates search information and audits the action.

Jump to

Keyboard shortcuts

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