questions

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTables

func CreateTables(db *sql.DB) error

func InsertQuestion

func InsertQuestion(db *sql.DB, q *Question) (int64, error)

Types

type Question

type Question struct {
	ChapterName             string   `json:"chapterName"`
	RelevancyScore          int      `json:"relevancyScore"`
	RelevantSections        []string `json:"relevantSections"`
	RelevantKeywords        []string `json:"relevantKeywords"`
	RelevantKeyPoints       []string `json:"relevantKeyPoints"`
	RelevantReferences      []string `json:"relevantReferences"`
	ExplanationForRelevance string   `json:"explanationForRelevance"`
	RecommendationsToReader string   `json:"recommendationsToReader"`
	ChapterID               int64    `json:"chapterId"`
	CreatedAt               string   `json:"createdAt"`
	Comment                 string   `json:"comment"`
	Filename                string   `json:"filename"`
}

func GetAllQuestions

func GetAllQuestions(db *sql.DB) ([]*Question, error)

func GetQuestionByID

func GetQuestionByID(db *sql.DB, id int64) (*Question, error)

func ReadQuestionFromFile

func ReadQuestionFromFile(filename string) (*Question, error)

Jump to

Keyboard shortcuts

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