surreal

package module
v0.0.0-...-50cc1e1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	NS   string
	DB   string
	User string
	Pass string
}

type DB

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

func New

func New(url string, opts *Config) (*DB, error)

func (*DB) Authenticate

func (db *DB) Authenticate(to string) (interface{}, error)

func (*DB) Change

func (db *DB) Change(tb string, id interface{}, data map[string]interface{}) (interface{}, error)

func (*DB) Close

func (db *DB) Close()

func (*DB) Create

func (db *DB) Create(tb string, id interface{}, data map[string]interface{}) (interface{}, error)

func (*DB) Delete

func (db *DB) Delete(tb string, id interface{}) (interface{}, error)

func (*DB) Info

func (db *DB) Info() (interface{}, error)

func (*DB) Invalidate

func (db *DB) Invalidate() (interface{}, error)

func (*DB) Kill

func (db *DB) Kill(id string) (interface{}, error)

func (*DB) Let

func (db *DB) Let(key string, val interface{}) (interface{}, error)

func (*DB) Live

func (db *DB) Live(tb string) (interface{}, error)

func (*DB) Modify

func (db *DB) Modify(tb string, id interface{}, data map[string]interface{}) (interface{}, error)

func (*DB) Query

func (db *DB) Query(sql string, vars map[string]interface{}) (interface{}, error)

func (*DB) Select

func (db *DB) Select(tb string, id interface{}) (interface{}, error)

func (*DB) Update

func (db *DB) Update(tb string, id interface{}, data map[string]interface{}) (interface{}, error)

type Socket

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

func NewSocket

func NewSocket(url string, opts *Config) (*Socket, error)

func (*Socket) Once

func (c *Socket) Once(id, method string) (<-chan interface{}, <-chan error)

func (*Socket) Send

func (c *Socket) Send(id string, method string, params []interface{})

func (*Socket) When

func (c *Socket) When(id, method string) (<-chan interface{}, <-chan error)

Jump to

Keyboard shortcuts

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