services

package
v0.0.0-...-0e87cb9 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAlbum

func AddAlbum(name string, artistId uint64) (*model.Album, error)

func AddArtist

func AddArtist(name string) (*model.Artist, error)

func AddPlaylist

func AddPlaylist(name string, status uint64, userId uint64) (model.Playlist, error)

func AddSong

func AddSong(name string, albumId uint64, artistIds []uint64, hash string) (*model.Song, error)

func AddSongPlaylist

func AddSongPlaylist(playlistId uint64, songIds []uint64, user *model.User) error

func AddUser

func AddUser(nickname string, username string, password string) (*model.User, error)

func AlbumNews

func AlbumNews(pageSize int, page int) ([]model.Album, error)

func ArtistByID

func ArtistByID(id uint64) (*model.Artist, error)

func CheckAlbum

func CheckAlbum(name string) (*model.Album, bool)

func CheckArtist

func CheckArtist(name string) (*model.Artist, bool)

func CheckSong

func CheckSong(name string, albumId uint64) (*model.Song, bool)

CheckSong 用歌曲名、歌曲专辑名检测歌曲唯一性

func CheckUserName

func CheckUserName(username string) bool

func DelAlbum

func DelAlbum(id uint64) error

func DelArtist

func DelArtist(id uint64) error

func DelPlaylist

func DelPlaylist(id uint64, user *model.User) error

func DelSong

func DelSong(id uint64) error

func DelUser

func DelUser(id uint64) error

func GetAllUsers

func GetAllUsers(pageSize int, page int) ([]model.User, int64, error)

func GetSongInfo

func GetSongInfo(song model.Song) model.SongInfo

func GetSongInfos

func GetSongInfos(songs []model.Song) []model.SongInfo

func Login

func Login(username string, password string) (*model.User, error)

func PlaylistSongs

func PlaylistSongs(playlistId uint64) ([]model.Song, error)

func RecommendPlaylists

func RecommendPlaylists() ([]model.Playlist, error)

func RecommendSongs

func RecommendSongs() ([]model.Song, error)

func RemoveAdmin

func RemoveAdmin(userid uint64) error

func SearchAlbum

func SearchAlbum(name string, pageSize int, page int) ([]model.Album, int64, error)

func SearchArtist

func SearchArtist(name string, pageSize int, page int) ([]model.Artist, int64, error)

func SearchPlaylist

func SearchPlaylist(name string, pageSize int, page int, user *model.User) ([]model.Playlist, int64, error)

func SearchSong

func SearchSong(name string, pageSize int, page int) ([]model.Song, int64, error)

func SearchUsers

func SearchUsers(name string, pageSize int, page int) ([]model.User, int64, error)

func SetAdminUser

func SetAdminUser(userid uint64) error

func SongById

func SongById(id uint64) (*model.Song, error)

func SongNews

func SongNews(pageSize int, page int) ([]model.Song, error)

func UpdatePassword

func UpdatePassword(id uint64, password string) error

func UpdateUser

func UpdateUser(id uint64, nickname string, signature string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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