postgres

package
v0.0.0-...-06fd251 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountStore

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

AccountStore implement yoblog.AccountStore interface

func NewAccountStore

func NewAccountStore(db *sqlx.DB) AccountStore

NewAccountStore create new store.User

func (AccountStore) Create

func (a AccountStore) Create(account *yoblog.Account) (accountID string, err error)

Create implement AccountStore.Create

func (AccountStore) Delete

func (a AccountStore) Delete(id string) (err error)

Delete implement AccountStore.Delete

func (AccountStore) GetByID

func (a AccountStore) GetByID(id string) (account yoblog.Account, err error)

GetByID implement AccountStore.GetByID

type PostStore

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

PostStore implement yoblog.PostStore

func NewPostStore

func NewPostStore(db *sqlx.DB) PostStore

NewPostStore ...

func (PostStore) Create

func (s PostStore) Create(post *yoblog.Post) (postID string, err error)

func (PostStore) CreateComment

func (s PostStore) CreateComment(comment *yoblog.Comment) (commentID string, err error)

func (PostStore) Delete

func (s PostStore) Delete(id string) (err error)

func (PostStore) GetAll

func (s PostStore) GetAll() (posts []yoblog.Post, err error)

func (PostStore) GetByID

func (s PostStore) GetByID(id string) (post yoblog.Post, err error)

func (PostStore) GetByOwnerID

func (s PostStore) GetByOwnerID(ownerID string) (posts []yoblog.Post, err error)

func (PostStore) GetPostComments

func (s PostStore) GetPostComments(postID string) (comments []yoblog.Comment, err error)

Jump to

Keyboard shortcuts

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