Documentation ¶
Index ¶
- func FavoriteArtwork(ctx *gin.Context)
- func GetArtwork(ctx *gin.Context)
- func GetArtworkCount(ctx *gin.Context)
- func GetArtworkFavoriteStatus(ctx *gin.Context)
- func GetArtworkList(ctx *gin.Context)
- func LikeArtwork(ctx *gin.Context)
- func RandomArtworkPreview(ctx *gin.Context)
- func RandomArtworks(ctx *gin.Context)
- func RegisterRouter(r *gin.RouterGroup)
- func ResponseFromArtwork(artwork *types.Artwork, isAuthorized bool) *common.RestfulCommonResponse[any]
- func ResponseFromArtworks(artworks []*types.Artwork, isAuthorized bool) *common.RestfulCommonResponse[any]
- func UnfavoriteArtwork(ctx *gin.Context)
- type ArtworkIDRequest
- type ArtworkResponseData
- type GetArtworkListRequest
- type GetRandomArtworksRequest
- type PictureResponse
- type R18Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FavoriteArtwork ¶
func GetArtwork ¶
func GetArtworkCount ¶
func GetArtworkList ¶
func LikeArtwork ¶
func RandomArtworkPreview ¶
func RandomArtworks ¶
func RegisterRouter ¶
func RegisterRouter(r *gin.RouterGroup)
func ResponseFromArtwork ¶
func ResponseFromArtworks ¶
func UnfavoriteArtwork ¶
Types ¶
type ArtworkIDRequest ¶
type ArtworkIDRequest struct {
ArtworkID string `form:"artwork_id" binding:"required" json:"artwork_id"`
}
type ArtworkResponseData ¶
type ArtworkResponseData struct { ID string `json:"id"` CreatedAt string `json:"created_at"` Title string `json:"title"` Description string `json:"description"` SourceURL string `json:"source_url"` R18 bool `json:"r18"` LikeCount uint `json:"like_count"` Tags []string `json:"tags"` Artist *types.Artist `json:"artist"` SourceType types.SourceType `json:"source_type"` Pictures []*PictureResponse `json:"pictures"` }
func ResponseDataFromArtwork ¶
func ResponseDataFromArtwork(artwork *types.Artwork) *ArtworkResponseData
type GetArtworkListRequest ¶
type GetArtworkListRequest struct { R18 int `form:"r18,default=0" binding:"gte=0,lte=2" json:"r18"` ArtistID string `form:"artist_id" binding:"omitempty" json:"artist_id"` Tag string `form:"tag" binding:"omitempty" json:"tag"` Keyword string `form:"keyword" binding:"omitempty,max=100" json:"keyword"` Page int64 `form:"page,default=1" binding:"omitempty,gte=1" json:"page"` PageSize int64 `form:"page_size,default=20" binding:"omitempty,gte=1,lte=200" json:"page_size"` Simple bool `form:"simple,default=false" json:"simple"` }
type PictureResponse ¶
type PictureResponse struct { ID string `json:"id"` Width uint `json:"width"` Height uint `json:"height"` Index uint `json:"index"` Hash string `json:"hash"` BlurScore float64 `json:"blur_score"` FileName string `json:"file_name"` MessageID int `json:"message_id"` Thumbnail string `json:"thumbnail"` Regular string `json:"regular"` }
type R18Request ¶
type R18Request struct {
R18 int `form:"r18,default=0" binding:"gte=0,lte=2" json:"r18"`
}
Click to show internal directories.
Click to hide internal directories.