Documentation ¶
Index ¶
- Constants
- func TransformCharacterRole(characterRole string) *enum.CharacterRole
- func TransformMedia(media *AnidbMedia) *domain.AnimeMedia
- func TransformMediaTitle(titleMedia *AnidbTitles) []*domain.AnimeMedia
- func TransformMediaTitleItem(items ...*AnidbTitleItem) []*domain.AnimeMediaTitle
- func TransformRelationType(relationType string) *enum.AnimeRelationType
- type AnidbDate
- type AnidbError
- type AnidbMedia
- type AnidbMediaRating
- type AnidbTag
- type AnidbTitleItem
- type AnidbTitles
- type Service
Constants ¶
View Source
const ( AnidbAnimeTypeOVA = "OVA" AnidbAnimeTypeWEB = "WEB" AnidbAnimeTypeMOVIE = "MOVIE" AnidbAnimeTypeMUSICVIDEO = "MUSICVIDEO" AnidbAnimeTypeTVSERIES = "TVSERIES" AnidbAnimeTypeTVSPECIAL = "TVSPECIAL" )
View Source
const ( AnidbRelationTypeFULLSTORY = "FULLSTORY" AnidbRelationTypeALTERNATIVESETTING = "ALTERNATIVESETTING" AnidbRelationTypeOTHER = "OTHER" AnidbRelationTypeSEQUEL = "SEQUEL" AnidbRelationTypeSAMESETTING = "SAMESETTING" AnidbRelationTypePARENTSTORY = "PARENTSTORY" AnidbRelationTypePREQUEL = "PREQUEL" AnidbRelationTypeSUMMARY = "SUMMARY" AnidbRelationTypeSIDESTORY = "SIDESTORY" )
View Source
const ( AnidbCreatorTypeMONOGATARIPLANNER = "MONOGATARIPLANNER" AnidbCreatorTypeORIGINALPLAN = "ORIGINALPLAN" AnidbCreatorTypeANIMATIONCHARACTERDESIGN = "ANIMATIONCHARACTERDESIGN" AnidbCreatorTypeCHIEFDESIGNER = "CHIEFDESIGNER" AnidbCreatorTypeANOTHERLAYERMAINSTORY = "ANOTHERLAYERMAINSTORY" AnidbCreatorTypeUNKNOWNRELATION = "UNKNOWNRELATION" AnidbCreatorTypeMUSIC = "MUSIC" AnidbCreatorTypeCHARACTERDESIGN = "CHARACTERDESIGN" AnidbCreatorTypeSERIESCOMPOSITION = "SERIESCOMPOSITION" AnidbCreatorTypeCHIEFDIRECTION = "CHIEFDIRECTION" AnidbCreatorTypeMAINCHARACTERDESIGN = "MAINCHARACTERDESIGN" AnidbCreatorTypeORIGINALANIMATIONCHARACTERDESIGN = "ORIGINALANIMATIONCHARACTERDESIGN" AnidbCreatorTypeBETADIRECTION = "BETADIRECTION" AnidbCreatorTypeDIRECTION = "DIRECTION" AnidbCreatorTypeWORK = "WORK" AnidbCreatorTypeCHIEFANIMATIONDIRECTION = "CHIEFANIMATIONDIRECTION" AnidbCreatorTypeMANGACOMPOSITION = "MANGACOMPOSITION" AnidbCreatorTypeSTORYCOMPOSITION = "STORYCOMPOSITION" AnidbCreatorTypeEFFECTSDIRECTION = "EFFECTSDIRECTION" AnidbCreatorTypeSTANDDESIGN = "STANDDESIGN" AnidbCreatorTypeORIGINALWORK = "ORIGINALWORK" AnidbCreatorTypeANIMATIONWORK = "ANIMATIONWORK" )
View Source
const ( AnidbTitleTypeOFFICIAL = "OFFICIAL" AnidbTitleTypeSHORT = "SHORT" AnidbTitleTypeSYN = "SYN" AnidbTitleTypeSYNONYM = "SYNONYM" AnidbTitleTypeMAIN = "MAIN" AnidbTitleTypeKANA = "KANA" AnidbTitleTypeKANAREADING = "KANAREADING" AnidbTitleTypeCARD = "CARD" AnidbTitleTypeTITLECARD = "TITLECARD" )
View Source
const ( AnidbCharacterRoleSECONDARYCASTIN = "SECONDARYCASTIN" AnidbCharacterRoleAPPEARSIN = "APPEARSIN" AnidbCharacterRoleCAMEOAPPEARANCEIN = "CAMEOAPPEARANCEIN" AnidbCharacterRoleMAINCHARACTERIN = "MAINCHARACTERIN" )
View Source
const (
MonthOnly = "2006-01"
)
Variables ¶
This section is empty.
Functions ¶
func TransformCharacterRole ¶
func TransformCharacterRole(characterRole string) *enum.CharacterRole
func TransformMedia ¶
func TransformMedia(media *AnidbMedia) *domain.AnimeMedia
func TransformMediaTitle ¶
func TransformMediaTitle(titleMedia *AnidbTitles) []*domain.AnimeMedia
func TransformMediaTitleItem ¶
func TransformMediaTitleItem(items ...*AnidbTitleItem) []*domain.AnimeMediaTitle
func TransformRelationType ¶
func TransformRelationType(relationType string) *enum.AnimeRelationType
Types ¶
type AnidbError ¶
type AnidbMedia ¶
type AnidbMedia struct { XMLName xml.Name `xml:"anime"` Text string `xml:",chardata"` ID string `xml:"id,attr"` Restricted string `xml:"restricted,attr"` Type struct { Text string `xml:",chardata"` } `xml:"type"` Episodecount struct { Text string `xml:",chardata"` } `xml:"episodecount"` StartDate AnidbDate `xml:"startdate"` EndDate AnidbDate `xml:"enddate"` Titles struct { Text string `xml:",chardata"` Title []*AnidbTitleItem `xml:"title"` } `xml:"titles"` SimilarAnime struct { Text string `xml:",chardata"` Anime []struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` Approval string `xml:"approval,attr"` Total string `xml:"total,attr"` } `xml:"anime"` } `xml:"similaranime"` RelatedAnime struct { Text string `xml:",chardata"` Anime []struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` Type string `xml:"type,attr"` } `xml:"anime"` } `xml:"relatedanime"` Recommendations struct { Text string `xml:",chardata"` Total string `xml:"total,attr"` Recommendation []struct { Text string `xml:",chardata"` Type string `xml:"type,attr"` Uid string `xml:"uid,attr"` } `xml:"recommendation"` } `xml:"recommendations"` URL struct { Text string `xml:",chardata"` } `xml:"url"` Creators struct { Text string `xml:",chardata"` Name []struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` Type string `xml:"type,attr"` } `xml:"name"` } `xml:"creators"` Description struct { Text string `xml:",chardata"` } `xml:"description"` Ratings struct { Text string `xml:",chardata"` Permanent AnidbMediaRating `xml:"permanent"` Temporary AnidbMediaRating `xml:"temporary"` Review AnidbMediaRating `xml:"review"` } `xml:"ratings"` Picture struct { Text string `xml:",chardata"` } `xml:"picture"` Resources struct { Text string `xml:",chardata"` Resource []struct { Text string `xml:",chardata"` Type string `xml:"type,attr"` Externalentity struct { Text string `xml:",chardata"` Identifier []struct { Text string `xml:",chardata"` } `xml:"identifier"` URL struct { Text string `xml:",chardata"` } `xml:"url"` } `xml:"externalentity"` } `xml:"resource"` } `xml:"resources"` Tags struct { Text string `xml:",chardata"` Tag []*AnidbTag `xml:"tag"` } `xml:"tags"` Characters struct { Text string `xml:",chardata"` Character []struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` Type string `xml:"type,attr"` Update string `xml:"update,attr"` Rating struct { Text string `xml:",chardata"` Votes string `xml:"votes,attr"` } `xml:"rating"` Name struct { Text string `xml:",chardata"` } `xml:"name"` Gender struct { Text string `xml:",chardata"` } `xml:"gender"` Charactertype struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` } `xml:"charactertype"` Description struct { Text string `xml:",chardata"` } `xml:"description"` Picture struct { Text string `xml:",chardata"` } `xml:"picture"` Seiyuu struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` Picture string `xml:"picture,attr"` } `xml:"seiyuu"` } `xml:"character"` } `xml:"characters"` Episodes struct { Text string `xml:",chardata"` Episode []struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` Update string `xml:"update,attr"` Epno struct { Text string `xml:",chardata"` Type string `xml:"type,attr"` } `xml:"epno"` Length struct { Text string `xml:",chardata"` } `xml:"length"` Airdate struct { Text string `xml:",chardata"` } `xml:"airdate"` Rating struct { Text string `xml:",chardata"` Votes string `xml:"votes,attr"` } `xml:"rating"` Title []struct { Text string `xml:",chardata"` Lang string `xml:"lang,attr"` } `xml:"title"` Summary struct { Text string `xml:",chardata"` } `xml:"summary"` } `xml:"episode"` } `xml:"episodes"` }
type AnidbMediaRating ¶
type AnidbTag ¶
type AnidbTag struct { Text string `xml:",chardata"` ID string `xml:"id,attr"` Parentid string `xml:"parentid,attr"` Weight string `xml:"weight,attr"` Localspoiler string `xml:"localspoiler,attr"` Globalspoiler string `xml:"globalspoiler,attr"` Verified bool `xml:"verified,attr"` Update string `xml:"update,attr"` Infobox string `xml:"infobox,attr"` Name struct { Text string `xml:",chardata"` } `xml:"name"` Description struct { Text string `xml:",chardata"` } `xml:"description"` Picurl struct { Text string `xml:",chardata"` } `xml:"picurl"` }
type AnidbTitleItem ¶
type AnidbTitles ¶
type Service ¶
type Service interface { GetMediaTitles(ctx context.Context) ([]*domain.AnimeMedia, error) GetMedia(ctx context.Context, ids ...string) ([]*domain.AnimeMedia, error) }
func NewService ¶
func NewService( redisCacher *redis.RedisCacher, redisTTL configmodels.RedisKeyTTL, provider configmodels.ProviderConfig, ) (Service, error)
Click to show internal directories.
Click to hide internal directories.