kaoriData

package module
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: May 22, 2021 License: MIT Imports: 20 Imported by: 1

README

KaoriData

Common data structures for multiple programs.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeEpNumber added in v0.1.2

func NormalizeEpNumber(eps []float64) (name string)

Types

type Anime

type Anime struct {
	Id       int        `firestore:"-"`
	Name     string     `firestore:"name"`
	Episodes []*Episode `firestore:"episodes"`
}

func NewAnime

func NewAnime() *Anime

func (*Anime) AppendFile added in v0.1.3

func (a *Anime) AppendFile(filePath string) error

func (*Anime) CheckAnime added in v0.2.8

func (a *Anime) CheckAnime() error

func (*Anime) GetAnimeEpisodeDb added in v0.1.8

func (a *Anime) GetAnimeEpisodeDb(c *firestore.Client, ctx context.Context) error

func (*Anime) GetAnimeFromDb added in v0.1.7

func (a *Anime) GetAnimeFromDb(c *firestore.Client, ctx context.Context) error

func (*Anime) GetAnimeInfoFromDb added in v0.1.7

func (a *Anime) GetAnimeInfoFromDb(c *firestore.Client, ctx context.Context) error

func (*Anime) SendToDb

func (a *Anime) SendToDb(c *firestore.Client, ctx context.Context) error

func (*Anime) SendToDbRel added in v0.2.15

func (a *Anime) SendToDbRel(cl *sql.DB) error

func (*Anime) SendToKaori

func (a *Anime) SendToKaori(kaoriUrl, token string) error

type Chapter added in v0.2.6

type Chapter struct {
	Number string
	Title  string
	Pages  []*Page
}

func NewChapter added in v0.2.9

func NewChapter() *Chapter

type Episode

type Episode struct {
	Number int `firestore:"number"`
	Title  string
	Videos []*Video
}

func NewEpisode

func NewEpisode() *Episode

func (*Episode) CheckEpisode added in v0.2.8

func (ep *Episode) CheckEpisode() error

func (*Episode) SendToDbRel added in v0.2.15

func (ep *Episode) SendToDbRel(cl *sql.DB, IdAnime int) (int, error)

type InfoQuality added in v0.0.22

type InfoQuality struct {
	Width  int `firestore:"width"`
	Height int `firestore:"height"`
}

type Manga added in v0.2.6

type Manga struct {
	Id             string
	Name           string
	ChaptersNumber int
	Chapters       []*Chapter
}

func (*Manga) AppendFile added in v0.2.6

func (m *Manga) AppendFile(filePath string) error

func (*Manga) SendToDatabase added in v0.2.7

func (m *Manga) SendToDatabase(c *firestore.Client, ctx context.Context) error

func (*Manga) SendToKaori added in v0.2.6

func (m *Manga) SendToKaori(kaoriServer, token string) error

type Music added in v0.2.15

type Music struct {
	OP         []Track
	ED         []Track
	SoundTrack []Track
}

Music struct

type MusicData added in v0.2.15

type MusicData struct {
	IdAnilist int    `json:"idAnilist"`
	AnimeName string `json:"-"`
	Type      string `json:"type"`
	NumSong   int    `json:"numSong"`
	IsFull    bool   `json:"isFull"`
	Artist    string `json:"artist,omitempty"`
	NameSong  string `json:"nameSong,omitempty"`
	Cover     string `json:"cover"`
	Track     string `json:"track"`
	// contains filtered or unexported fields
}

MusicData struct

func (*MusicData) AddDataToTmpDatabase added in v0.2.15

func (md *MusicData) AddDataToTmpDatabase(db *kaoriDatabase.NoSqlDb) error

Aggiunge il dato al database

func (*MusicData) CheckError added in v0.2.15

func (md *MusicData) CheckError() (err error)

CheckError esegue tutti i controlli per verificare che non siano stati inviati al server dati errati.

func (*MusicData) CheckImage added in v0.2.15

func (md *MusicData) CheckImage() (err error)

CheckImage controlla se è un'immagine e se è nei formati gestibili dal server

func (*MusicData) CheckTrack added in v0.2.15

func (md *MusicData) CheckTrack() (err error)

CheckTrack controlla se è un file mp3.

func (*MusicData) GetNameAnime added in v0.2.15

func (md *MusicData) GetNameAnime()

GetNameAnime setta mediante l'id di anilist il nome dell'anime

func (*MusicData) NormalizeName added in v0.2.15

func (md *MusicData) NormalizeName() error

NormalizeName genera il nome del file audio.

func (*MusicData) UploadTemporaryFile added in v0.2.15

func (md *MusicData) UploadTemporaryFile() error

UploadTemporaryFile carica un file temporaneo su "littlebox" che scade dopo 3 giorni.

type Page added in v0.2.6

type Page struct {
	Number   string
	Language string
	Server   string
	Link     string
}

func NewPage added in v0.2.9

func NewPage() *Page
type StreamLink struct {
	Link     string  `firestore:"link"`
	Fansub   string  `firestore:"fansub"`
	Duration float64 `firestore:"duration"`
	Bitrate  int     `firestore:"bitrate"`
}

type Track added in v0.2.15

type Track struct {
	Name         string
	Artist       string
	IdSoundCloud int
	Links        string
}

Track struct

type Video added in v0.1.0

type Video struct {
	Language   string
	Modality   string
	Quality    *InfoQuality
	Server     string
	StreamLink *StreamLink
}

func NewVideo added in v0.1.0

func NewVideo() *Video

func (*Video) CheckVideo added in v0.2.8

func (v *Video) CheckVideo() error

func (*Video) GetQuality added in v0.1.0

func (v *Video) GetQuality(link string) error

func (*Video) SendToDbRel added in v0.2.15

func (v *Video) SendToDbRel(cl *sql.DB, episodeID int) (int, error)

Jump to

Keyboard shortcuts

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