admin

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlogStorage

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

func NewBlogStorage

func NewBlogStorage(conn postgres.Conn) *BlogStorage

func (*BlogStorage) Create

func (s *BlogStorage) Create(blog *admin.Blog) error

func (*BlogStorage) Delete

func (repo *BlogStorage) Delete(blog *admin.Blog) error

func (*BlogStorage) List

func (s *BlogStorage) List(limit, offset int) ([]*admin.Blog, error)

func (*BlogStorage) ListAll added in v0.3.2

func (s *BlogStorage) ListAll() ([]*admin.Blog, error)

func (*BlogStorage) Read

func (s *BlogStorage) Read(id uuid.UUID) (*admin.Blog, error)

func (*BlogStorage) ReadByFeedURL

func (s *BlogStorage) ReadByFeedURL(feedURL string) (*admin.Blog, error)

func (*BlogStorage) Update

func (s *BlogStorage) Update(blog *admin.Blog) error

type PostStorage

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

func NewPostStorage

func NewPostStorage(conn postgres.Conn) *PostStorage

func (*PostStorage) Create

func (s *PostStorage) Create(post *admin.Post) error

func (*PostStorage) Delete

func (repo *PostStorage) Delete(post *admin.Post) error

func (*PostStorage) List

func (s *PostStorage) List(limit, offset int) ([]*admin.Post, error)

func (*PostStorage) ListByBlog

func (s *PostStorage) ListByBlog(blog *admin.Blog, limit, offset int) ([]*admin.Post, error)

func (*PostStorage) Read

func (s *PostStorage) Read(id uuid.UUID) (*admin.Post, error)

func (*PostStorage) ReadByURL

func (s *PostStorage) ReadByURL(url string) (*admin.Post, error)

func (*PostStorage) Update

func (s *PostStorage) Update(post *admin.Post) error

type Storage

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

func New

func New(conn postgres.Conn) *Storage

func (*Storage) Blog

func (s *Storage) Blog() *BlogStorage

func (*Storage) Post

func (s *Storage) Post() *PostStorage

func (*Storage) Tag

func (s *Storage) Tag() *TagStorage

type TagStorage

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

func NewTagStorage

func NewTagStorage(conn postgres.Conn) *TagStorage

func (*TagStorage) Create

func (s *TagStorage) Create(tag *admin.Tag) error

func (*TagStorage) Delete

func (repo *TagStorage) Delete(tag *admin.Tag) error

func (*TagStorage) List

func (s *TagStorage) List(limit, offset int) ([]*admin.Tag, error)

func (*TagStorage) Read

func (s *TagStorage) Read(id uuid.UUID) (*admin.Tag, error)

Jump to

Keyboard shortcuts

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