Documentation ¶
Index ¶
- Constants
- func AuthRequired(ctx *gin.Context)
- func CustomHeaders(ctx *gin.Context)
- func Endpoint2FA(ng *gin.Engine)
- func EndpointBasics(g *gin.Engine)
- func EndpointFavorite(ng *gin.Engine)
- func EndpointLyric(ng *gin.Engine)
- func EndpointMeta(ng *gin.Engine)
- func EndpointPlaylist(ng *gin.Engine)
- func EndpointSearch(ng *gin.Engine)
- func EndpointShare(ng *gin.Engine)
- func EndpointStat(ng *gin.Engine)
- func EndpointToken(ng *gin.Engine)
- func EndpointUser(ng *gin.Engine)
- func Start(listen string) error
- func TFARequired(ctx *gin.Context)
- type AlbumFavForm
- type AnnilShareClaims
- type AnnilTokenShareInfo
- type AnnilUserClaims
- type ChangePasswordForm
- type Cover
- type CreateShareForm
- type DeleteForm
- type Enable2FAForm
- type FavoriteMusicEntry
- type FavoritePlaylistEntry
- type FavoritePlaylistForm
- type HistoryRecord
- type LoginForm
- type LyricLanguage
- type LyricPatchForm
- type LyricResponse
- type PatchedPlaylistInfo
- type PlayRecordRes
- type PlaylistDetails
- type PlaylistForm
- type PlaylistInfo
- type PlaylistItem
- type PlaylistItemWithId
- type PlaylistPatchForm
- type PlaylistResult
- type RegisterForm
- type Response
- type SearchResult
- type ShareEntry
- type SiteInfo
- type SongPlayRecord
- type Token
- type TokenGrant
- type TokenPatch
- type TokenResponse
- type UserInfo
- type UserIntro
- type UserIntroForm
Constants ¶
View Source
const ControlledToken = 104002
View Source
const DbConnErr = 900001
View Source
const Illegal2FASecret = 202002
View Source
const IllegalParams = 902003
View Source
const InternalError = 900000
View Source
const InvalidInviteCode = 201001
View Source
const InvalidNickname = 102000
View Source
const InvalidPassword = 102010
View Source
const InvalidPatchCommand = 103003
View Source
const NicknameMaxLen = 20
View Source
const NotFound = 902000
View Source
const PermissionDenied = 902001
View Source
const ReadErr = 901001
View Source
const StatusOK = 0
View Source
const TFAAlreadyEnabled = 202004
View Source
const TFAAttemptLimited = 202003
View Source
const TFANotEnabled = 202000
View Source
const UserNotExist = 102020
View Source
const WriteErr = 901000
View Source
const Wrong2FACode = 202001
Variables ¶
This section is empty.
Functions ¶
func AuthRequired ¶
func CustomHeaders ¶
func Endpoint2FA ¶
func EndpointBasics ¶
func EndpointFavorite ¶
func EndpointLyric ¶
func EndpointMeta ¶
func EndpointPlaylist ¶
func EndpointSearch ¶
func EndpointShare ¶
func EndpointStat ¶
func EndpointToken ¶
func EndpointUser ¶
func TFARequired ¶
Types ¶
type AlbumFavForm ¶
type AlbumFavForm struct {
AlbumID string `json:"album_id"`
}
type AnnilShareClaims ¶
type AnnilShareClaims struct {}
type AnnilTokenShareInfo ¶
type AnnilTokenShareInfo struct {}
type AnnilUserClaims ¶
type ChangePasswordForm ¶
type CreateShareForm ¶
type CreateShareForm struct {}
type DeleteForm ¶
type DeleteForm struct {
ID string `json:"id"`
}
type Enable2FAForm ¶
type FavoriteMusicEntry ¶
type FavoritePlaylistEntry ¶
type FavoritePlaylistForm ¶
type FavoritePlaylistForm struct {
PlaylistID string `json:"playlist_id"`
}
type HistoryRecord ¶
type HistoryRecord struct { Track meta.TrackIdentifier `json:"track"` At int64 `json:"at"` }
type LyricLanguage ¶
type LyricPatchForm ¶
type LyricResponse ¶
type LyricResponse struct { Source LyricLanguage `json:"source"` Translations []LyricLanguage `json:"translations"` }
type PatchedPlaylistInfo ¶
type PlayRecordRes ¶
type PlayRecordRes struct { Track meta.TrackIdentifier `json:"track"` Total int64 `json:"count"` }
type PlaylistDetails ¶
type PlaylistDetails struct { PlaylistInfo Items []PlaylistItemWithId `json:"items"` }
type PlaylistForm ¶
type PlaylistForm struct { Name string `json:"name"` Description string `json:"description"` IsPublic bool `json:"is_public"` Cover Cover `json:"cover"` Items []PlaylistItem `json:"items"` }
type PlaylistInfo ¶
type PlaylistItem ¶
type PlaylistItemWithId ¶
type PlaylistItemWithId struct { PlaylistItem ID string `json:"id"` }
type PlaylistPatchForm ¶
type PlaylistResult ¶
type RegisterForm ¶
type SearchResult ¶
type SearchResult struct { Albums []meta.AlbumDetails `json:"albums,omitempty"` Tracks []meta.TrackInfoWithAlbum `json:"tracks,omitempty"` Playlists []PlaylistInfo `json:"playlists,omitempty"` }
type ShareEntry ¶
type ShareEntry struct {}
type SongPlayRecord ¶
type SongPlayRecord struct { Track meta.TrackIdentifier `json:"track"` At []int64 `json:"at"` }
type TokenGrant ¶
type TokenGrant struct { Claims AnnilShareClaims `json:"claims"` Secret string `json:"secret"` Server string `json:"server"` Kid string `json:"kid"` }
func (*TokenGrant) Grant ¶
func (grant *TokenGrant) Grant() (*meta.ExportedToken, error)
type TokenPatch ¶
type TokenResponse ¶
type UserIntroForm ¶
Click to show internal directories.
Click to hide internal directories.