types

package
v0.37.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 R18Type

type R18Type int
const (
	R18TypeNone R18Type = 0
	R18TypeOnly R18Type = 1
	R18TypeAll  R18Type = 2
)

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

type TelegramInfo struct {
	PhotoFileID    string `json:"photo_file_id" bson:"photo_file_id"`
	DocumentFileID string `json:"document_file_id" bson:"document_file_id"`
	MessageID      int    `json:"message_id" bson:"message_id"`
	MediaGroupID   string `json:"media_group_id" bson:"media_group_id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL