Documentation
¶
Index ¶
- type CommentStore
- func (s *CommentStore) Comment(id uuid.UUID) (godiscuss.Comment, error)
- func (s *CommentStore) CommentsByPost(postID uuid.UUID) ([]godiscuss.Comment, error)
- func (s *CommentStore) CreateComment(c *godiscuss.Comment) error
- func (s *CommentStore) DeleteComment(id uuid.UUID) error
- func (s *CommentStore) UpdateComment(c *godiscuss.Comment) error
- type PostStore
- func (s *PostStore) CreatePost(p *godiscuss.Post) error
- func (s *PostStore) DeletePost(id uuid.UUID) error
- func (s *PostStore) Post(id uuid.UUID) (godiscuss.Post, error)
- func (s *PostStore) Posts() ([]godiscuss.Post, error)
- func (s *PostStore) PostsByThread(threadID uuid.UUID) ([]godiscuss.Post, error)
- func (s *PostStore) UpdatePost(p *godiscuss.Post) error
- type Store
- type ThreadStore
- func (s *ThreadStore) CreateThread(t *godiscuss.Thread) error
- func (s *ThreadStore) DeleteThread(id uuid.UUID) error
- func (s *ThreadStore) Thread(id uuid.UUID) (godiscuss.Thread, error)
- func (s *ThreadStore) Threads() ([]godiscuss.Thread, error)
- func (s *ThreadStore) UpdateThread(t *godiscuss.Thread) error
- type UserStore
- func (s *UserStore) CreateUser(u *godiscuss.User) error
- func (s *UserStore) DeleteUser(id uuid.UUID) error
- func (s *UserStore) UpdateUser(u *godiscuss.User) error
- func (s *UserStore) User(id uuid.UUID) (godiscuss.User, error)
- func (s *UserStore) UserByUsername(username string) (godiscuss.User, error)
- func (s *UserStore) Users() ([]godiscuss.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommentStore ¶
func NewCommentStore ¶
func NewCommentStore(db *sqlx.DB) *CommentStore
func (*CommentStore) CommentsByPost ¶
func (*CommentStore) CreateComment ¶
func (s *CommentStore) CreateComment(c *godiscuss.Comment) error
func (*CommentStore) DeleteComment ¶
func (s *CommentStore) DeleteComment(id uuid.UUID) error
func (*CommentStore) UpdateComment ¶
func (s *CommentStore) UpdateComment(c *godiscuss.Comment) error
type Store ¶
type Store struct { *ThreadStore *PostStore *CommentStore *UserStore }
type ThreadStore ¶
func NewThreadStore ¶
func NewThreadStore(db *sqlx.DB) *ThreadStore
func (*ThreadStore) CreateThread ¶
func (s *ThreadStore) CreateThread(t *godiscuss.Thread) error
func (*ThreadStore) DeleteThread ¶
func (s *ThreadStore) DeleteThread(id uuid.UUID) error
func (*ThreadStore) UpdateThread ¶
func (s *ThreadStore) UpdateThread(t *godiscuss.Thread) error
Click to show internal directories.
Click to hide internal directories.