data

package
v0.0.0-...-9c7f65d Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTableExist

func CheckTableExist() (bool, error)

CheckTableExist check if the table "helpcommnds" exist in the master database

func CreateTable

func CreateTable()

CreateTable creates helpcommands table in the database

func DeleteCommand

func DeleteCommand(index int)

DeleteCommand deletes the row from the helpcommands table based on the row id provided

func DisplaySelectedCommand

func DisplaySelectedCommand(toolSearch string) *[]ToolsData

DisplaySelectedCommand retuns slice to ToolsData based on search string

func ExtractToolsList

func ExtractToolsList() []string

ExtractToolsList returns a slice containg the list of tools

func InsertCommand

func InsertCommand(tool string, gist string, toolCommand string)

InsertNote inserts tool command with gist in the helpcommands table

func OpenDatabaseConn

func OpenDatabaseConn(dbfile string) (*sql.DB, error)

OpenDatabaseConn opens database connection and ping's the database and returns db connection

func Unique

func Unique(intSlice []string) []string

unique take a slice of sting and returns a unique slice of strings (remove duplicates)

Types

type PromptContent

type PromptContent struct {
	ErrorMsg string
	Lable    string
}

type ToolsData

type ToolsData struct {
	IdCommand   int
	Tool        string
	Gist        string
	ToolCommand string
}

func DisplayAllNotes

func DisplayAllNotes() []ToolsData

DisplayAllNotes prints all the rows in the helpcommands table

func SearchForTool

func SearchForTool(toolSearch string) []ToolsData

DisplayCatNotes returns a slice of ToolsData after performing search based on the string provided

func SearchForToolLike

func SearchForToolLike(toolSearch string) []ToolsData

DisplayCatNotes returns a slice of ToolsData after performing search based on the string provided

Jump to

Keyboard shortcuts

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