Documentation ¶
Index ¶
- Variables
- func ArgSplit(str string) (result []string)
- func BuntdbCompleter(d prompt.Document) []prompt.Suggest
- func BuntdbExecutor(s string)
- type CommitGrammar
- type DBSizeGrammar
- type DelGrammar
- type DropGrammar
- type DropIndexGrammar
- type GetGrammar
- type Grammar
- type HelpGrammar
- type KeysGrammar
- type RBeginGrammar
- type RWBeginGrammar
- type RollbackGrammar
- type SaveGrammar
- type SearchGrammar
- type SetGrammar
- type ShowGrammar
- type ShrinkGrammar
- type TTLGrammar
- type UseGrammar
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug bool
Functions ¶
func BuntdbCompleter ¶
func BuntdbCompleter(d prompt.Document) []prompt.Suggest
func BuntdbExecutor ¶
func BuntdbExecutor(s string)
Types ¶
type CommitGrammar ¶ added in v0.0.2
type CommitGrammar struct{}
type DBSizeGrammar ¶ added in v0.0.8
type DBSizeGrammar struct { }
type DelGrammar ¶
type DelGrammar struct {
Key string `arg:"" help:"the key to delete"`
}
type DropGrammar ¶ added in v0.0.3
type DropGrammar struct {
Index DropIndexGrammar `cmd:"" help:"drop the index with the given name"`
}
type DropIndexGrammar ¶ added in v0.0.3
type DropIndexGrammar struct {
Name string `arg:"" help:"the index name to drop"`
}
type GetGrammar ¶
type Grammar ¶
type Grammar struct { Get GetGrammar `cmd:"" help:"get a value from key, return the value if key exists, or <nil> if non-exists."` Set SetGrammar `cmd:"" help:"set a key-value [ttl], return the old value, or <nil> if old value doesn't exist."` Del DelGrammar `cmd:"" help:"delete a key, return 1 if success, or 0 if key doesn't exist."` Show ShowGrammar `cmd:"" help:"show index or db."` Keys KeysGrammar `cmd:"" help:"iterate over the key match the pattern, support '?' and '*'."` Use UseGrammar `cmd:"" help:"switch to other db."` TTL TTLGrammar `cmd:"" help:"get key ttl (seconds), 0 if no ttl, <nil> if key doesn't exist'"` RWBegin RWBeginGrammar `cmd:"" name:"rwbegin" help:"begin a read/write transaction"` RBegin RBeginGrammar `cmd:"" name:"rbegin" help:"begin a readonly transaction"` Commit CommitGrammar `cmd:"" help:"commit a transaction"` Rollback RollbackGrammar `cmd:"" help:"rollback a transaction"` Shrink ShrinkGrammar `cmd:"" help:"run database shrink command"` Save SaveGrammar `cmd:"" help:"save the db to file"` Drop DropGrammar `cmd:"" help:"drop command"` Search SearchGrammar `cmd:"" help:"Search for a string contained in any values"` Help HelpGrammar `cmd:"" help:"show available command"` DBSize DBSizeGrammar `cmd:"" name:"dbsize" help:"show db size"` Exit bool `kong:"-"` }
func NewGrammar ¶
func NewGrammar() *Grammar
func (*Grammar) ExitWrapper ¶
type HelpGrammar ¶ added in v0.0.7
type HelpGrammar struct { }
type KeysGrammar ¶
type KeysGrammar struct {
Pattern string `arg:"" help:"the match pattern "`
}
type RBeginGrammar ¶ added in v0.0.2
type RBeginGrammar struct{}
type RWBeginGrammar ¶ added in v0.0.2
type RWBeginGrammar struct{}
type RollbackGrammar ¶ added in v0.0.2
type RollbackGrammar struct{}
type SaveGrammar ¶ added in v0.0.3
type SearchGrammar ¶ added in v0.0.7
type SetGrammar ¶
type ShowGrammar ¶
type ShowGrammar struct {
Cmd string `arg:"" enum:"db,index"`
}
type ShrinkGrammar ¶ added in v0.0.3
type ShrinkGrammar struct{}
type TTLGrammar ¶
type TTLGrammar struct {
Key string `arg:"" help:"the key to show ttl"`
}
Click to show internal directories.
Click to hide internal directories.