boltxpl

package module
v0.0.0-...-08645c4 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2017 License: MIT Imports: 13 Imported by: 0

README

BoltXplr

Bolt explorer tries to be a boltdb browser.

Status

Currently there is a funciontal prototype, you can browse buckets, and inspect keys, but still there can be a lot of bugs, and a lot of caveats.

Motivation

I had started using boltdb in some of my projects, and when developing, sometimes, I just want to check my db and browse it, in a easy way.

Installation

go get github.com/jordic/boltxpl/...

and you will end up with a xpl, command in your go bin path.

Contribution

I will be super happy, if someone else finds this project util, and start using it. Also It will be amazing, if anybody wants to contribute to the project.

Feel free to fork, and send a PR.

Documentation

Index

Constants

View Source
const VERSION = "0.2"

Variables

View Source
var TemplateHTML = `` /* 6910-byte string literal not displayed */

Functions

func NewHandler

func NewHandler(db *DB) http.Handler

Types

type DB

type DB struct {
	*bolt.DB
}

func (*DB) Open

func (db *DB) Open(path string, mode os.FileMode) error

func (*DB) Update

func (db *DB) Update(fn func(*Tx) error) error

Update executes a function in the context of a writable transaction.

func (*DB) View

func (db *DB) View(fn func(*Tx) error) error

type DBItem

type DBItem struct {
	Key      string
	IsBucket bool
}

type Handler

type Handler struct {
	DB *DB
}

func (*Handler) GetBucket

func (h *Handler) GetBucket(w http.ResponseWriter, r *http.Request)

func (*Handler) Index

func (h *Handler) Index(w http.ResponseWriter, r *http.Request)

func (*Handler) Root

func (h *Handler) Root(w http.ResponseWriter, req *http.Request)

func (*Handler) ViewKey

func (h *Handler) ViewKey(w http.ResponseWriter, r *http.Request)

type Tx

type Tx struct {
	*bolt.Tx
}

func (*Tx) NestedBucket

func (tx *Tx) NestedBucket(b string) *bolt.Bucket

Directories

Path Synopsis
cmd
xpl

Jump to

Keyboard shortcuts

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