db

package
v0.0.0-...-65fdc5a Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func New

func New(filename string) *DB

func (DB) Add

func (db DB) Add(input []string) error

Add the input to the csv file, also get the last index and increment it (acts as ID).

func (DB) DeleteDisabled

func (db DB) DeleteDisabled() error

DeleteDisabled removes lines with active = false

func (DB) GetAll

func (db DB) GetAll() ([][]string, error)

GetAll return all the saved data as an array of an array filtered by active

func (DB) UpdateStatus

func (db DB) UpdateStatus(i int, active bool) error

UpdateStatus updates the line based on the index to active or disabled

Jump to

Keyboard shortcuts

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