Documentation ¶
Index ¶
- Constants
- Variables
- type CacheRedisConfig
- type Config
- type CrawlErrorResponse
- type CrawlResponse
- type CrawlTask
- type ElasticSearchConfig
- type ErrorRawResponse
- type Filter
- type GeneralConfig
- type IDList
- type IDWithPos
- type Illust
- type IllustRaw
- type IllustRawResponse
- type IllustRawTag
- type IllustRawTagPre
- type IllustRawTranslation
- type IllustRawUrls
- type IllustResponse
- type IllustSearch
- type IllustStatistic
- type IllustStatisticResponse
- type IllustTag
- type IllustTagResponse
- type IllustsResponse
- type IllustsSearchResponse
- type MQMessage
- type MessageQueue
- type MessageRedisConfig
- type Modes
- type MongoDBConfig
- type NearDBConfig
- type RabbitMQConfig
- type Rank
- type RankAggregateResult
- type RankIllust
- type RankIllustRaw
- type RankIllustsRawResponse
- type RankIllustsResponseMessage
- type RedisConfig
- type ResponserConfig
- type SearchSuggestResponse
- type SearchSuggestTagsResponse
- type SpiderConfig
- type Ugoira
- type UgoiraFrame
- type UgoiraFrameRaw
- type UgoiraFrameResponse
- type UgoiraRaw
- type UgoiraRawResponse
- type UgoiraResponse
- type User
- type UserIllustsRaw
- type UserIllustsRawResponse
- type UserIllustsResponse
- type UserImage
- type UserImageResponse
- type UserRaw
- type UserRawBackground
- type UserRawResponse
- type UserResponse
- type UserSearch
- type UsersResponse
- type UsersSearchResponse
Constants ¶
View Source
const ( IllustSearchMapping = `` /* 1003-byte string literal not displayed */ UserSearchMapping = `` /* 349-byte string literal not displayed */ )
View Source
const ( CrawlIllustDetail uint = iota CrawlUserDetail CrawlUserIllusts CrawlRankIllusts CrawlUgoiraDetail CrawlError )
Variables ¶
View Source
var ( ErrorRetrivingFinishedTask = errors.New("error In Retryving Finished Task") ErrorIndexExist = errors.New("error Index Already Existed") ErrorItemBanned = errors.New("error Item Banned") ErrorNoResult = errors.New("error No Result") ErrorChannelClosed = errors.New("channel closed") ErrorTimeOut = errors.New("time Out") ErrorArchiveMode = errors.New("in Archive Mode") InternalErrorLoginNeeded = errors.New("login needed") )
Functions ¶
This section is empty.
Types ¶
type CacheRedisConfig ¶
type CacheRedisConfig struct {
URI string `yaml:"uri"`
}
type Config ¶
type Config struct { Mongodb MongoDBConfig `yaml:"mongodb"` Rabbitmq RabbitMQConfig `yaml:"rabbitmq"` Elasticsearch ElasticSearchConfig `yaml:"elasticsearch"` Redis RedisConfig `yaml:"redis"` Neardb NearDBConfig `yaml:"neardb"` Responser ResponserConfig `yaml:"responser"` General GeneralConfig `yaml:"general"` Spider SpiderConfig `yaml:"spider"` }
type CrawlErrorResponse ¶ added in v1.3.1
type CrawlResponse ¶
type ElasticSearchConfig ¶
type ErrorRawResponse ¶ added in v1.3.1
type ErrorRawResponse struct {
Message string `json:"message"`
}
type GeneralConfig ¶
type Illust ¶
type Illust struct { ID uint64 `bson:"_id"` UpdateTime time.Time `bson:"update_time"` Title string `bson:"title"` AltTitle string `bson:"altTitle"` Description string `bson:"description,omitempty"` Type uint `bson:"type"` CreateDate time.Time `bson:"createDate"` UploadDate time.Time `bson:"uploadDate"` Sanity uint `bson:"sanity"` Width uint `bson:"width"` Height uint `bson:"height"` PageCount uint `bson:"pageCount"` Tags []IllustTag `bson:"tags"` Statistic IllustStatistic `bson:"statistic"` User uint `bson:"user"` Image time.Time `bson:"image"` AIType uint `bson:"aiType,omitempty"` Popularity uint `bson:"popularity"` Banned bool `bson:"banned"` }
type IllustRaw ¶
type IllustRaw struct { ID uint64 `json:"id,string"` Title string `json:"title"` Description string `json:"description"` IllustType uint `json:"illustType"` CreateDate time.Time `json:"createDate"` UploadDate time.Time `json:"uploadDate"` Restrict uint `json:"restrict"` XRestrict uint `json:"xRestrict"` Sl uint `json:"sl"` Urls IllustRawUrls `json:"urls"` Tags IllustRawTagPre `json:"tags"` Alt string `json:"alt"` UserID uint `json:"userId,string"` AIType uint `json:"aiType"` Width uint `json:"width"` Height uint `json:"height"` PageCount uint `json:"pageCount"` BookmarkCount uint `json:"bookmarkCount"` LikeCount uint `json:"likeCount"` CommentCount uint `json:"commentCount"` ViewCount uint `json:"viewCount"` }
type IllustRawResponse ¶
type IllustRawTag ¶
type IllustRawTag struct { Tag string `json:"tag"` Translation IllustRawTranslation `json:"translation"` }
type IllustRawTagPre ¶
type IllustRawTagPre struct {
Tags []IllustRawTag `json:"tags"`
}
type IllustRawTranslation ¶
type IllustRawTranslation struct {
En string `json:"en"`
}
type IllustRawUrls ¶
type IllustResponse ¶
type IllustResponse struct { ID uint64 `json:"id"` Title string `json:"title"` AltTitle string `json:"altTitle"` Description string `json:"description"` Type uint `json:"type"` CreateDate string `json:"createDate"` UploadDate string `json:"uploadDate"` Sanity uint `json:"sanity"` Width uint `json:"width"` Height uint `json:"height"` PageCount uint `json:"pageCount"` Tags []IllustTagResponse `json:"tags"` Statistic IllustStatisticResponse `json:"statistic"` User *UserResponse `json:"user,omitempty"` Image string `json:"image"` AIType uint `json:"aiType"` }
type IllustSearch ¶
type IllustSearch struct { Title string `json:"title"` AltTitle string `json:"alt_title,omitempty"` Description string `json:"description,omitempty"` Type uint `json:"type"` CreateDate time.Time `json:"create_date"` Sanity uint `json:"sanity"` Popularity uint `json:"popularity"` User uint `json:"user"` Tags []IllustTag `json:"tags"` }
type IllustStatistic ¶
type IllustStatisticResponse ¶
type IllustTagResponse ¶
type IllustsResponse ¶
type IllustsResponse struct { Illusts []IllustResponse `json:"illusts"` HasNext bool `json:"has_next"` }
type IllustsSearchResponse ¶
type IllustsSearchResponse struct { Illusts []IllustResponse `json:"illusts"` Scores []float64 `json:"scores,omitempty"` HighLight []*string `json:"highlight,omitempty"` HasNext bool `json:"has_next"` }
type MessageQueue ¶
type MessageRedisConfig ¶
type MessageRedisConfig struct {
URI string `yaml:"uri"`
}
type MongoDBConfig ¶
type MongoDBConfig struct {
URI string `yaml:"uri"`
}
type NearDBConfig ¶
type NearDBConfig struct {
URI string `yaml:"uri"`
}
type RabbitMQConfig ¶
type RabbitMQConfig struct {
URI string `yaml:"uri"`
}
type Rank ¶
type Rank struct { Date string `bson:"date"` Mode string `bson:"mode"` Content string `bson:"content"` Illusts []RankIllust `bson:"illusts"` }
type RankAggregateResult ¶
type RankAggregateResult struct {
Content Illust `bson:"content"`
}
type RankIllust ¶
type RankIllustRaw ¶
type RankIllustsRawResponse ¶
type RankIllustsRawResponse struct { Contents []RankIllustRaw `json:"contents"` Mode string `json:"mode"` Page int `json:"page"` Date string `json:"date"` Next interface{} `json:"next"` Content string `json:"content"` }
type RedisConfig ¶
type RedisConfig struct { CacheRedis CacheRedisConfig `yaml:"cache"` MessageRedis MessageRedisConfig `yaml:"message"` }
type ResponserConfig ¶
type SearchSuggestResponse ¶
type SearchSuggestResponse struct {
SuggestWords []string `json:"suggest_words"`
}
type SearchSuggestTagsResponse ¶
type SearchSuggestTagsResponse struct {
SuggestTags []IllustTagResponse `json:"suggest_tags"`
}
type SpiderConfig ¶
type UgoiraFrame ¶
type UgoiraFrameRaw ¶
type UgoiraFrameResponse ¶
type UgoiraRaw ¶
type UgoiraRaw struct { Src string `json:"src"` Originalsrc string `json:"originalSrc"` MimeType string `json:"mime_type"` Frames []UgoiraFrameRaw `json:"frames"` }
type UgoiraRawResponse ¶
type UgoiraResponse ¶
type UgoiraResponse struct { ID uint64 `json:"id"` Image string `json:"image"` MimeType string `json:"mime_type"` Frames []UgoiraFrameResponse `json:"frames"` }
type User ¶
type User struct { ID uint64 `bson:"_id"` UpdateTime time.Time `bson:"update_time"` Name string `bson:"name"` Bio string `bson:"bio,omitempty"` Image UserImage `bson:"image"` IllustsUpdateTime time.Time `bson:"illusts_update_time"` IllustsCount uint `bson:"illusts_count"` Banned bool `bson:"banned"` }
type UserIllustsRaw ¶
type UserIllustsRaw struct { Illusts interface{} `json:"illusts"` Manga interface{} `json:"manga"` }
type UserIllustsRawResponse ¶
type UserIllustsRawResponse struct { Error bool `json:"error"` Message string `json:"message"` Body UserIllustsRaw `json:"body"` }
type UserIllustsResponse ¶
type UserImageResponse ¶
type UserRawBackground ¶
type UserRawBackground struct {
URL string `json:"url"`
}
type UserRawResponse ¶
type UserResponse ¶
type UserResponse struct { ID uint64 `json:"id"` Name string `json:"name"` Bio string `json:"bio"` Image UserImageResponse `json:"image"` }
type UserSearch ¶
type UsersResponse ¶
type UsersResponse struct { Users []UserResponse `json:"users"` HasNext bool `json:"has_next"` }
type UsersSearchResponse ¶
type UsersSearchResponse struct { Users []UserResponse `json:"users"` Scores []float64 `json:"scores"` HighLight []*string `json:"highlight,omitempty"` HasNext bool `json:"has_next"` }
Click to show internal directories.
Click to hide internal directories.