go-indexeddb

module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0

README

go-indexeddb

Go Reference CI

go-indexeddb is a low-level Go driver that provides type-safe bindings to IndexedDB in Wasm programs. The primary focus is to align with the IndexedDB spec, followed by ease of use.

IndexedDB is a transactional database system, like an SQL-based RDBMS. However, unlike SQL-based RDBMSes, which use fixed-column tables, IndexedDB is an object-oriented database. IndexedDB lets you store and retrieve objects that are indexed with a key; any objects supported by the structured clone algorithm can be stored.

See the reference for full documentation and examples.

This package is available at github.com/aperturerobotics/go-indexeddb.

Package index

Summary of the packages provided by this module:

  • idb: Package idb provides a low-level Go driver with type-safe bindings to IndexedDB in Wasm programs.

Usage

  1. Get the package:

    go get github.com/aperturerobotics/go-indexeddb@latest
    
  2. Import it in your code:

    import "github.com/aperturerobotics/go-indexeddb/idb"
    
  3. To get started, get the global indexedDB instance:

    db, err := idb.Global().Open(ctx, "MyDatabase", nil)
    

Check out the reference for more details and examples!

Upstream

This package is a fork of github.com/hack-pad/go-indexeddb.

License

MIT

Directories

Path Synopsis
idb
internal/assert
Package assert contains small assertion test functions to assist in writing clean tests.
Package assert contains small assertion test functions to assist in writing clean tests.
internal/jscache
Package jscache caches expensive JavaScript results, like string encoding
Package jscache caches expensive JavaScript results, like string encoding

Jump to

Keyboard shortcuts

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