Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllPermissions = []Permission{ PermissionPostArtwork, PermissionDeleteArtwork, PermissionFetchArtwork, PermissionGetArtworkInfo, PermissionSearchPicture, PermissionEditArtwork, }
View Source
var SourceTypes []SourceType = []SourceType{ SourceTypePixiv, SourceTypeTwitter, SourceTypeBilibili, SourceTypeDanbooru, SourceTypeKemono, }
View Source
var StorageTypes []StorageType = []StorageType{ StorageTypeWebdav, StorageTypeLocal, StorageTypeAlist, }
Functions ¶
This section is empty.
Types ¶
type Artist ¶
type Artist struct { ID string `json:"id" bson:"_id"` Name string `json:"name" bson:"name"` Type SourceType `json:"type" bson:"type"` UID string `json:"uid" bson:"uid"` Username string `json:"username" bson:"username"` }
type Artwork ¶
type Artwork struct { ID string `json:"id" bson:"_id"` Title string `json:"title" bson:"title"` Description string `json:"description" bson:"description"` R18 bool `json:"r18" bson:"r18"` LikeCount uint `json:"like_count" bson:"like_count"` CreatedAt time.Time `json:"created_at" bson:"created_at"` SourceType SourceType `json:"source_type" bson:"source_type"` SourceURL string `json:"source_url" bson:"source_url"` Artist *Artist `json:"artist" bson:"artist"` Tags []string `json:"tags" bson:"tags"` Pictures []*Picture `json:"pictures" bson:"pictures"` }
type ArtworkStatus ¶
type ArtworkStatus string
const ( ArtworkStatusCached ArtworkStatus = "cached" ArtworkStatusPosting ArtworkStatus = "posting" ArtworkStatusPosted ArtworkStatus = "posted" )
type AuthMethod ¶
type AuthMethod string
const ( AuthMethodEmail AuthMethod = "email" AuthMethodTelegram AuthMethod = "telegram" )
type Permission ¶
type Permission string
const ( PermissionPostArtwork Permission = "post_artwork" PermissionDeleteArtwork Permission = "delete_artwork" PermissionFetchArtwork Permission = "fetch_artwork" PermissionGetArtworkInfo Permission = "get_artwork_info" PermissionSearchPicture Permission = "search_picture" PermissionEditArtwork Permission = "edit_artwork" )
type Picture ¶
type Picture struct { ID string `json:"id" bson:"_id"` ArtworkID string `json:"artwork_id" bson:"artwork_id"` Index uint `json:"index" bson:"index"` Thumbnail string `json:"thumbnail" bson:"thumbnail"` Original string `json:"original" bson:"original"` Width uint `json:"width" bson:"width"` Height uint `json:"height" bson:"height"` Hash string `json:"hash" bson:"hash"` BlurScore float64 `json:"blur_score" bson:"blur_score"` TelegramInfo *TelegramInfo `json:"telegram_info" bson:"telegram_info"` StorageInfo *StorageInfo `json:"storage_info" bson:"storage_info"` }
type SourceType ¶
type SourceType string
const ( SourceTypePixiv SourceType = "pixiv" SourceTypeTwitter SourceType = "twitter" SourceTypeBilibili SourceType = "bilibili" SourceTypeDanbooru SourceType = "danbooru" SourceTypeKemono SourceType = "kemono" )
type StorageDetail ¶
type StorageDetail struct { Type StorageType `json:"type" bson:"type"` Path string `json:"path" bson:"path"` }
type StorageInfo ¶
type StorageInfo struct { Original *StorageDetail `json:"original" bson:"original"` Regular *StorageDetail `json:"regular" bson:"regular"` Thumb *StorageDetail `json:"thumb" bson:"thumb"` }
type StorageType ¶
type StorageType string
const ( StorageTypeWebdav StorageType = "webdav" StorageTypeLocal StorageType = "local" StorageTypeAlist StorageType = "alist" )
type TelegramInfo ¶
Click to show internal directories.
Click to hide internal directories.