sqlstore

package
v0.0.0-...-77ea108 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressRepository

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

func (*AddressRepository) GetOrCreate

func (r *AddressRepository) GetOrCreate(m *models.Address) error

type CommentRepository

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

func (*CommentRepository) Create

func (r *CommentRepository) Create(m *models.Comment) error

func (*CommentRepository) GetAll

func (r *CommentRepository) GetAll(page, limit int) ([]*models.Comment, error)

func (*CommentRepository) GetByPostId

func (r *CommentRepository) GetByPostId(postId string) ([]*models.Comment, error)

type PostRepository

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

func (*PostRepository) Create

func (r *PostRepository) Create(m *models.Post) error

func (*PostRepository) GetBoardIndex

func (r *PostRepository) GetBoardIndex(page, limit int, published bool) ([]*models.Post, error)

func (*PostRepository) GetById

func (r *PostRepository) GetById(id string) (*models.Post, error)

type Store

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

func New

func New(db *sql.DB) *Store

func (*Store) Address

func (s *Store) Address() store.AddressRepository

func (*Store) Comment

func (s *Store) Comment() store.CommentRepository

func (*Store) Post

func (s *Store) Post() store.PostRepository

func (*Store) Vote

func (s *Store) Vote() store.VoteRepository

type VoteRepository

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

func (*VoteRepository) Downvote

func (r *VoteRepository) Downvote(m *models.Vote) error

func (*VoteRepository) Upvote

func (r *VoteRepository) Upvote(m *models.Vote) error

Jump to

Keyboard shortcuts

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