script

package
v0.0.0-...-92f9948 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2016 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Halt = errors.New("Execution limit exceeded")
View Source
var UnknownScriptType = errors.New("Unknown script type")

Functions

This section is empty.

Types

type Script

type Script struct {
	ID      int
	Type    ScriptType
	Title   string
	Body    string
	Enabled bool
}

type ScriptManager

type ScriptManager struct {
	// contains filtered or unexported fields
}

func (*ScriptManager) ReInit

func (m *ScriptManager) ReInit()

func (*ScriptManager) Repl

func (m *ScriptManager) Repl()

func (*ScriptManager) RunUnsafe

func (m *ScriptManager) RunUnsafe(t ScriptType, code string) (result interface{}, err error)

type ScriptRepository

type ScriptRepository struct {
	// contains filtered or unexported fields
}

func NewScriptRepository

func NewScriptRepository(database *db.DB) ScriptRepository

func (*ScriptRepository) Delete

func (repo *ScriptRepository) Delete(id int)

func (*ScriptRepository) Fetch

func (repo *ScriptRepository) Fetch(id int) *Script

func (*ScriptRepository) FetchAll

func (repo *ScriptRepository) FetchAll() []*Script

func (*ScriptRepository) Save

func (repo *ScriptRepository) Save(script *Script)

type ScriptType

type ScriptType string
const (
	Javascript ScriptType = "Javascript"
)

Jump to

Keyboard shortcuts

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