repo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const TableName = "post"

Variables

View Source
var InsertColumns = []string{
	"title",
	"author",
	"link",
	"subreddit",
	"content",
	"score",
	"promoted",
	"not_safe_for_work",
}
View Source
var SelectColumns = append([]string{"id"}, InsertColumns...)

Functions

This section is empty.

Types

type Repo

type Repo interface {
	CreatePosts(ctx context.Context, posts []model.Post) (int64, error)
	ListPosts(ctx context.Context, limit uint64, offset uint64) ([]model.Post, error)
	GetPromotedPost(ctx context.Context) (*model.Post, error)
}

func NewRepo

func NewRepo(db *sqlx.DB) Repo

Jump to

Keyboard shortcuts

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