mysql

package
v1.70.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: AGPL-3.0 Imports: 5 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) Get

func (s Scope) Get(area, path string) (value string, err error)

Get fetches a configuration JSON element from the config table.

func (Scope) GetUser

func (s Scope) GetUser(orgID, userID, key, path string) (value string, err error)

GetUser fetches a configuration JSON element from the userconfig table for a given orgid/userid combination. Errors return the empty string. A blank path returns the whole JSON object, as JSON. You can store org level settings by providing an empty user ID.

func (Scope) Set

func (s Scope) Set(area, json string) (err error)

Set writes a configuration JSON element to the config table.

func (Scope) SetUser

func (s Scope) SetUser(orgID, userID, key, json string) (err error)

SetUser writes a configuration JSON element to the userconfig table for the specified user. You can store org level settings by providing an empty user ID.

Jump to

Keyboard shortcuts

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