storage

package
v0.0.0-...-915e4b8 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSavedQA = errors.New("This question is not exists in databese")

Functions

This section is empty.

Types

type Storage

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

func New

func New(path string) (*Storage, error)

New creates new SQLite storage.

func (*Storage) Close

func (s *Storage) Close()

func (*Storage) CreateTableByNum

func (s *Storage) CreateTableByNum(testNum int) error

CreateSchemaByNum creates table with specific number.

func (*Storage) ParseToFile

func (s *Storage) ParseToFile(testNum int) error

func (*Storage) PickRightanswer

func (s *Storage) PickRightanswer(testNum int, question string) (answer string, err error)

PickRightanswer by question from storage.

func (*Storage) Put

func (s *Storage) Put(testNum int, question, rightanswer string) error

Put question and rightanswer to table test_<testNum>

Jump to

Keyboard shortcuts

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