Documentation ¶
Index ¶
- Variables
- func Routes(r chi.Router, conf config.Kemono) error
- type Attachment
- type AttachmentInfo
- type Creator
- func (c *Creator) Feed(ctx context.Context, pages uint64, tag, query string) (*feeds.Feed, error)
- func (c *Creator) FetchPostPage(ctx context.Context, page uint64, query string) ([]*Post, error)
- func (c *Creator) ImageURL() *url.URL
- func (c *Creator) Podcast(ctx context.Context, pages uint64, tag, query string) (*podcast.Podcast, error)
- func (c *Creator) PostAPIURL(page uint64, query string) *url.URL
- func (c *Creator) ProfileAPIURL() *url.URL
- func (c *Creator) PublicURL() *url.URL
- func (c *Creator) TagURL(t string) *url.URL
- type Embed
- type Post
- type Tags
- type Time
- type UpstreamResponseError
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCreatorNotFound = errors.New("creator not found")
View Source
var ErrInvalidTimeType = errors.New("invalid time type")
View Source
var ErrNoAudio = errors.New("no audio file")
View Source
var ErrNoHosts = errors.New("kemono.hosts is empty")
Functions ¶
Types ¶
type Attachment ¶
type Attachment struct { Name string `json:"name"` Path string `json:"path"` // contains filtered or unexported fields }
func (*Attachment) Info ¶
func (a *Attachment) Info(ctx context.Context) (*AttachmentInfo, error)
func (*Attachment) InfoAPIURL ¶
func (a *Attachment) InfoAPIURL() *url.URL
func (*Attachment) IsAudio ¶
func (a *Attachment) IsAudio() bool
func (*Attachment) IsImage ¶
func (a *Attachment) IsImage() bool
func (*Attachment) IsVideo ¶
func (a *Attachment) IsVideo() bool
func (*Attachment) ThumbURL ¶
func (a *Attachment) ThumbURL() *url.URL
func (*Attachment) URL ¶
func (a *Attachment) URL() *url.URL
type AttachmentInfo ¶
type Creator ¶
type Creator struct { ID string `json:"id"` Name string `json:"name"` Service string `json:"service"` Indexed Time `json:"indexed"` Updated Time `json:"updated"` // contains filtered or unexported fields }
func GetCreatorByID ¶
func GetCreatorByUsername ¶
func (*Creator) FetchPostPage ¶
func (*Creator) ProfileAPIURL ¶
type Post ¶
type Post struct { Creator *Creator `json:"-"` ID string `json:"id"` User string `json:"user"` Service string `json:"service"` Title string `json:"title"` Content string `json:"content"` Embed Embed `json:"embed"` Added Time `json:"added"` Published Time `json:"published"` Edited Time `json:"edited"` Tags Tags `json:"tags"` File *Attachment `json:"file"` Attachments []*Attachment `json:"attachments"` }
func (*Post) PodcastItem ¶
type Time ¶
func (*Time) UnmarshalJSON ¶
type UpstreamResponseError ¶
type UpstreamResponseError struct { Response *http.Response // contains filtered or unexported fields }
func NewUpstreamResponseError ¶
func NewUpstreamResponseError(resp *http.Response) UpstreamResponseError
func (UpstreamResponseError) Body ¶
func (u UpstreamResponseError) Body() string
func (UpstreamResponseError) Error ¶
func (u UpstreamResponseError) Error() string
Click to show internal directories.
Click to hide internal directories.