schema

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 0 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package schema is the responses of the AcoustID API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artist

type Artist struct {
	ID         string `json:"id"`
	Name       string `json:"name,omitempty"`
	JoinPhrase string `json:"joinphrase,omitempty"`
}

Artist is a MusicBrainz artist, with the phrase which joins it to the next artist, such as " & "

type Date

type Date struct {
	Year  int `json:"year,omitempty"`
	Month int `json:"month,omitempty"`
	Day   int `json:"day,omitempty"`
}

Date is the date of a release, whose month and day are zero when they aren't known

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

Error is the error of a response, when its status isn't ok

type LookupResponse

type LookupResponse struct {
	Status  string   `json:"status"`
	Error   Error    `json:"error"`
	Results []Result `json:"results"`
}

LookupResponse is the response of a lookup of a fingerprint, which is the tracks which it matches, or an error

type Medium

type Medium struct {
	Format     string  `json:"format,omitempty"`
	Position   int     `json:"position,omitempty"`
	Title      string  `json:"title,omitempty"`
	TrackCount int     `json:"track_count,omitempty"`
	Tracks     []Track `json:"tracks,omitempty"`
}

Medium is a medium of a release, such as a CD, with its position, and the recording's tracks on it

type Recording

type Recording struct {
	ID            string         `json:"id"`
	Title         string         `json:"title,omitempty"`
	Duration      float64        `json:"duration,omitempty"`
	Artists       []Artist       `json:"artists,omitempty"`
	ReleaseGroups []ReleaseGroup `json:"releasegroups,omitempty"`
	Releases      []Release      `json:"releases,omitempty"`
	Sources       int            `json:"sources,omitempty"`
}

Recording is a MusicBrainz recording of a track, with its title, duration in seconds, artists, and the release groups and releases it's on, which are returned when they're requested

type Release

type Release struct {
	ID          string   `json:"id"`
	Title       string   `json:"title,omitempty"`
	Country     string   `json:"country,omitempty"`
	Date        *Date    `json:"date,omitempty"`
	TrackCount  int      `json:"track_count,omitempty"`
	MediumCount int      `json:"medium_count,omitempty"`
	Artists     []Artist `json:"artists,omitempty"`
	Mediums     []Medium `json:"mediums,omitempty"`
}

Release is a MusicBrainz release, with its mediums, which have the recording's tracks

type ReleaseGroup

type ReleaseGroup struct {
	ID             string    `json:"id"`
	Type           string    `json:"type,omitempty"`
	SecondaryTypes []string  `json:"secondarytypes,omitempty"`
	Title          string    `json:"title,omitempty"`
	Artists        []Artist  `json:"artists,omitempty"`
	Releases       []Release `json:"releases,omitempty"`
}

ReleaseGroup is a MusicBrainz release group, such as an album, with its type, such as Album or Single, and its secondary types, such as Compilation

type Result

type Result struct {
	ID         string      `json:"id"`
	Score      float64     `json:"score"`
	Recordings []Recording `json:"recordings,omitempty"`
}

Result is an AcoustID track which a fingerprint matches, by its identifier, how well it matches, from 0 to 1, and its recordings, which are returned when they're requested

type Track

type Track struct {
	ID       string   `json:"id"`
	Title    string   `json:"title,omitempty"`
	Position int      `json:"position,omitempty"`
	Artists  []Artist `json:"artists,omitempty"`
}

Track is a track of a medium, with its position on it

Jump to

Keyboard shortcuts

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