commands

package
v0.0.0-...-f290ed7 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ErrCouldNotCloseDatabase = 1006
View Source
const ErrDbDoesNotOpen = 1001
View Source
const ErrKeyIsEmpty = 1004
View Source
const ErrKeyNotFound = 1007
View Source
const ErrOpeningDatabase = 1002
View Source
const ErrUnableToDelete = 1005
View Source
const ErrUnableToWrite = 1003

Variables

This section is empty.

Functions

func AppError

func AppError(code int) string

The wrapper for outputting errors in the application Returns the text of the error

func Close

func Close() string

Command close the database. It is safe to close the database file leveldb.

Returns a string containing information about the result of the operation.

func Delete

func Delete(key string) string

Command deleting records. The command to remove records from the database by key.

Returns a string containing information about the result of the operation.

func Get

func Get(key, format string) string

The command get a value. It gets the value for the selected key.

Returns a string containing information about the result of the operation.

func Open

func Open(file string) string

The command to open the database. If the database does not exist, it will create a new database.

Returns a string containing information about the result of the operation.

func ParseSubCommand

func ParseSubCommand(args []string, para *params) bool

func Set

func Set(key, value string) string

The command set a value. It sets the value for the selected key.

Returns a string containing information about the result of the operation.

func Show

func Show(args []string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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