storage

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 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 Blog

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

func NewBlog

func NewBlog(db database.Conn) *Blog

func (*Blog) Create

func (s *Blog) Create(blog *bloggulus.Blog) error

func (*Blog) Read

func (s *Blog) Read(id int) (bloggulus.Blog, error)

func (*Blog) ReadAll

func (s *Blog) ReadAll(limit, offset int) ([]bloggulus.Blog, error)

func (*Blog) Update added in v0.2.0

func (s *Blog) Update(blog bloggulus.Blog) error

type Post

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

func NewPost

func NewPost(db database.Conn) *Post

func (*Post) Count

func (s *Post) Count() (int, error)

func (*Post) CountSearch

func (s *Post) CountSearch(query string) (int, error)

func (*Post) Create

func (s *Post) Create(post *bloggulus.Post) error

func (*Post) Read

func (s *Post) Read(id int) (bloggulus.Post, error)

func (*Post) ReadAll

func (s *Post) ReadAll(limit, offset int) ([]bloggulus.Post, error)

func (*Post) ReadAllByBlog

func (s *Post) ReadAllByBlog(blog bloggulus.Blog, limit, offset int) ([]bloggulus.Post, error)

func (*Post) Search

func (s *Post) Search(query string, limit, offset int) ([]bloggulus.Post, error)

type Storage

type Storage struct {
	Blog *Blog
	Post *Post
	// contains filtered or unexported fields
}

func New

func New(db database.Conn) *Storage

Jump to

Keyboard shortcuts

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