Documentation ¶
Index ¶
- type Album
- func (r *Album) AddArtist(artist *AlbumArtist)
- func (r *Album) AddName(kind, name string)
- func (r *Album) AddTag(tag *Tag)
- func (r *Album) GetArtists() (artists []*AlbumArtist)
- func (r *Album) GetCover() *Resource
- func (r *Album) GetId() int
- func (r *Album) GetIdentifiers() []string
- func (r *Album) GetMetadata() (result map[string]interface{})
- func (r *Album) GetNames() map[string]string
- func (r *Album) GetTags() (tags []*Tag)
- func (r *Album) RemoveArtist(artist *AlbumArtist)
- func (r *Album) RemoveName(kind string)
- func (r *Album) RemoveTag(tag *Tag)
- func (r *Album) SetCover(resource *Resource)
- func (r *Album) SetIdentifiers(identifiers []string)
- func (r *Album) SetMetadata(value map[string]interface{})
- type AlbumArtist
- type Artist
- type Database
- type HashEntry
- type HashIdentifier
- type Release
- func GetReleaseFromDatabase(db *Database, id int64) *Release
- func GetReleaseFromRow(db *Database, row *sql.Rows) (*Release, error)
- func GetReleasesFromDatabaseByIdentifier(db *Database, identifier string) (releases []*Release)
- func InsertReleaseToDatabase(db *Database, identifiers []string) *Release
- type Resource
- func GetResourceFromDatabase(db *Database, id int64) *Resource
- func GetResourceFromDatabaseByHash(db *Database, hash ResourceHashIdentifier) *Resource
- func GetResourceFromDatabaseByPath(db *Database, pathEntry string) *Resource
- func GetResourceFromRow(db *Database, row *sql.Rows) (*Resource, error)
- func InsertResourceToDatabase(db *Database, hash ResourceHashIdentifier, size int64, path []byte, ...) *Resource
- func (r *Resource) AddRelease(release *Release)
- func (r *Resource) GetHash() ResourceHashIdentifier
- func (r *Resource) GetId() int64
- func (r *Resource) GetMime() string
- func (r *Resource) GetPath() []byte
- func (r *Resource) GetReleases() (releases []*Release)
- func (r *Resource) GetSize() int64
- func (r *Resource) SetMime(mime string)
- func (r *Resource) SetPath(path []byte)
- func (r *Resource) SetSize(size int64)
- type ResourceHashIdentifier
- type Song
- func (r *Song) AddArtist(artist *SongArtist)
- func (r *Song) AddName(kind, name string)
- func (r *Song) AddTag(tag *Tag)
- func (r *Song) GetAlbum() *Album
- func (r *Song) GetArtists() (artists []*SongArtist)
- func (r *Song) GetCover() *Resource
- func (r *Song) GetId() int64
- func (r *Song) GetMetadata() (result map[string]interface{})
- func (r *Song) GetNames() map[string]string
- func (r *Song) GetResource() *Resource
- func (r *Song) GetTags() (tags []*Tag)
- func (r *Song) RemoveArtist(artist *SongArtist)
- func (r *Song) RemoveName(kind string)
- func (r *Song) RemoveTag(tag *Tag)
- func (r *Song) SetAlbum(album *Album)
- func (r *Song) SetCover(resource *Resource)
- func (r *Song) SetMetadata(value map[string]interface{})
- type SongArtist
- type Tag
- func GetOrCreateTagFromDatabaseByName(db *Database, name string) (tag *Tag)
- func GetTagFromDatabase(db *Database, id int64) *Tag
- func GetTagFromDatabaseByName(db *Database, name string) *Tag
- func GetTagFromRow(db *Database, row *sql.Rows) (*Tag, error)
- func InsertTagToDatabase(db *Database, name string) *Tag
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct { Type // contains filtered or unexported fields }
func GetAlbumFromDatabase ¶
func InsertAlbumToDatabase ¶
func (*Album) AddArtist ¶
func (r *Album) AddArtist(artist *AlbumArtist)
func (*Album) GetArtists ¶
func (r *Album) GetArtists() (artists []*AlbumArtist)
func (*Album) GetIdentifiers ¶
func (*Album) GetMetadata ¶
func (*Album) RemoveArtist ¶
func (r *Album) RemoveArtist(artist *AlbumArtist)
func (*Album) RemoveName ¶
func (*Album) SetIdentifiers ¶
func (*Album) SetMetadata ¶
type AlbumArtist ¶
type AlbumArtist struct { Artist // contains filtered or unexported fields }
func GetAlbumArtistFromRow ¶
func GetAlbumArtistFromRow(db *Database, row *sql.Rows) (*AlbumArtist, error)
type Artist ¶
type Artist struct { Type // contains filtered or unexported fields }
func GetArtistFromDatabase ¶
func InsertArtistToDatabase ¶
func (*Artist) GetMetadata ¶
func (*Artist) RemoveName ¶
func (*Artist) SetMetadata ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func OpenDatabase ¶
type HashEntry ¶
type HashEntry struct { Value HashIdentifier Kind string }
type HashIdentifier ¶
type HashIdentifier multihash.DecodedMultihash
HashIdentifier Main identifier
func NewHashIdentifierFromMultihash ¶
func NewHashIdentifierFromMultihash(mh multihash.Multihash) *HashIdentifier
func (*HashIdentifier) CID ¶
func (i *HashIdentifier) CID() cid.Cid
func (*HashIdentifier) Encode ¶
func (i *HashIdentifier) Encode() []byte
func (*HashIdentifier) Equals ¶
func (i *HashIdentifier) Equals(o *HashIdentifier) bool
func (*HashIdentifier) Hash ¶
func (i *HashIdentifier) Hash() multihash.Multihash
func (*HashIdentifier) IsKey ¶
func (i *HashIdentifier) IsKey() bool
type Release ¶
type Release struct { Type // contains filtered or unexported fields }
func GetReleaseFromDatabase ¶
func InsertReleaseToDatabase ¶
func (*Release) GetIdentifiers ¶
func (*Release) GetMetadata ¶
func (*Release) SetIdentifiers ¶
func (*Release) SetMetadata ¶
type Resource ¶
type Resource struct { Type // contains filtered or unexported fields }
func GetResourceFromDatabase ¶
func GetResourceFromDatabaseByHash ¶
func GetResourceFromDatabaseByHash(db *Database, hash ResourceHashIdentifier) *Resource
func (*Resource) AddRelease ¶
func (*Resource) GetHash ¶
func (r *Resource) GetHash() ResourceHashIdentifier
func (*Resource) GetReleases ¶
type ResourceHashIdentifier ¶
func (ResourceHashIdentifier) ToBytes ¶
func (h ResourceHashIdentifier) ToBytes() []byte
type Song ¶
type Song struct { Type // contains filtered or unexported fields }
func GetSongFromDatabase ¶
func InsertSongToDatabase ¶
func (*Song) AddArtist ¶
func (r *Song) AddArtist(artist *SongArtist)
func (*Song) GetArtists ¶
func (r *Song) GetArtists() (artists []*SongArtist)
func (*Song) GetMetadata ¶
func (*Song) GetResource ¶
func (*Song) RemoveArtist ¶
func (r *Song) RemoveArtist(artist *SongArtist)
func (*Song) RemoveName ¶
func (*Song) SetMetadata ¶
type SongArtist ¶
type SongArtist struct { Artist // contains filtered or unexported fields }
func GetSongArtistFromRow ¶
func GetSongArtistFromRow(db *Database, row *sql.Rows) (*SongArtist, error)
type Tag ¶
type Tag struct { Type // contains filtered or unexported fields }
func GetTagFromDatabase ¶
func InsertTagToDatabase ¶
Click to show internal directories.
Click to hide internal directories.