Documentation
¶
Index ¶
- Constants
- func DeleteFiles(config config.Config, fileIds []int) error
- func HasLyrics(config config.Config, songId int) (bool, bool, error)
- func HealthCheck(config config.Config) error
- func PostIllustration(config config.Config, trackId int, imageType IllustrationType, ...) error
- func PostLyrics(config config.Config, songId int, plainLyrics internal.PlainLyrics, ...) error
- type File
- type FileDeletionDto
- type FileSelectorDto
- type IllustrationType
- type Library
- type LyricsDto
- type MetadataCreated
- type Page
- type PageMetadata
- type SaveMetadataMethod
- type User
Constants ¶
View Source
const JsonContentType = "application/json"
Variables ¶
This section is empty.
Functions ¶
func HealthCheck ¶
func PostIllustration ¶
func PostLyrics ¶
func PostLyrics(config config.Config, songId int, plainLyrics internal.PlainLyrics, syncedLyrics *internal.SyncedLyrics) error
Types ¶
type File ¶
type File struct { Id int `json:"id" validate:"required"` Path string `json:"path" validate:"required"` Checksum string `json:"checksum" validate:"required"` LibraryId int `json:"libraryId" validate:"required"` }
func GetAllFiles ¶
func GetAllFiles(selector FileSelectorDto, config config.Config) ([]File, error)
type FileDeletionDto ¶
type FileDeletionDto struct {
FileIds []int `json:"ids"`
}
type FileSelectorDto ¶
Do not change names of fields, they are mapped 1:1 with the query parameters of the requests
type IllustrationType ¶
type IllustrationType string
const ( Cover IllustrationType = "Cover" Thumbnail IllustrationType = "Thumbnail" )
type Library ¶
type LyricsDto ¶
type LyricsDto struct { Plain string `json:"plain"` Synced *(internal.SyncedLyrics) `json:"synced"` }
type MetadataCreated ¶
type MetadataCreated struct { TrackId int `json:"trackId" validate:"required"` SongId int `json:"songId"` }
func SaveMetadata ¶
func SaveMetadata(config config.Config, m internal.Metadata, saveMethod SaveMetadataMethod) (MetadataCreated, error)
type Page ¶
type Page[T any] struct { Items []T `validate:"required,dive,required" json:"items"` Metadata PageMetadata `json:"metadata"` }
type PageMetadata ¶
type SaveMetadataMethod ¶
type SaveMetadataMethod string
const ( Update SaveMetadataMethod = "Update" Create SaveMetadataMethod = "Create" )
Click to show internal directories.
Click to hide internal directories.