mysql

package
v1.51.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2017 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 delete the document pages in the database, updates the search subsystem, deletes the associated revisions and attachments, audits the deletion, then finally deletes the document itself.

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, with the most recient first.

func (Scope) GetBySpace

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

GetBySpace returns a slice containing the documents for a given space, most recient first.

func (Scope) GetByTag

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

GetByTag returns a slice containing the documents with the specified tag, in title order.

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) 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