mysql

package
v1.56.1 Latest Latest
Warning

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

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

Documentation

Overview

Package mysql handles data persistence for spaces.

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, sp space.Space) (err error)

Add adds new folder into the store.

func (Scope) Delete

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

Delete removes space from the store.

func (Scope) Get

func (s Scope) Get(ctx domain.RequestContext, id string) (sp space.Space, err error)

Get returns a space from the store.

func (Scope) GetAll

func (s Scope) GetAll(ctx domain.RequestContext) (sp []space.Space, err error)

GetAll for admin users!

func (Scope) GetViewable added in v1.54.0

func (s Scope) GetViewable(ctx domain.RequestContext) (sp []space.Space, err error)

GetViewable returns spaces that the user can see. Also handles which spaces can be seen by anonymous users.

func (Scope) PublicSpaces

func (s Scope) PublicSpaces(ctx domain.RequestContext, orgID string) (sp []space.Space, err error)

PublicSpaces returns spaces that anyone can see.

func (Scope) Update

func (s Scope) Update(ctx domain.RequestContext, sp space.Space) (err error)

Update saves space changes.

Jump to

Keyboard shortcuts

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