Documentation
¶
Index ¶
- Constants
- Variables
- type Article
- type ArticleEntry
- type Community
- func (p *Community) Article(ctx context.Context, id string) (article *Article, err error)
- func (p *Community) CanEditable(ctx context.Context, uid, id string) (editable bool, err error)
- func (p *Community) DeleteArticle(ctx context.Context, uid, id string) (err error)
- func (p *Community) DeleteMedia(ctx context.Context, uid, id string) (err error)
- func (p *Community) ListArticle(ctx context.Context, from string, limit int) (items []*ArticleEntry, next string, err error)
- func (p *Community) MediaURL(id string) (url string)
- func (p *Community) PutArticle(ctx context.Context, uid string, article *Article) (id string, err error)
- func (p *Community) PutMedia(ctx context.Context, uid string, media []byte) (id string, err error)
- type Config
Constants ¶
View Source
const ( MarkBegin = "" MarkEnd = "eof" )
Variables ¶
View Source
var (
ErrNotExist = os.ErrNotExist
)
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct {
ArticleEntry
Content string // in markdown
}
type ArticleEntry ¶
type Community ¶
type Community struct {
// contains filtered or unexported fields
}
func (*Community) CanEditable ¶
CanEditable
func (*Community) DeleteArticle ¶
func (*Community) DeleteMedia ¶
func (*Community) ListArticle ¶
func (p *Community) ListArticle(ctx context.Context, from string, limit int) (items []*ArticleEntry, next string, err error)
ListArticle lists articles from an position.
Click to show internal directories.
Click to hide internal directories.