store

package
v0.0.0-...-d0177a8 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	MustExec(query string, args ...interface{}) sql.Result
	NamedQuery(query string, args interface{}) (*sqlx.Rows, error)
	NamedExec(query string, args interface{}) (sql.Result, error)
	Select(dest interface{}, query string, args ...interface{}) error
	Get(dest interface{}, query string, args ...interface{}) error
}

type Store

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

func New

func New(db DB) *Store

func (*Store) GetSubreddit

func (s *Store) GetSubreddit(id string) (*model.Subreddit, error)

func (*Store) GetSubredditList

func (s *Store) GetSubredditList(ordering string) ([]*model.Subreddit, error)

func (*Store) InsertSubreddit

func (s *Store) InsertSubreddit(sb *model.Subreddit) (*model.Subreddit, error)

Jump to

Keyboard shortcuts

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