Documentation
¶
Index ¶
- type CategoryIndex
- type ErrorData
- type Pagination
- type PostIndex
- type PostIndexByCategory
- type PostIndexBySearch
- type PostIndexByTag
- type PostShow
- type Presenter
- func (p *Presenter) ExecuteCategoryIndex(buf *bytes.Buffer, r *http.Request, c *CategoryIndex) (*bytes.Buffer, error)
- func (p *Presenter) ExecuteError(buf *bytes.Buffer, code int) (*bytes.Buffer, error)
- func (pt *Presenter) ExecuteHomeIndex(buf *bytes.Buffer, r *http.Request, p *PostIndex) (*bytes.Buffer, error)
- func (pt *Presenter) ExecutePostIndex(buf *bytes.Buffer, r *http.Request, p *PostIndex) (*bytes.Buffer, error)
- func (pt *Presenter) ExecutePostIndexByCategory(buf *bytes.Buffer, r *http.Request, p *PostIndexByCategory) (*bytes.Buffer, error)
- func (pt *Presenter) ExecutePostIndexByKeyword(buf *bytes.Buffer, r *http.Request, p *PostIndexBySearch) (*bytes.Buffer, error)
- func (pt *Presenter) ExecutePostIndexByTag(buf *bytes.Buffer, r *http.Request, p *PostIndexByTag) (*bytes.Buffer, error)
- func (pt *Presenter) ExecutePostShow(buf *bytes.Buffer, r *http.Request, p *PostShow) (*bytes.Buffer, error)
- func (pt *Presenter) ExecutePrivacyPolicyIndex(buf *bytes.Buffer, r *http.Request) (*bytes.Buffer, error)
- func (pt *Presenter) ExecuteProfileIndex(buf *bytes.Buffer, r *http.Request) (*bytes.Buffer, error)
- func (pt *Presenter) ExecuteSupportIndex(buf *bytes.Buffer, r *http.Request) (*bytes.Buffer, error)
- func (p *Presenter) ExecuteTagIndex(buf *bytes.Buffer, r *http.Request, t *TagIndex) (*bytes.Buffer, error)
- func (p *Presenter) IsAd() bool
- func (p *Presenter) StripTags(s string) string
- func (p *Presenter) Summary(s string) string
- func (p *Presenter) Unescape(text string) template.HTML
- type TagIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryIndex ¶
type CategoryIndex struct { Categories *model.Categories Pagination *Pagination }
CategoryIndex is a data for index template.
type Pagination ¶
type Pagination struct { Pager *model.Pagination QueryParams template.URL }
Pagination is a data for pagination template.
type PostIndex ¶
type PostIndex struct { Posts *model.Posts Pagination *Pagination }
PostIndex is a data for index template.
type PostIndexByCategory ¶
type PostIndexByCategory struct { CategoryName string Posts *model.Posts Pagination *Pagination }
PostIndexByCategory is a data for index template by category.
type PostIndexBySearch ¶
type PostIndexBySearch struct { Keyword string Posts *model.Posts Pagination *Pagination }
PostIndexBySearch is a data for index template by search.
type PostIndexByTag ¶
type PostIndexByTag struct { TagName string Posts *model.Posts Pagination *Pagination }
PostIndexByTag is a data for index template by tag.
type Presenter ¶
type Presenter struct {
// contains filtered or unexported fields
}
Presenter represents the singular of presenter.
func NewPresenter ¶
NewPresenter creates a Presenter.
func (*Presenter) ExecuteCategoryIndex ¶
func (p *Presenter) ExecuteCategoryIndex(buf *bytes.Buffer, r *http.Request, c *CategoryIndex) (*bytes.Buffer, error)
ExecuteCategoryIndex responses a index template.
func (*Presenter) ExecuteError ¶
ExecuteError responses a error template.
func (*Presenter) ExecuteHomeIndex ¶
func (pt *Presenter) ExecuteHomeIndex(buf *bytes.Buffer, r *http.Request, p *PostIndex) (*bytes.Buffer, error)
ExecuteHomeIndex responses a index template.
func (*Presenter) ExecutePostIndex ¶
func (pt *Presenter) ExecutePostIndex(buf *bytes.Buffer, r *http.Request, p *PostIndex) (*bytes.Buffer, error)
ExecutePostIndex responses a index template.
func (*Presenter) ExecutePostIndexByCategory ¶
func (pt *Presenter) ExecutePostIndexByCategory(buf *bytes.Buffer, r *http.Request, p *PostIndexByCategory) (*bytes.Buffer, error)
ExecutePostIndexByCategory responses a index template by category.
func (*Presenter) ExecutePostIndexByKeyword ¶
func (pt *Presenter) ExecutePostIndexByKeyword(buf *bytes.Buffer, r *http.Request, p *PostIndexBySearch) (*bytes.Buffer, error)
ExecutePostIndexByKeyword responses a index template by keyword.
func (*Presenter) ExecutePostIndexByTag ¶
func (pt *Presenter) ExecutePostIndexByTag(buf *bytes.Buffer, r *http.Request, p *PostIndexByTag) (*bytes.Buffer, error)
ExecutePostIndexByTag responses a index template by tag.
func (*Presenter) ExecutePostShow ¶
func (pt *Presenter) ExecutePostShow(buf *bytes.Buffer, r *http.Request, p *PostShow) (*bytes.Buffer, error)
ExecutePostShow responses a show template by tag.
func (*Presenter) ExecutePrivacyPolicyIndex ¶
func (pt *Presenter) ExecutePrivacyPolicyIndex(buf *bytes.Buffer, r *http.Request) (*bytes.Buffer, error)
ExecutePrivacyPolicyIndex responses a index template.
func (*Presenter) ExecuteProfileIndex ¶
ExecuteProfileIndex responses a index template.
func (*Presenter) ExecuteSupportIndex ¶
ExecuteSupportIndex responses a index template.
func (*Presenter) ExecuteTagIndex ¶
func (p *Presenter) ExecuteTagIndex(buf *bytes.Buffer, r *http.Request, t *TagIndex) (*bytes.Buffer, error)
ExecuteTagIndex responses a index template.
type TagIndex ¶
type TagIndex struct { Tags *model.Tags Pagination *Pagination }
TagIndex is a data for index template.