tui

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 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 App

type App struct {
	Logger *slog.Logger
	Ctx    context.Context
	// contains filtered or unexported fields
}

func NewApp

func NewApp() *App

NewApp creates files, folders if not exist and creates database connections.

func (*App) Close

func (a *App) Close() error

Close closes the application by closing the logger file and database.

func (*App) Delete

func (a *App) Delete(ctx context.Context, id int64) bool

Delete deletes the link by using the given id. It returns result as bool.

func (*App) List

func (a *App) List(ctx context.Context) []database.Record

List returns list of database.Record.

func (*App) Save

func (a *App) Save(ctx context.Context, link string, name string, categoryName string)

Save saves the link, name, and category.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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