James Tombleson
75b66dd625
* Using sqlc to generate queries and goose for migrations. The intial tests look good. * moving the old calls away for now. Might use this in a package later on. * Added postgres driver * Updated the dockerfile to support sql migrations * added sqlc config file * updated schema and starting a seed script * updated models to use the database ones * updated reddit cron to talk to the db * added env for sql connection string * got the reddit source working with the db and posting articles * added sql packages * added rule to ignore dev sql file * added migration down statement for rolling back * updated cron for reddit and youtube * Updated reddit to follow a new standard pattern * updated youtube to follow new patterns * updated tests and brought them to the standard * updated the seed migration * all cron tasks should feed the db now * updated app init * bumped docker to 1.18.3 * disabled remote tests given secrets and lack of interfaces currently to run tests
69 lines
1.0 KiB
Go
69 lines
1.0 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.13.0
|
|
|
|
package database
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type Article struct {
|
|
ID uuid.UUID
|
|
Sourceid uuid.UUID
|
|
Tags string
|
|
Title string
|
|
Url string
|
|
Pubdate time.Time
|
|
Video sql.NullString
|
|
Videoheight int32
|
|
Videowidth int32
|
|
Thumbnail string
|
|
Description string
|
|
Authorname sql.NullString
|
|
Authorimage sql.NullString
|
|
}
|
|
|
|
type Discordqueue struct {
|
|
ID uuid.UUID
|
|
Articleid uuid.UUID
|
|
}
|
|
|
|
type Discordwebhook struct {
|
|
ID uuid.UUID
|
|
Name string
|
|
Key sql.NullString
|
|
Url string
|
|
Server string
|
|
Channel string
|
|
Enabled bool
|
|
}
|
|
|
|
type Icon struct {
|
|
ID uuid.UUID
|
|
Filename string
|
|
Site string
|
|
}
|
|
|
|
type Setting struct {
|
|
ID uuid.UUID
|
|
Key string
|
|
Value string
|
|
Options sql.NullString
|
|
}
|
|
|
|
type Source struct {
|
|
ID uuid.UUID
|
|
Site string
|
|
Name string
|
|
Source string
|
|
Type string
|
|
Value sql.NullString
|
|
Enabled bool
|
|
Url string
|
|
Tags string
|
|
}
|