Documentation ¶
Index ¶
- Variables
- func CheckS3Ass(ctx context.Context, obj io.ReadSeeker, size int64) (karaberus_tools.DakaraCheckSubResultsOutput, error)
- func CheckS3Inst(ctx context.Context, obj io.ReadSeeker, size int64) karaberus_tools.DakaraCheckResultsOutput
- func CheckS3Video(ctx context.Context, obj io.ReadSeeker, size int64) karaberus_tools.DakaraCheckResultsOutput
- func CheckValidFiletype(type_directory string) bool
- func Closer(closer io.Closer)
- func CreateJwtForUser(ctx context.Context, sub string, expiresAt *time.Time, info *oidc.UserInfo) (*jwt.Token, string, error)
- func CurrentArtists(tx *gorm.DB) *gorm.DB
- func CurrentKaras(tx *gorm.DB) *gorm.DB
- func CurrentMedias(tx *gorm.DB) *gorm.DB
- func DBErrToHumaErr(err error) error
- func DownloadFile(ctx context.Context, input *DownloadInput) (*huma.StreamResponse, error)
- func DownloadFont(ctx context.Context, input *DownloadFontInput) (*huma.StreamResponse, error)
- func GetDB(ctx context.Context) *gorm.DB
- func GetFontObject(ctx context.Context, id uint) (*minio.Object, error)
- func GetKaraLyrics(ctx context.Context, kara KaraInfoDB) (string, error)
- func GetKaraObject(ctx context.Context, kara KaraInfoDB, filetype string) (*minio.Object, error)
- func MakeCli()
- func MugenDownload(ctx context.Context, tx *gorm.DB, mugen_import MugenImport)
- func RefreshMugen(ctx context.Context, input *struct{}) (*struct{}, error)
- func RefreshMugenImports(ctx context.Context) error
- func RunKaraberus(app *fiber.App, api huma.API)
- func SaveFontToS3(ctx context.Context, fd io.Reader, id uint, filesize int64) error
- func StartDakaraSync(ctx context.Context, input *struct{}) (*struct{}, error)
- func SyncDakara(ctx context.Context)
- func SyncDakaraLoop(ctx context.Context)
- func SyncDakaraNotify()
- func SyncMugen(ctx context.Context)
- func UploadToS3(ctx context.Context, file io.Reader, filename string, filesize int64, ...) error
- func UploadedKaras(db *gorm.DB) *gorm.DB
- func Warn(msg string)
- func WithAssociationsUpdate(tx *gorm.DB) *gorm.DB
- type APIToken
- type AdditionalName
- type AllArtistsOutput
- type AllAuthorOutput
- type AllMediaTypesOutput
- type AllMediasOutput
- type AllTags
- type Artist
- type ArtistInfo
- type ArtistOutput
- func CreateArtist(ctx context.Context, input *CreateArtistInput) (*ArtistOutput, error)
- func FindArtist(ctx context.Context, input *FindArtistInput) (*ArtistOutput, error)
- func GetArtist(ctx context.Context, input *GetArtistInput) (*ArtistOutput, error)
- func UpdateArtist(ctx context.Context, input *UpdateArtistInput) (*ArtistOutput, error)
- type AudioTag
- type AudioTagDB
- type AudioTagsOutput
- type AuthorInfo
- type AuthorOutput
- func CreateAuthor(ctx context.Context, input *CreateAuthorInput) (*AuthorOutput, error)
- func FindAuthor(ctx context.Context, input *FindAuthorInput) (*AuthorOutput, error)
- func GetAuthor(ctx context.Context, input *GetAuthorInput) (*AuthorOutput, error)
- func UpdateAuthor(ctx context.Context, input *UpdateAuthorInput) (*AuthorOutput, error)
- type CheckKaraOutput
- func CheckKara(ctx context.Context, kara KaraInfoDB) (*CheckKaraOutput, error)
- func SaveFileToS3(ctx context.Context, tx *gorm.DB, fd io.Reader, kara *KaraInfoDB, ...) (*CheckKaraOutput, error)
- func SaveFileToS3WithMetadata(ctx context.Context, tx *gorm.DB, fd io.Reader, kara *KaraInfoDB, ...) (*CheckKaraOutput, error)
- func SaveMugenResponseToS3(ctx context.Context, tx *gorm.DB, resp *http.Response, kara MugenImport, ...) (*CheckKaraOutput, error)
- type CheckS3FileOutput
- type CreateArtistInput
- type CreateAuthorInput
- type CreateKaraInput
- type CreateMediaInput
- type CreateTokenInput
- type CreateTokenOutput
- type DakaraArtist
- type DakaraArtistBody
- type DakaraGetArtistsResponse
- type DakaraGetSongsResponse
- type DakaraGetTagsResponse
- type DakaraGetWorkTypesResponse
- type DakaraGetWorksResponse
- type DakaraLyricsPreview
- type DakaraOutput
- type DakaraPaginatedResponse
- type DakaraPagination
- type DakaraSong
- type DakaraSongBody
- type DakaraSongWork
- type DakaraTag
- type DakaraTagBody
- type DakaraWork
- type DakaraWorkBody
- type DakaraWorkType
- type DakaraWorkTypeBody
- type DeleteArtistResponse
- type DeleteAuthorResponse
- type DeleteKaraResponse
- type DeleteMediaResponse
- type DeleteMugenImportInput
- type DeleteMugenImportOutput
- type DeleteTokenInput
- type DeleteTokenOutput
- type DownloadFontInput
- type DownloadHeadOutput
- type DownloadInput
- type Editor
- type FileSender
- type FindArtistInput
- type FindAuthorInput
- type FindMediaInput
- type Font
- type GetAllFontsOutput
- type GetAllKarasOutput
- type GetAllTokensOutput
- type GetArtistInput
- type GetAuthorInput
- type GetKaraHistoryOutput
- type GetKaraInput
- type GetMediaInput
- type GetMugenImportsOutput
- type ImportMugenKaraInput
- type ImportMugenKaraOutput
- type KaraInfo
- type KaraInfoDB
- type KaraOutput
- type KaraberusClaims
- type KaraberusConfig
- type KaraberusDBConfig
- type KaraberusDakaraConfig
- type KaraberusError
- type KaraberusListenConfig
- type KaraberusOIDCConfig
- type KaraberusS3Config
- type Media
- type MediaDB
- type MediaInfo
- type MediaOutput
- func CreateMedia(ctx context.Context, input *CreateMediaInput) (*MediaOutput, error)
- func FindMedia(ctx context.Context, input *FindMediaInput) (*MediaOutput, error)
- func GetMedia(ctx context.Context, input *GetMediaInput) (*MediaOutput, error)
- func UpdateMedia(ctx context.Context, input *UpdateMediaInput) (*MediaOutput, error)
- type MediaType
- type MugenImport
- type Scopes
- type SetKaraUploadTimeInput
- type TagInterface
- type TagType
- type TimingAuthor
- type TokenV2
- type UpdateArtistInput
- type UpdateAssociations
- type UpdateAuthorInput
- type UpdateKaraInput
- type UpdateMediaInput
- type UploadData
- type UploadFontInput
- type UploadFontInputDefinition
- type UploadFontOutput
- type UploadInfo
- type UploadInput
- type UploadInputDefinition
- type UploadOutput
- type UploadTempFile
- type User
- type VideoTag
- type VideoTagDB
- type VideoTagsOutput
Constants ¶
This section is empty.
Variables ¶
View Source
var ANIMATION_MUGEN_TAG_ID = "0377db02-3af6-43b8-9b08-c759df3d25c3"
View Source
var ANIME_TYPE = getMediaType("ANIME")
View Source
var AudioTags = []AudioTag{ {ID: "OP", Name: "Opening", Hue: 280, MugenTags: []string{"f02ad9b3-0bd9-4aad-85b3-9976739ba0e4"}, HasSongOrder: true}, {ID: "ED", Name: "Ending", Hue: 280, MugenTags: []string{"38c77c56-2b95-4040-b676-0994a8cb0597"}, HasSongOrder: true}, {ID: "INS", Name: "Insert", Hue: 280, MugenTags: []string{"5e5250d9-351a-4a82-98eb-55db50ad8962"}, HasSongOrder: true}, {ID: "IS", Name: "Image Song", Hue: 280, MugenTags: []string{"10a1ad3e-a05c-4f5c-84b6-f491e3e3a92e"}, HasSongOrder: true}, {ID: "LIVE", Name: "Live", Hue: 240, MugenTags: []string{"a0167949-580c-4de3-bf13-497e462e02f3", "55ce3d79-dcc2-453c-b00a-60ce0c1eba1c"}}, {ID: "REMIX", Name: "Remix/Cover", Hue: 220, MugenTags: []string{"03e1e1d2-8641-47b7-bbcb-39a3df9ff21c", "188a5c46-63ff-4e9f-89e4-763468b6ea4a"}}, }
Audio tags
View Source
var CARTOON_TYPE = getMediaType("CARTOON")
View Source
var CONFIG = getKaraberusConfig()
View Source
var COVER_MUGEN_TAG_ID = "03e1e1d2-8641-47b7-bbcb-39a3df9ff21c"
View Source
var GAME_TYPE = getMediaType("GAME")
View Source
var LIVE_TYPE = getMediaType("LIVE")
View Source
var MediaTypes []MediaType = []MediaType{
{ID: "ANIME", Name: "Anime", IconName: "tv"},
{ID: "GAME", Name: "Game", IconName: "gamepad"},
{ID: "LIVE", Name: "Live action", IconName: "film"},
{ID: "CARTOON", Name: "Cartoon", IconName: "globe"},
}
Media types
View Source
var MugenDownloadSemaphore = semaphore.NewWeighted(5)
View Source
var S3_CLIENT *minio.Client = nil
View Source
var VIDEO_GAME_MUGEN_TAG_ID = "dbedd6b3-d125-4cd8-aa32-c4175e4ca3a3"
View Source
var VideoTags = []VideoTag{ {ID: "FANMADE", Name: "Fanmade", Hue: 140, MugenTags: []string{"a6c79ce5-89ee-4d50-afe8-3abd7317f6c2"}}, {ID: "STREAM", Name: "Stream", Hue: 160, MugenTags: []string{"55ce3d79-dcc2-453c-b00a-60ce0c1eba1c"}}, {ID: "CONCERT", Name: "Concert", Hue: 260, MugenTags: []string{"a0167949-580c-4de3-bf13-497e462e02f3"}}, {ID: "AD", Name: "Advertisement", Hue: 120, MugenTags: []string{"2ddb5358-e674-46fa-a6e1-7f5c5d56f8fa"}}, {ID: "NSFW", Name: "Not Safe For Work", Hue: 0, MugenTags: []string{"e82ce681-6d7b-4fb6-abe4-daa8aaa9bbf9"}}, {ID: "SPOILER", Name: "Spoiler", Hue: 20, MugenTags: []string{"24371984-5e4c-4485-a937-fb0c480ca23b"}}, {ID: "EPILEPSY", Name: "Epilepsy", Hue: 0, MugenTags: []string{"51288600-29e0-4e41-a42b-77f0498e5691"}}, {ID: "MV", Name: "Music Video", Hue: 120, MugenTags: []string{"7be1b15c-cff8-4b37-a649-5c90f3d569a9"}}, }
Video tags
View Source
var WEST_MUGEN_TAG_ID = "efe171c0-e8a1-4d03-98c0-60ecf741ad52"
Functions ¶
func CheckS3Ass ¶
func CheckS3Ass(ctx context.Context, obj io.ReadSeeker, size int64) (karaberus_tools.DakaraCheckSubResultsOutput, error)
func CheckS3Inst ¶
func CheckS3Inst(ctx context.Context, obj io.ReadSeeker, size int64) karaberus_tools.DakaraCheckResultsOutput
func CheckS3Video ¶
func CheckS3Video(ctx context.Context, obj io.ReadSeeker, size int64) karaberus_tools.DakaraCheckResultsOutput
func CheckValidFiletype ¶
func CreateJwtForUser ¶
func DBErrToHumaErr ¶
func DownloadFile ¶
func DownloadFile(ctx context.Context, input *DownloadInput) (*huma.StreamResponse, error)
func DownloadFont ¶
func DownloadFont(ctx context.Context, input *DownloadFontInput) (*huma.StreamResponse, error)
func GetKaraLyrics ¶
func GetKaraLyrics(ctx context.Context, kara KaraInfoDB) (string, error)
func GetKaraObject ¶
func GetKaraObject(ctx context.Context, kara KaraInfoDB, filetype string) (*minio.Object, error)
func MugenDownload ¶
func MugenDownload(ctx context.Context, tx *gorm.DB, mugen_import MugenImport)
func RefreshMugen ¶
func RefreshMugenImports ¶
func RunKaraberus ¶
func RunKaraberus(app *fiber.App, api huma.API)
func SaveFontToS3 ¶
func StartDakaraSync ¶
func SyncDakara ¶
func SyncDakaraLoop ¶
func UploadToS3 ¶
Types ¶
type AdditionalName ¶
func (*AdditionalName) BeforeSave ¶
func (name *AdditionalName) BeforeSave(tx *gorm.DB) error
type AllArtistsOutput ¶
type AllArtistsOutput struct {
Body []Artist `json:"artists"`
}
func GetAllArtists ¶
func GetAllArtists(ctx context.Context, input *struct{}) (*AllArtistsOutput, error)
type AllAuthorOutput ¶
type AllAuthorOutput struct {
Body []TimingAuthor `json:"authors"`
}
func GetAllAuthors ¶
func GetAllAuthors(ctx context.Context, input *struct{}) (*AllAuthorOutput, error)
type AllMediaTypesOutput ¶
type AllMediaTypesOutput struct {
Body []MediaType `json:"media_types"`
}
func GetAllMediaTypes ¶
func GetAllMediaTypes(ctx context.Context, input *struct{}) (*AllMediaTypesOutput, error)
type AllMediasOutput ¶
type AllMediasOutput struct {
Body []MediaDB `json:"medias"`
}
func GetAllMedias ¶
func GetAllMedias(ctx context.Context, input *struct{}) (*AllMediasOutput, error)
type AllTags ¶
type AllTags struct { Authors []TimingAuthor Artists []Artist Video []VideoTagDB Audio []AudioTagDB Media []MediaDB }
type Artist ¶
type ArtistInfo ¶
type ArtistOutput ¶
type ArtistOutput struct { Body struct { Artist Artist `json:"artist"` } }
func CreateArtist ¶
func CreateArtist(ctx context.Context, input *CreateArtistInput) (*ArtistOutput, error)
func FindArtist ¶
func FindArtist(ctx context.Context, input *FindArtistInput) (*ArtistOutput, error)
func GetArtist ¶
func GetArtist(ctx context.Context, input *GetArtistInput) (*ArtistOutput, error)
func UpdateArtist ¶
func UpdateArtist(ctx context.Context, input *UpdateArtistInput) (*ArtistOutput, error)
type AudioTagDB ¶
type AudioTagDB struct {
ID string
}
type AudioTagsOutput ¶
type AudioTagsOutput struct {
Body []AudioTag `json:"audio_tags"`
}
func GetAudioTags ¶
func GetAudioTags(ctx context.Context, input *struct{}) (*AudioTagsOutput, error)
type AuthorInfo ¶
type AuthorInfo struct {
Name string `json:"name"`
}
type AuthorOutput ¶
type AuthorOutput struct { Body struct { Author TimingAuthor `json:"author"` } }
func CreateAuthor ¶
func CreateAuthor(ctx context.Context, input *CreateAuthorInput) (*AuthorOutput, error)
func FindAuthor ¶
func FindAuthor(ctx context.Context, input *FindAuthorInput) (*AuthorOutput, error)
func GetAuthor ¶
func GetAuthor(ctx context.Context, input *GetAuthorInput) (*AuthorOutput, error)
func UpdateAuthor ¶
func UpdateAuthor(ctx context.Context, input *UpdateAuthorInput) (*AuthorOutput, error)
type CheckKaraOutput ¶
type CheckKaraOutput struct { Video *karaberus_tools.DakaraCheckResultsOutput Instrumental *karaberus_tools.DakaraCheckResultsOutput Subtitles *karaberus_tools.DakaraCheckSubResultsOutput }
func CheckKara ¶
func CheckKara(ctx context.Context, kara KaraInfoDB) (*CheckKaraOutput, error)
func SaveFileToS3 ¶
func SaveMugenResponseToS3 ¶
type CheckS3FileOutput ¶
type CheckS3FileOutput struct {
Passed bool `json:"passed" example:"true" doc:"true if file passed all checks"`
}
type CreateArtistInput ¶
type CreateArtistInput struct {
Body ArtistInfo
}
type CreateAuthorInput ¶
type CreateAuthorInput struct {
Body AuthorInfo
}
type CreateKaraInput ¶
type CreateKaraInput struct {
Body KaraInfo
}
type CreateMediaInput ¶
type CreateMediaInput struct {
Body MediaInfo
}
type CreateTokenInput ¶
type CreateTokenOutput ¶
type CreateTokenOutput struct { Body struct { Token string `json:"token"` } }
func CreateToken ¶
func CreateToken(ctx context.Context, input *CreateTokenInput) (*CreateTokenOutput, error)
type DakaraArtist ¶
type DakaraArtist struct { DakaraArtistBody ID int `json:"id"` SongCount int `json:"song_count"` }
type DakaraArtistBody ¶
type DakaraArtistBody struct {
Name string `json:"name"`
}
type DakaraGetArtistsResponse ¶
type DakaraGetArtistsResponse struct { DakaraPaginatedResponse Results []DakaraArtist `json:"results"` }
type DakaraGetSongsResponse ¶
type DakaraGetSongsResponse struct { DakaraPaginatedResponse Results []DakaraSong `json:"results"` }
type DakaraGetTagsResponse ¶
type DakaraGetTagsResponse struct { DakaraPaginatedResponse Results []DakaraTag `json:"results"` }
type DakaraGetWorkTypesResponse ¶
type DakaraGetWorkTypesResponse struct { DakaraPaginatedResponse Results []DakaraWorkType `json:"results"` }
type DakaraGetWorksResponse ¶
type DakaraGetWorksResponse struct { DakaraPaginatedResponse Results []DakaraWork `json:"results"` }
type DakaraLyricsPreview ¶
type DakaraOutput ¶
type DakaraPaginatedResponse ¶
type DakaraPaginatedResponse struct { Pagination DakaraPagination `json:"pagination"` Count int `json:"count" example:"99"` }
type DakaraPagination ¶
type DakaraSong ¶
type DakaraSong struct { ID int `json:"id"` Title string `json:"title"` Filename string `json:"filename"` // basically our ID Duration int32 `json:"duration"` Directory string `json:"directory"` Version string `json:"version"` Detail string `json:"detail"` DetailVideo string `json:"detail_video"` Tags []DakaraTag `json:"tags"` Artists []DakaraArtist `json:"artists"` Works []DakaraSongWork `json:"works"` LyricsPreview DakaraLyricsPreview `json:"lyrics_preview"` HasInstrumental bool `json:"has_instrumental"` DateCreated time.Time `json:"date_created"` DateUpdated time.Time `json:"date_updated"` }
type DakaraSongBody ¶
type DakaraSongBody struct { Title string `json:"title"` Filename string `json:"filename"` // basically our ID Duration int32 `json:"duration"` Directory string `json:"directory"` Version string `json:"version"` Detail string `json:"detail"` DetailVideo string `json:"detail_video"` Tags []DakaraTag `json:"tags"` Artists []DakaraArtist `json:"artists"` Works []DakaraSongWork `json:"works"` Lyrics string `json:"lyrics"` HasInstrumental bool `json:"has_instrumental"` }
func (DakaraSongBody) HasChanged ¶
func (body DakaraSongBody) HasChanged(ref DakaraSong) bool
type DakaraSongWork ¶
type DakaraSongWork struct { Work DakaraWork `json:"work"` LinkType string `json:"link_type"` LinkTypeNumber *uint `json:"link_type_number"` }
type DakaraTagBody ¶
type DakaraWork ¶
type DakaraWorkBody ¶
type DakaraWorkBody struct { Title string `json:"title"` WorkType DakaraWorkTypeBody `json:"work_type"` }
type DakaraWorkType ¶
type DakaraWorkType struct {
DakaraWorkTypeBody
}
type DakaraWorkTypeBody ¶
type DeleteArtistResponse ¶
type DeleteArtistResponse struct {
Status int
}
func DeleteArtist ¶
func DeleteArtist(ctx context.Context, input *GetArtistInput) (*DeleteArtistResponse, error)
type DeleteAuthorResponse ¶
type DeleteAuthorResponse struct {
Status int
}
func DeleteAuthor ¶
func DeleteAuthor(ctx context.Context, input *GetArtistInput) (*DeleteAuthorResponse, error)
type DeleteKaraResponse ¶
type DeleteKaraResponse struct {
Status int
}
func DeleteKara ¶
func DeleteKara(ctx context.Context, input *GetKaraInput) (*DeleteKaraResponse, error)
type DeleteMediaResponse ¶
type DeleteMediaResponse struct {
Status int
}
func DeleteMedia ¶
func DeleteMedia(ctx context.Context, input *GetMediaInput) (*DeleteMediaResponse, error)
type DeleteMugenImportInput ¶
type DeleteMugenImportOutput ¶
type DeleteMugenImportOutput struct {
Status int
}
func DeleteMugenImport ¶
func DeleteMugenImport(ctx context.Context, input *DeleteMugenImportInput) (*DeleteMugenImportOutput, error)
type DeleteTokenInput ¶
type DeleteTokenInput struct {
TokenID uint `path:"token"`
}
type DeleteTokenOutput ¶
type DeleteTokenOutput struct { Body struct { Message string `json:"message" example:"Token 123 deleted."` } }
func DeleteToken ¶
func DeleteToken(ctx context.Context, input *DeleteTokenInput) (*DeleteTokenOutput, error)
type DownloadFontInput ¶
type DownloadHeadOutput ¶
type DownloadHeadOutput struct { AcceptRange string `header:"Accept-Range"` ContentLength int64 `header:"Content-Length"` ContentType string `header:"Content-Type"` }
func DownloadHead ¶
func DownloadHead(ctx context.Context, input *DownloadInput) (*DownloadHeadOutput, error)
type DownloadInput ¶
type FileSender ¶
type FileSender struct { // Reader should be already at the Range.Start location Fd io.ReadCloser Range httputils.Range BytesRead uint64 }
func (*FileSender) Close ¶
func (f *FileSender) Close() error
type FindArtistInput ¶
type FindArtistInput struct {
Name string `query:"name"`
}
type FindAuthorInput ¶
type FindAuthorInput struct {
Name string `query:"name"`
}
type FindMediaInput ¶
type FindMediaInput struct {
Name string `query:"name"`
}
type GetAllFontsOutput ¶
type GetAllFontsOutput struct { Body struct { Fonts []Font } }
func GetAllFonts ¶
func GetAllFonts(ctx context.Context, input *struct{}) (*GetAllFontsOutput, error)
type GetAllKarasOutput ¶
type GetAllKarasOutput struct { Body struct { Karas []KaraInfoDB } }
func GetAllKaras ¶
func GetAllKaras(ctx context.Context, input *struct{}) (*GetAllKarasOutput, error)
type GetAllTokensOutput ¶
type GetAllTokensOutput struct {
Body []APIToken
}
func GetAllUserTokens ¶
func GetAllUserTokens(ctx context.Context, input *struct{}) (*GetAllTokensOutput, error)
type GetArtistInput ¶
type GetArtistInput struct {
Id uint `path:"id" example:"1"`
}
type GetAuthorInput ¶
type GetAuthorInput struct {
Id uint `path:"id" example:"1"`
}
type GetKaraHistoryOutput ¶
type GetKaraHistoryOutput struct { Body struct { History []KaraInfoDB `json:"history"` } }
func GetKaraHistory ¶
func GetKaraHistory(ctx context.Context, input *GetKaraInput) (*GetKaraHistoryOutput, error)
type GetKaraInput ¶
type GetKaraInput struct {
Id uint `path:"id"`
}
type GetMediaInput ¶
type GetMediaInput struct {
Id uint `path:"id" example:"1"`
}
type GetMugenImportsOutput ¶
type GetMugenImportsOutput struct { Body struct { Imports []MugenImport `json:"imports"` } }
func GetMugenImports ¶
func GetMugenImports(ctx context.Context, input *struct{}) (*GetMugenImportsOutput, error)
type ImportMugenKaraInput ¶
type ImportMugenKaraOutput ¶
type ImportMugenKaraOutput struct { Status int Body struct { Import MugenImport `json:"import"` } }
func ImportMugenKara ¶
func ImportMugenKara(ctx context.Context, input *ImportMugenKaraInput) (*ImportMugenKaraOutput, error)
type KaraInfo ¶
type KaraInfo struct { // Main name of the karaoke Title string `json:"title" example:"Zankoku na Tenshi no These"` // More names relating to this karaoke ExtraTitles []string `json:"title_aliases" example:"[\"A Cruel Angel's Thesis\"]"` // Karaoke authors Authors []uint `json:"authors" example:"[1]"` // Artists of the original song Artists []uint `json:"artists" example:"[1]"` // Name of the Media SourceMedia uint `json:"source_media" example:"1"` // Number of the track related to the media. SongOrder uint `json:"song_order" example:"0"` // Medias related to the karaoke Medias []uint `json:"medias"` // Audio tags AudioTags []string `json:"audio_tags" example:"[\"Opening\"]"` // Video tags VideoTags []string `json:"video_tags" example:"[\"Opening\"]"` // Generic comment Comment string `json:"comment" example:"From https://youtu.be/dQw4w9WgXcQ"` // Version (8-bit, Episode 12, ...) Version string `json:"version" example:"iykyk"` // Language (FR, EN, ...) Language string `json:"language" example:"FR"` KaraokeCreationDate *int64 `json:"karaoke_creation_time,omitempty" example:"42"` IsHardsub *bool `json:"is_hardsub,omitempty" example:"false"` }
type KaraInfoDB ¶
type KaraInfoDB struct { gorm.Model Authors []TimingAuthor `gorm:"many2many:kara_authors_tags"` Artists []Artist `gorm:"many2many:kara_artist_tags"` VideoTags []VideoTagDB `gorm:"many2many:kara_video_tags"` AudioTags []AudioTagDB `gorm:"many2many:kara_audio_tags"` SourceMediaID *uint SourceMedia *MediaDB `gorm:"foreignKey:SourceMediaID;references:ID"` Medias []MediaDB `gorm:"many2many:kara_media_tags"` Title string ExtraTitles []AdditionalName `gorm:"many2many:kara_info_additional_name"` Version string Comment string SongOrder uint Language string UploadInfo // Can't be set by users CurrentKaraInfoID *uint CurrentKaraInfo *KaraInfoDB Editor }
func GetKaraByID ¶
func GetKaraByID(db *gorm.DB, kara_id uint) (KaraInfoDB, error)
func (*KaraInfoDB) AfterUpdate ¶
func (ki *KaraInfoDB) AfterUpdate(tx *gorm.DB) error
func (KaraInfoDB) AudioFilename ¶
func (k KaraInfoDB) AudioFilename() string
func (*KaraInfoDB) BeforeSave ¶
func (ki *KaraInfoDB) BeforeSave(tx *gorm.DB) error
func (*KaraInfoDB) BeforeUpdate ¶
func (ki *KaraInfoDB) BeforeUpdate(tx *gorm.DB) error
func (KaraInfoDB) SubsFilename ¶
func (k KaraInfoDB) SubsFilename() string
func (KaraInfoDB) VideoFilename ¶
func (k KaraInfoDB) VideoFilename() string
type KaraOutput ¶
type KaraOutput struct { Body struct { Kara KaraInfoDB `json:"kara"` } }
func CreateKara ¶
func CreateKara(ctx context.Context, input *CreateKaraInput) (*KaraOutput, error)
func GetKara ¶
func GetKara(ctx context.Context, input *GetKaraInput) (*KaraOutput, error)
func UpdateKara ¶
func UpdateKara(ctx context.Context, input *UpdateKaraInput) (*KaraOutput, error)
type KaraberusClaims ¶
type KaraberusClaims struct { IsAdmin bool `json:"is_admin"` Scopes oidc.IDTokenClaims jwt.MapClaims `json:"-"` }
type KaraberusConfig ¶
type KaraberusConfig struct { S3 KaraberusS3Config `env_prefix:"S3"` OIDC KaraberusOIDCConfig `env_prefix:"OIDC"` Listen KaraberusListenConfig `env_prefix:"LISTEN"` DB KaraberusDBConfig `env_prefix:"DB"` Dakara KaraberusDakaraConfig `env_prefix:"DAKARA"` UIDistDir string `envkey:"UI_DIST_DIR" default:"/usr/share/karaberus/ui_dist"` }
type KaraberusDBConfig ¶
type KaraberusDakaraConfig ¶
type KaraberusError ¶
type KaraberusError struct {
Message string
}
func (*KaraberusError) Error ¶
func (m *KaraberusError) Error() string
type KaraberusListenConfig ¶
type KaraberusListenConfig struct { Host string `envkey:"HOST" default:"127.0.0.1"` Port int `envkey:"PORT" default:"8888"` BaseURL string `envkey:"BASE_URL"` Profiling bool `envkey:"PROFILING"` }
func (KaraberusListenConfig) Addr ¶
func (c KaraberusListenConfig) Addr() string
type KaraberusOIDCConfig ¶
type KaraberusOIDCConfig struct { Issuer string `envkey:"ISSUER"` ClientID string `envkey:"CLIENT_ID"` ClientSecret string `envkey:"CLIENT_SECRET"` Scopes string `envkey:"SCOPES" default:"openid profile email"` IDClaim string `envkey:"ID_CLAIM"` GroupsClaim string `envkey:"GROUPS_CLAIM"` AdminGroup string `envkey:"ADMIN_GROUP"` JwtSignKey string `envkey:"JWT_SIGN_KEY"` }
func (KaraberusOIDCConfig) Validate ¶
func (c KaraberusOIDCConfig) Validate() error
type KaraberusS3Config ¶
type MediaDB ¶
type MediaOutput ¶
type MediaOutput struct { Body struct { Media MediaDB `json:"media"` } }
func CreateMedia ¶
func CreateMedia(ctx context.Context, input *CreateMediaInput) (*MediaOutput, error)
func FindMedia ¶
func FindMedia(ctx context.Context, input *FindMediaInput) (*MediaOutput, error)
func GetMedia ¶
func GetMedia(ctx context.Context, input *GetMediaInput) (*MediaOutput, error)
func UpdateMedia ¶
func UpdateMedia(ctx context.Context, input *UpdateMediaInput) (*MediaOutput, error)
type MugenImport ¶
type MugenImport struct { MugenKID uuid.UUID `gorm:"primarykey"` KaraID uint Kara KaraInfoDB `gorm:"foreignKey:KaraID;references:ID;constraint:OnDelete:CASCADE"` }
type SetKaraUploadTimeInput ¶
type TagInterface ¶
type TagInterface interface {
// contains filtered or unexported methods
}
type TimingAuthor ¶
type TimingAuthor struct { gorm.Model Name string `gorm:"uniqueIndex:idx_timing_author_name"` MugenID *uuid.UUID `gorm:"uniqueIndex:idx_timing_author_mugen_id"` }
func GetAuthorById ¶
func GetAuthorById(tx *gorm.DB, Id uint) (*TimingAuthor, error)
func (*TimingAuthor) BeforeSave ¶
func (name *TimingAuthor) BeforeSave(tx *gorm.DB) error
type TokenV2 ¶
type TokenV2 struct { ID uint `gorm:"primarykey" json:"id"` CreatedAt time.Time `json:"created_at"` Token string `gorm:"uniqueIndex:idx_token" json:"token"` UserID string `json:"user_id"` User User `gorm:"foreignKey:UserID;references:ID" json:"user"` Name string `json:"name"` Scopes Scopes `gorm:"embedded" json:"scopes"` }
type UpdateArtistInput ¶
type UpdateArtistInput struct { Id uint `path:"id"` Body ArtistInfo }
type UpdateAssociations ¶
type UpdateAssociations struct{}
type UpdateAuthorInput ¶
type UpdateAuthorInput struct { Id uint `path:"id"` Body AuthorInfo }
type UpdateKaraInput ¶
type UpdateMediaInput ¶
type UploadData ¶
type UploadFontInput ¶
type UploadFontInput struct {
File UploadTempFile
}
func (*UploadFontInput) Resolve ¶
func (i *UploadFontInput) Resolve(ctx huma.Context) []error
type UploadFontInputDefinition ¶
type UploadFontInputDefinition struct {
RawBody huma.MultipartFormFiles[UploadData]
}
type UploadFontOutput ¶
type UploadFontOutput struct { Body struct { Font Font `json:"font"` } }
func UploadFont ¶
func UploadFont(ctx context.Context, input *UploadFontInput) (*UploadFontOutput, error)
type UploadInfo ¶
type UploadInput ¶
type UploadInput struct { KID uint `path:"id" example:"1"` FileType string `path:"filetype" example:"video"` File UploadTempFile }
func (*UploadInput) Resolve ¶
func (i *UploadInput) Resolve(ctx huma.Context) []error
type UploadInputDefinition ¶
type UploadInputDefinition struct { KID uint `path:"id" example:"1"` FileType string `path:"filetype" example:"video"` RawBody huma.MultipartFormFiles[UploadData] }
type UploadOutput ¶
type UploadOutput struct { Body struct { KID uint `json:"file_id" example:"1" doc:"karaoke ID"` CheckResults CheckKaraOutput `json:"check_results"` } }
func UploadKaraFile ¶
func UploadKaraFile(ctx context.Context, input *UploadInput) (*UploadOutput, error)
type UploadTempFile ¶
type User ¶
type User struct { ID string `gorm:"primarykey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Admin bool TimingProfileID *uint TimingProfile *TimingAuthor `gorm:"foreignKey:TimingProfileID;references:ID"` }
Users
type VideoTagDB ¶
type VideoTagDB struct {
ID string
}
type VideoTagsOutput ¶
type VideoTagsOutput struct {
Body []VideoTag `json:"video_tags"`
}
func GetVideoTags ¶
func GetVideoTags(ctx context.Context, input *struct{}) (*VideoTagsOutput, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.