blocks

package
v0.2.4-0...-f8342f3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlocksCmd

type BlocksCmd struct {
	*base.Base
	bdb.DBs
	*DBState
}

func (*BlocksCmd) Cmd

func (c *BlocksCmd) Cmd(route string) (cmd interface{}, err error)

func (*BlocksCmd) Help

func (c *BlocksCmd) Help() string

func (*BlocksCmd) Routes

func (c *BlocksCmd) Routes() []string

type CopyCmd

type CopyCmd struct {
	*base.Base
	Src  bdb.DBID `ask:"<source>" help:"The source, the DB to copy. Must exist."`
	Dest bdb.DBID `ask:"<dest>" help:"The destination, the name of the copy. Must not exist yet."`
}

func (*CopyCmd) Help

func (c *CopyCmd) Help() string

func (*CopyCmd) Run

func (c *CopyCmd) Run(ctx context.Context, args ...string) error

type CreateCmd

type CreateCmd struct {
	*base.Base
	bdb.DBs
	*DBState
	Name bdb.DBID `ask:"<name>" help:"The name to give to the created db. Must not exist yet."`
	Path string   `ask:"[path]" help:"The path used for the DB. It will be a memory DB if left empty."`
}

func (*CreateCmd) Help

func (c *CreateCmd) Help() string

func (*CreateCmd) Run

func (c *CreateCmd) Run(ctx context.Context, args ...string) error

type DBState

type DBState struct {
	CurrentDB bdb.DBID
}

type ListCmd

type ListCmd struct {
	*base.Base
	bdb.DBs
	*DBState
}

func (*ListCmd) Help

func (c *ListCmd) Help() string

func (*ListCmd) Run

func (c *ListCmd) Run(ctx context.Context, args ...string) error

type OnCmd

type OnCmd struct {
	*base.Base
	bdb.DBs
}

func (*OnCmd) Cmd

func (c *OnCmd) Cmd(route string) (cmd interface{}, err error)

func (*OnCmd) Help

func (c *OnCmd) Help() string

func (*OnCmd) Routes

func (c *OnCmd) Routes() (out []string)

type RemoveCmd

type RemoveCmd struct {
	*base.Base
	bdb.DBs
	Name bdb.DBID `ask:"<name>" help:"The name of the DB to remove. Must exist."`
}

func (*RemoveCmd) Help

func (c *RemoveCmd) Help() string

func (*RemoveCmd) Run

func (c *RemoveCmd) Run(ctx context.Context, args ...string) error

type SwitchCmd

type SwitchCmd struct {
	*base.Base
	*DBState
	To bdb.DBID `ask:"<to>" help:"The name of the DB to switch to. Must exist."`
}

func (*SwitchCmd) Help

func (c *SwitchCmd) Help() string

func (*SwitchCmd) Run

func (c *SwitchCmd) Run(ctx context.Context, args ...string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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