ferret

package
v0.0.0-...-a4e3fbc Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TypeError

func TypeError(name string, expected, actual js.Type) error

Types

type Ferret

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

func New

func New(version Version) *Ferret

func (*Ferret) Compile

func (f *Ferret) Compile(query js.Value) *Result

func (*Ferret) Destroy

func (f *Ferret) Destroy(id js.Value) *Result

func (*Ferret) Execute

func (f *Ferret) Execute(query, params js.Value) *Result

func (*Ferret) Register

func (f *Ferret) Register(name, fn js.Value) *Result

func (*Ferret) Run

func (f *Ferret) Run(id, params js.Value) *Result

func (*Ferret) Version

func (f *Ferret) Version() *Result

type Result

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

func Error

func Error(err error) *Result

func Ok

func Ok(data []byte) *Result

func OkEmpty

func OkEmpty() *Result

func OkInterface

func OkInterface(data interface{}) *Result

func (*Result) Data

func (r *Result) Data() js.Value

func (*Result) Error

func (r *Result) Error() js.Value

func (*Result) JSValue

func (r *Result) JSValue() js.Value

func (*Result) Ok

func (r *Result) Ok() bool

type Version

type Version struct {
	Self   string `json:"self"`
	Ferret string `json:"ferret"`
}

func (Version) JSValue

func (v Version) JSValue() js.Value

Jump to

Keyboard shortcuts

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