Documentation
¶
Index ¶
- type Auth
- type DB
- func (db *DB) Authenticate(token string) (interface{}, error)
- func (db *DB) Close() error
- func (db *DB) Create(thing string, data interface{}) (interface{}, error)
- func (db *DB) Delete(what string) (interface{}, error)
- func (db *DB) Info() (interface{}, error)
- func (db *DB) Insert(what string, data interface{}) (interface{}, error)
- func (db *DB) Invalidate() (interface{}, error)
- func (db *DB) Kill(liveQueryID string) (interface{}, error)
- func (db *DB) Let(key string, val interface{}) (interface{}, error)
- func (db *DB) Live(table string, diff bool) (string, error)
- func (db *DB) LiveNotifications(liveQueryID string) (chan model.Notification, error)
- func (db *DB) Merge(what string, data interface{}) (interface{}, error)
- func (db *DB) Patch(what string, data []Patch) (interface{}, error)
- func (db *DB) Query(sql string, vars interface{}) (interface{}, error)
- func (db *DB) Select(what string) (interface{}, error)
- func (db *DB) Signin(authData *Auth) (interface{}, error)
- func (db *DB) Signup(authData *Auth) (interface{}, error)
- func (db *DB) Start() error
- func (db *DB) Update(what string, data interface{}) (interface{}, error)
- func (db *DB) Use(ns, database string) (interface{}, error)
- type Patch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { Namespace string `json:"NS,omitempty"` Database string `json:"DB,omitempty"` Scope string `json:"SC,omitempty"` Username string `json:"user,omitempty"` Password string `json:"pass,omitempty"` }
Auth is a struct that holds surrealdb auth data for login.
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is a client for the SurrealDB database that holds the connection.
func New ¶
func New(url string, connection conn.Connection) (*DB, error)
New creates a new SurrealDB client.
func (*DB) Authenticate ¶
func (*DB) Invalidate ¶
func (*DB) LiveNotifications ¶
func (db *DB) LiveNotifications(liveQueryID string) (chan model.Notification, error)
LiveNotifications returns a channel for live query.
Click to show internal directories.
Click to hide internal directories.