Documentation ¶
Index ¶
- Variables
- func NewArticleRepositoryFromFS(filesystem fs.FS, includeUnpublished bool) (*ArticleRepository, ParseResult, error)
- type ArticleRepository
- func (r *ArticleRepository) Count(ctx context.Context) int
- func (r *ArticleRepository) FindAll(context.Context) ([]*model.Article, error)
- func (r *ArticleRepository) FindAllTags(ctx context.Context) ([]string, error)
- func (r *ArticleRepository) FindByTag(_ context.Context, tag string) ([]*model.Article, error)
- func (r *ArticleRepository) FindOneBySlug(_ context.Context, slug string) (*model.Article, error)
- func (r *ArticleRepository) Search(_ context.Context, terms string) ([]*model.Article, error)
- func (r *ArticleRepository) TagInfo(context.Context) map[string]int
- func (r *ArticleRepository) Tags(context.Context) []string
- type ParseResult
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("article not found")
)
Functions ¶
func NewArticleRepositoryFromFS ¶
func NewArticleRepositoryFromFS( filesystem fs.FS, includeUnpublished bool, ) (*ArticleRepository, ParseResult, error)
Types ¶
type ArticleRepository ¶
type ArticleRepository struct {
// contains filtered or unexported fields
}
func NewArticleRepository ¶
func NewArticleRepository( articles []*model.Article, ) (*ArticleRepository, error)
func (*ArticleRepository) FindAllTags ¶
func (r *ArticleRepository) FindAllTags(ctx context.Context) ([]string, error)
func (*ArticleRepository) FindOneBySlug ¶
Click to show internal directories.
Click to hide internal directories.