Documentation
¶
Index ¶
- func DownloadComicOriginUrl(mediaId any, name string) string
- func GetDomainId() int
- func StoragePrefix(cid int) string
- type ArchiveInfo
- type AutocompleteComic
- type AutocompleteResponse
- type BatchAddTagRequest
- type BatchAddTagResponse
- type ComicImages
- func (c *ComicImages) CoverName() string
- func (c *ComicImages) PageName(no int) string
- func (c *ComicImages) PageNameByIndex(index int) string
- func (c *ComicImages) PageThumbnailName(no int) string
- func (c *ComicImages) PageThumbnailNameByIndex(index int) string
- func (c *ComicImages) ThumbnailName() string
- type ComicInfo
- func (c *ComicInfo) ArchiveDir() string
- func (c *ComicInfo) ArchiveName() string
- func (c *ComicInfo) ArchiveTempDir() string
- func (i *ComicInfo) CheckStatus()
- func (c *ComicInfo) PageOriginUrl(no int) string
- func (c *ComicInfo) PageOriginUrlByIndex(index int) string
- func (c *ComicInfo) PageOriginUrlByName(name string) string
- func (c *ComicInfo) PageSavePath(no int) string
- func (c *ComicInfo) PageSavePathByIndex(index int) string
- func (c *ComicInfo) PageSavePathByName(name string) string
- func (c *ComicInfo) SaveDir() string
- func (c *ComicInfo) SaveDirName() (title string)
- func (c *ComicInfo) StoragePrefix() string
- type CreateRelationRequest
- type CreateRelationResponse
- type DeleteRelationRequest
- type DownloadComicByIDRequest
- type GetRelationsResponse
- type OneComicInfo
- type PicInfo
- type RelatedTagsResponse
- type RelationGroup
- type RestoreComicByIDRequest
- type SearchUniqueTagsResponse
- type SetSettingsRequest
- type Tag
- type TagBrief
- type TagInfo
- type TagSearchResponse
- type TagSectionIndex
- type Tags
- type UpdateTagsRequest
- type VerifyInfo
- type VideoInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadComicOriginUrl ¶
func GetDomainId ¶
func GetDomainId() int
func StoragePrefix ¶ added in v0.0.47
Types ¶
type ArchiveInfo ¶
type ArchiveInfo struct {
Path string `json:"path,omitempty" bson:"path"`
MD5 string `json:"md5,omitempty" bson:"md5"`
Size int64 `json:"size,omitempty" bson:"size"`
CreatedAt time.Time `json:"created_at" bson:"created_at"`
Algorithm string `json:"algorithm,omitempty" bson:"algorithm"`
ByForce bool `json:"by_force,omitempty" bson:"by_force"`
Locators []storage.StorageLocator `json:"locators,omitempty" bson:"locators"`
storage.ReplicaHealth
Status string `json:"status,omitempty" bson:"status,omitempty"` // "valid" | "stale"
}
type AutocompleteComic ¶ added in v0.0.55
AutocompleteComic 自动补全中漫画的轻量信息
type AutocompleteResponse ¶ added in v0.0.55
type AutocompleteResponse struct {
Comics []*AutocompleteComic `json:"comics"`
Tags []*TagInfo `json:"tags"`
}
AutocompleteResponse 自动补全响应
type BatchAddTagRequest ¶ added in v0.0.53
BatchAddTagRequest 批量添加 tag 请求
type BatchAddTagResponse ¶ added in v0.0.53
type BatchAddTagResponse struct {
Updated int `json:"updated"`
Errors []int `json:"errors,omitempty"`
}
BatchAddTagResponse 批量添加 tag 响应
type ComicImages ¶
type ComicImages struct {
Cover PicInfo `json:"cover" bson:"cover"`
Pages []PicInfo `json:"pages,omitempty" bson:"pages"`
Thumbnail PicInfo `json:"thumbnail" bson:"thumbnail"`
}
func (*ComicImages) CoverName ¶
func (c *ComicImages) CoverName() string
func (*ComicImages) PageName ¶
func (c *ComicImages) PageName(no int) string
func (*ComicImages) PageNameByIndex ¶
func (c *ComicImages) PageNameByIndex(index int) string
func (*ComicImages) PageThumbnailName ¶
func (c *ComicImages) PageThumbnailName(no int) string
func (*ComicImages) PageThumbnailNameByIndex ¶
func (c *ComicImages) PageThumbnailNameByIndex(index int) string
func (*ComicImages) ThumbnailName ¶
func (c *ComicImages) ThumbnailName() string
type ComicInfo ¶
type ComicInfo struct {
Oid string `json:"_id,omitempty" bson:"_id"`
CID int `json:"cid,omitempty" bson:"cid"`
Images ComicImages `json:"images" bson:"images"`
MediaId string `json:"media_id,omitempty" bson:"media_id"`
NumPages int `json:"num_pages,omitempty" bson:"num_pages"`
Status bool `json:"status,omitempty" bson:"status"`
Tags Tags `json:"tags,omitempty" bson:"tags"`
Title struct {
English string `json:"english,omitempty" bson:"english"`
Japanese string `json:"japanese,omitempty" bson:"japanese"`
Pretty string `json:"pretty,omitempty" bson:"pretty"`
} `json:"title" bson:"title"`
UploadDate int64 `json:"upload_date,omitempty" bson:"upload_date"`
VerifyInfo `json:"verify" bson:"verify"`
Archive *ArchiveInfo `json:"archive,omitempty" bson:"archive"`
RedirectTo *int `json:"redirect_to,omitempty" bson:"redirect_to,omitempty"`
Deleted bool `json:"deleted,omitempty" bson:"deleted,omitempty"`
}
func (*ComicInfo) ArchiveDir ¶
func (*ComicInfo) ArchiveName ¶ added in v0.0.39
func (*ComicInfo) ArchiveTempDir ¶ added in v0.0.39
func (*ComicInfo) CheckStatus ¶
func (i *ComicInfo) CheckStatus()
func (*ComicInfo) PageOriginUrl ¶
func (*ComicInfo) PageOriginUrlByIndex ¶
func (*ComicInfo) PageOriginUrlByName ¶
func (*ComicInfo) PageSavePath ¶
func (*ComicInfo) PageSavePathByIndex ¶
func (*ComicInfo) PageSavePathByName ¶
func (*ComicInfo) SaveDirName ¶
func (*ComicInfo) StoragePrefix ¶ added in v0.0.47
type CreateRelationRequest ¶ added in v0.0.53
type CreateRelationRequest struct {
Tags []TagBrief `json:"tags"`
}
CreateRelationRequest 创建关系组请求
type CreateRelationResponse ¶ added in v0.0.53
type CreateRelationResponse struct {
ID string `json:"id"`
Tags []TagBrief `json:"tags"`
CreatedAt string `json:"created_at"`
}
CreateRelationResponse 创建关系组响应
type DeleteRelationRequest ¶ added in v0.0.53
type DeleteRelationRequest struct {
ID string `json:"id"`
}
DeleteRelationRequest 删除关系组请求
type GetRelationsResponse ¶ added in v0.0.53
type GetRelationsResponse struct {
Groups []RelationGroup `json:"groups"`
}
GetRelationsResponse 获取关系组列表响应
type OneComicInfo ¶
type OneComicInfo struct {
Comicid string `json:"comicid"`
Name string `json:"name"`
Desc string `json:"desc"`
Tag string `json:"tag"`
CoverImageUrl string `json:"cover_image_url"`
Author string `json:"author"`
SourceUrl string `json:"source_url"`
SourceName string `json:"source_name"`
CrawlTime string `json:"crawl_time"`
Chapters []struct {
Title string `json:"title"`
ChapterNumber int `json:"chapter_number"`
SourceUrl string `json:"source_url"`
} `json:"chapters"`
ExtChapters []any `json:"ext_chapters"`
Status string `json:"status"`
Tags []any `json:"tags"`
Site string `json:"site"`
LastUpdateTime string `json:"last_update_time"`
VerifyInfo `json:"verify" bson:"verify"`
}
type PicInfo ¶
type RelatedTagsResponse ¶ added in v0.0.53
type RelatedTagsResponse struct {
Tags []*TagInfo `json:"tags"`
}
RelatedTagsResponse 关联 tag 响应
type RelationGroup ¶ added in v0.0.53
type RelationGroup struct {
ID string `json:"id"`
Tags []TagBrief `json:"tags"`
CreatedAt string `json:"created_at"`
}
RelationGroup 关系组信息(用于前端展示)
type RestoreComicByIDRequest ¶
type SearchUniqueTagsResponse ¶ added in v0.0.53
type SearchUniqueTagsResponse struct {
Tags []*TagInfo `json:"tags"`
CIDList []int `json:"cidList"`
Total int `json:"total"`
}
SearchUniqueTagsResponse 搜索结果去重 tag 响应
type SetSettingsRequest ¶
type TagBrief ¶ added in v0.0.53
type TagBrief struct {
ID int `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
URL string `json:"url"`
}
TagBrief 关系组中单个 tag 的简要信息
type TagInfo ¶
type TagInfo struct {
ID int `bson:"id" json:"id"`
Name string `bson:"name" json:"name"`
Type string `bson:"type" json:"type"`
URL string `bson:"url" json:"url"`
Count int `bson:"count" json:"count"`
Like bool `bson:"like" json:"like"`
Explicit bool `bson:"explicit,omitempty" json:"explicit,omitempty"`
}
func (*TagInfo) SectionName ¶
type TagSearchResponse ¶ added in v0.0.53
TagSearchResponse 标签搜索结果
type TagSectionIndex ¶
type UpdateTagsRequest ¶ added in v0.0.53
type UpdateTagsRequest struct {
CID int `json:"cid"`
Added []Tag `json:"added,omitempty"`
Removed []Tag `json:"removed,omitempty"`
}
UpdateTagsRequest 单本漫画 tag 更新请求
type VerifyInfo ¶
type VerifyInfo = comic.VerifyInfo
type VideoInfo ¶
type VideoInfo struct {
Oid string `json:"_id" bson:"_id"`
Vid string `json:"vid" bson:"vid"`
Context string `json:"@context" bson:"@context"`
Type string `json:"@type" bson:"@type"`
Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"`
ThumbnailUrl []string `json:"thumbnailUrl" bson:"thumbnail_url"`
UploadDate time.Time `json:"uploadDate" bson:"upload_date"`
Author struct {
Type string `json:"@type" bson:"@type"`
Name string `json:"name" bson:"name"`
} `json:"author" bson:"author"`
ContentUrl string `json:"contentUrl" bson:"content_url"`
InteractionStatistic struct {
Type string `json:"@type" bson:"type"`
InteractionType struct {
Type string `json:"@type" bson:"@type"`
} `json:"interactionType" bson:"interaction_type"`
UserInteractionCount int `json:"userInteractionCount" bson:"user_interaction_count"`
} `json:"interactionStatistic" bson:"interaction_statistic"`
}
Click to show internal directories.
Click to hide internal directories.