mysql

package
v1.69.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 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, d 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) 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) 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 hence caller must filter as required.

All versions of a document are returned, hence caller must decide what to do with them.

func (Scope) GetVersions added in v1.59.0

func (s Scope) GetVersions(ctx domain.RequestContext, groupID string) (v []doc.Version, err error)

GetVersions returns a slice containing the documents for a given space.

No attempt is made to hide documents that are protected by category permissions hence caller must filter as required.

All versions of a document are returned, hence caller must decide what to do with them.

func (Scope) MoveActivity added in v1.61.0

func (s Scope) MoveActivity(ctx domain.RequestContext, documentID, oldSpaceID, newSpaceID string) (err error)

MoveActivity changes the space for all document activity records.

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 linking to documents in public spaces. These documents can then be seen by search crawlers.

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.

func (Scope) UpdateGroup added in v1.59.0

func (s Scope) UpdateGroup(ctx domain.RequestContext, d doc.Document) (err error)

UpdateGroup applies same values to all documents with the same group ID.

func (Scope) Vote added in v1.62.0

func (s Scope) Vote(ctx domain.RequestContext, refID, orgID, documentID, userID string, vote int) (err error)

Vote records document content vote. Any existing vote by the user is replaced.

Jump to

Keyboard shortcuts

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