common

package
v0.0.0-...-92b59c9 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProxyIp     = "127.0.0.1"
	ProxyDomain = map[string]string{
		"music.163.com":            "59.111.181.35",
		"interface.music.163.com":  "59.111.181.35",
		"interface3.music.163.com": "59.111.181.35",
		"apm.music.163.com":        "59.111.181.35",
		"apm3.music.163.com":       "59.111.181.35",
	}
	HostDomain = map[string]string{
		"music.163.com":           "59.111.181.35",
		"interface.music.163.com": "59.111.181.35",
	}
	Source []string
	Rand   = rand.New(
		rand.NewSource(time.Now().UnixNano()))
)

Functions

This section is empty.

Types

type MapType

type MapType = map[string]interface{}

type MusicQuality

type MusicQuality int32
const (
	Standard MusicQuality = iota
	Higher
	ExHigh
	Lossless
)

func (MusicQuality) String

func (m MusicQuality) String() string

type PlatformIdTag

type PlatformIdTag string
const (
	StartTag PlatformIdTag = "9000"
	KuWoTag  PlatformIdTag = "90000"
	MiGuTag  PlatformIdTag = "90001"
	KuGouTag PlatformIdTag = "90002"
	QQTag    PlatformIdTag = "90003"
)

type SearchMusic

type SearchMusic struct {
	Quality MusicQuality
	Id      string
}

type SearchOrderBy

type SearchOrderBy int32
const (
	MatchedScoreDesc SearchOrderBy = iota
	PlatformDefault
)

type SearchSong

type SearchSong struct {
	Keyword     string
	Name        string
	ArtistsName string
	Quality     MusicQuality
	OrderBy     SearchOrderBy
	Limit       int
	ArtistList  []string
}

type SliceType

type SliceType = []interface{}

type Song

type Song struct {
	Id                string
	Size              int64
	Br                int
	Url               string
	Md5               string
	Name              string
	Artist            string
	AlbumName         string
	MatchScore        float32
	Source            string
	PlatformUniqueKey MapType `json:"-"`
}

type SongSlice

type SongSlice []*Song

func (SongSlice) Len

func (a SongSlice) Len() int

func (SongSlice) Less

func (a SongSlice) Less(i, j int) bool

func (SongSlice) Swap

func (a SongSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

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