Documentation ¶
Index ¶
- Variables
- type ArticleStore
- func (b *ArticleStore) ConvertImagesToLocal(art string) string
- func (b *ArticleStore) CreateArticle(art models.Article, author models.User) error
- func (b *ArticleStore) DeleteArticle(art models.Article) error
- func (b *ArticleStore) GetArticle(id string) (models.Article, error)
- func (b *ArticleStore) GetArticleHistory(artID string) ([]models.ArticleHistoryEntry, error)
- func (b *ArticleStore) ListArticles(limit, offset int, sortBy string, reverse bool, public bool) ([]models.Article, int, error)
- func (b *ArticleStore) ListArticlesForCategory(catID string, public bool) ([]models.Article, error)
- func (b *ArticleStore) SearchArticles(q string, public bool) ([]models.Article, error)
- func (b *ArticleStore) UpdateArticle(art models.Article, author models.User) error
- type BoltHoldClient
- type CategoryStore
- func (b *CategoryStore) CreateCategory(cat models.Category) error
- func (b *CategoryStore) DeleteCategory(cat models.Category) error
- func (b *CategoryStore) GetCategory(id string) (models.Category, error)
- func (b *CategoryStore) ListCategories(public bool) ([]models.Category, error)
- func (b *CategoryStore) ListCategoriesForCategory(catID string, public bool) ([]models.Category, error)
- func (b *CategoryStore) SearchCategories(q string, public bool) ([]models.Category, error)
- func (b *CategoryStore) UpdateCategory(cat models.Category) error
- type ImageStore
- type UserStore
- func (b *UserStore) Authenticate(username, password string) (*models.User, error)
- func (b *UserStore) CreateUser(user models.User, password string) error
- func (b *UserStore) DeleteUser(user models.User) error
- func (b *UserStore) GetUser(name string) (models.User, error)
- func (b *UserStore) ListUsers() ([]models.User, error)
- func (b *UserStore) UpdateUser(user models.User, password string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSameCategory = errors.New("a category can not be assigned to itself")
Functions ¶
This section is empty.
Types ¶
type ArticleStore ¶
type ArticleStore struct {
// contains filtered or unexported fields
}
func (*ArticleStore) ConvertImagesToLocal ¶
func (b *ArticleStore) ConvertImagesToLocal(art string) string
func (*ArticleStore) CreateArticle ¶
func (*ArticleStore) DeleteArticle ¶
func (b *ArticleStore) DeleteArticle(art models.Article) error
func (*ArticleStore) GetArticle ¶
func (b *ArticleStore) GetArticle(id string) (models.Article, error)
func (*ArticleStore) GetArticleHistory ¶
func (b *ArticleStore) GetArticleHistory(artID string) ([]models.ArticleHistoryEntry, error)
func (*ArticleStore) ListArticles ¶
func (*ArticleStore) ListArticlesForCategory ¶
func (*ArticleStore) SearchArticles ¶
func (*ArticleStore) UpdateArticle ¶
type BoltHoldClient ¶
type BoltHoldClient struct { ImageStore ImageStore *ArticleStore *CategoryStore *UserStore // contains filtered or unexported fields }
func NewBoltHoldClient ¶
func NewBoltHoldClient(path string) (*BoltHoldClient, error)
func (*BoltHoldClient) GetImage ¶
func (b *BoltHoldClient) GetImage(hash string) []byte
func (*BoltHoldClient) UpdateUser ¶
func (b *BoltHoldClient) UpdateUser(user models.User, password string) error
type CategoryStore ¶
type CategoryStore struct { ImageStore ImageStore // contains filtered or unexported fields }
func (*CategoryStore) CreateCategory ¶
func (b *CategoryStore) CreateCategory(cat models.Category) error
func (*CategoryStore) DeleteCategory ¶
func (b *CategoryStore) DeleteCategory(cat models.Category) error
func (*CategoryStore) GetCategory ¶
func (b *CategoryStore) GetCategory(id string) (models.Category, error)
func (*CategoryStore) ListCategories ¶
func (b *CategoryStore) ListCategories(public bool) ([]models.Category, error)
func (*CategoryStore) ListCategoriesForCategory ¶
func (*CategoryStore) SearchCategories ¶
func (*CategoryStore) UpdateCategory ¶
func (b *CategoryStore) UpdateCategory(cat models.Category) error
type ImageStore ¶
type UserStore ¶
type UserStore struct { ImageStore ImageStore // contains filtered or unexported fields }
func (*UserStore) Authenticate ¶
func (*UserStore) CreateUser ¶
Click to show internal directories.
Click to hide internal directories.