Documentation
¶
Index ¶
- func NormalizeEpNumber(eps []float64) (name string)
- type Anime
- func (a *Anime) AppendFile(filePath string) error
- func (a *Anime) CheckAnime() error
- func (a *Anime) GetAnimeEpisodeDb(c *firestore.Client, ctx context.Context) error
- func (a *Anime) GetAnimeFromDb(c *firestore.Client, ctx context.Context) error
- func (a *Anime) GetAnimeInfoFromDb(c *firestore.Client, ctx context.Context) error
- func (a *Anime) SendToDb(c *firestore.Client, ctx context.Context) error
- func (a *Anime) SendToDbRel(cl *sql.DB) error
- func (a *Anime) SendToKaori(kaoriUrl, token string) error
- type Badge
- type Chapter
- type Episode
- type GraphicSettings
- type InfoQuality
- type Manga
- type Music
- type MusicData
- func (md *MusicData) AddDataToTmpDatabase(db *kaoriDatabase.NoSqlDb) error
- func (md *MusicData) CheckError() (err error)
- func (md *MusicData) CheckImage() (err error)
- func (md *MusicData) CheckTrack() (err error)
- func (md *MusicData) GetNameAnime()
- func (md *MusicData) NormalizeName(musicNameTemplate string) error
- func (md *MusicData) UploadTemporaryFile() error
- type Notification
- type Notifications
- type Page
- type Settings
- type StreamLink
- type Track
- type User
- type Video
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeEpNumber ¶ added in v0.1.2
Types ¶
type Anime ¶
type Anime struct {
Id int `firestore:"-"`
Name string `firestore:"name"`
Episodes []*Episode `firestore:"episodes"`
}
func (*Anime) AppendFile ¶ added in v0.1.3
func (*Anime) CheckAnime ¶ added in v0.2.8
func (*Anime) GetAnimeEpisodeDb ¶ added in v0.1.8
func (*Anime) GetAnimeFromDb ¶ added in v0.1.7
func (*Anime) GetAnimeInfoFromDb ¶ added in v0.1.7
func (*Anime) SendToKaori ¶
type Episode ¶
func NewEpisode ¶
func NewEpisode() *Episode
func (*Episode) CheckEpisode ¶ added in v0.2.8
type GraphicSettings ¶ added in v0.2.18
type GraphicSettings struct {
Background string `json:"background,omitempty"`
OnBackground string `json:"onBackground,omitempty"`
Surface1 string `json:"surface1,omitempty"`
Surface2 string `json:"surface2,omitempty"`
Surface3 string `json:"surface3,omitempty"`
Surface4 string `json:"surface4,omitempty"`
Surface6 string `json:"surface6,omitempty"`
Surface8 string `json:"surface8,omitempty"`
Surface12 string `json:"surface12,omitempty"`
Surface16 string `json:"surface16,omitempty"`
Surface24 string `json:"surface24,omitempty"`
OnSurface string `json:"onSurface,omitempty"`
Primary string `json:"primary,omitempty"`
PrimaryDark string `json:"primaryDark,omitempty"`
OnPrimary string `json:"onPrimary,omitempty"`
Secondary string `json:"secondary,omitempty"`
SecondaryDark string `json:"secondaryDark,omitempty"`
OnSecondary string `json:"onSecondary,omitempty"`
Error string `json:"error,omitempty"`
OnError string `json:"onError,omitempty"`
}
GraphicSettings è una struttura con tutte le preferenze grafiche dell'utente.
func (*GraphicSettings) IsValid ¶ added in v0.2.18
func (gs *GraphicSettings) IsValid() error
IsValid verifica che i dati delle preferenze grafiche inviati dall'utente siano corretti.
type InfoQuality ¶ added in v0.0.22
type Manga ¶ added in v0.2.6
func (*Manga) AppendFile ¶ added in v0.2.6
func (*Manga) SendToDatabase ¶ added in v0.2.7
func (*Manga) SendToKaori ¶ added in v0.2.6
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
CheckError esegue tutti i controlli per verificare che non siano stati inviati al server dati errati.
func (*MusicData) CheckImage ¶ added in v0.2.15
CheckImage controlla se è un'immagine e se è nei formati gestibili dal server
func (*MusicData) CheckTrack ¶ added in v0.2.15
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
NormalizeName genera il nome del file audio.
func (*MusicData) UploadTemporaryFile ¶ added in v0.2.15
UploadTemporaryFile carica un file temporaneo su "littlebox" che scade dopo 3 giorni.
type Notification ¶ added in v0.2.18
type Notifications ¶ added in v0.2.18
type Notifications struct {
Viewed Notification `json:"viewed"`
NotViewed Notification `json:"not_viewed"`
}
type Settings ¶ added in v0.2.18
type Settings struct {
Graphics GraphicSettings `json:"graphics,omitempty"`
ShowBadge bool `json:"showBadge,omitempty"`
IsPervert bool `json:"isPervert,omitempty"`
ShowListAnime bool `json:"showListAnime,omitempty"`
ShowListManga bool `json:"showListManga,omitempty"`
}
Settings è una struttura con tutte le preferenze dell'utente.
type StreamLink ¶
type User ¶ added in v0.2.18
type User struct {
Email string `json:"email"`
Username string `json:"username"`
Password string `json:"-"`
ProfilePicture string `json:"profilePicture"`
Permission string `json:"permission"` //[u]ser,[c]reator,[t]ester,[a]admin
IsDonator bool `json:"isDonator"`
IsActive bool `json:"isActive"`
AnilistId int `json:"anilistId"` //-1 se anilist non è stato collegato.
DateSignUp int64 `json:"dateSignUp"`
ItemAdded int `json:"itemAdded" ` //Numero di item aggiunti al database
Credits int `json:"credits"` //Punti utili per guardare anime. Si guadagnano guardando pubblicità, donando o aggiungendo item al database.
Level int `json:"level"` //Si incrementa in base ai minuti passati sull'applicazione.
Badges []Badge `json:"badges"`
Settings Settings `json:"settings"`
Notifications Notifications `json:"notifications"`
RefreshToken map[string]int64 `json:"-"`
}
User è una struttura con tutti i dati dell'utente.
func (*User) AddNewUser ¶ added in v0.2.18
func (u *User) AddNewUser(db *kaoriDatabase.NoSqlDb) error
AddNewUser aggiunge un nuovo utente al database.
type Video ¶ added in v0.1.0
type Video struct {
Language string
Modality string
Quality *InfoQuality
Server string
StreamLink *StreamLink
}