db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	DB *gorm.DB
}

func New

func New() (*Database, error)

func (*Database) CloseDB

func (d *Database) CloseDB() error

func (*Database) GetSummaryByURL

func (d *Database) GetSummaryByURL(url string) (models.Summary, error)

func (*Database) GetTextByURL

func (d *Database) GetTextByURL(url string) ([]models.SiteChunk, error)

func (*Database) GetVideo

func (d *Database) GetVideo(videoID string) (models.Video, error)

func (*Database) PostSite

func (d *Database) PostSite(text models.SiteChunk) error

func (*Database) PostSummary

func (d *Database) PostSummary(summary models.Summary) error

func (*Database) PostVideo

func (d *Database) PostVideo(video models.Video) error

func (*Database) SearchSummary

func (d *Database) SearchSummary(q string) ([]models.Summary, error)

func (*Database) SearchSummarySlice

func (d *Database) SearchSummarySlice(qs []string) ([]models.Summary, error)

this is broken. Needs fixed

func (*Database) SearchText

func (d *Database) SearchText(search string) ([]models.SiteChunk, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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