Versions in this module Expand all Collapse all v1 v1.1.4 Feb 10, 2024 v1.1.3 Feb 10, 2024 v1.1.2 Dec 27, 2022 v1.1.1 Dec 27, 2022 v1.1.0 Dec 27, 2022 Changes in this version + var ProjectRootPattern = regexp.MustCompile("^(.*go-discogs).*") + func GetProjectRoot() string + func GetScriptFolderName() string + func GetScriptPath() string + func ReadScript() (string, error) + func RunDDL(db *gorm.DB) error + type Runner struct + func (*Runner) Run(ctx context.Context, config *koanf.Koanf) error type XmlMasterRelation + DataQuality *string + Title *string + Year *int16 + func (m *XmlMasterRelation) GetGenres() []*model.Genre + func (m *XmlMasterRelation) GetMaster() *model.Master + func (m *XmlMasterRelation) GetStyles() []*model.Style type XmlRelease + MasterInfo XmlReleaseMasterInfo + type XmlReleaseMasterInfo struct + IsMaster bool + MasterID *int32 type XmlReleaseRelation + Country *string + DataQuality *string + ListedReleaseDate *string + MasterInfo XmlReleaseMasterInfo + Notes *string + Status *string + Title *string + func (r *XmlReleaseRelation) GetGenres() []*model.Genre + func (r *XmlReleaseRelation) GetRelease() *model.Release + func (r *XmlReleaseRelation) GetStyles() []*model.Style v1.0.1 Nov 30, 2022 v1.0.0 Nov 30, 2022 Changes in this version + var ArtistIDCache = &sync.Map + var GenreCache = &sync.Map + var LabelIDCache = &sync.Map + var MasterIDCache = &sync.Map + var NewWriter = newWriter + var StyleCache = &sync.Map + func ExtractClause(i interface{}) clause.OnConflict + func InsertMaster(order Order) result.Result + func InsertMasterRelations(order Order) result.Result + func InsertSimple[F, T any](order Order, topic string, localName string) result.Result + func Transform(item rxgo.Item) rxgo.Observable + func UpdateGenreStyle(order Order, localName string) result.Result + func WriteMasterRelations(order Order, res chan result.Result, wg *sync.WaitGroup) func(i interface{}) + type Batch interface + UpdateArtist func(order Order) Step + UpdateLabel func(order Order) Step + UpdateMaster func(order Order) Step + UpdateRelease func(order Order) Step + func New() Batch + type Order interface + func NewOrder(ctx context.Context, chunkSize int, filepath string, db *gorm.DB) Order + type Step func() result.Result + func GetArtistStep(order Order) Step + func GetLabelStep(order Order) Step + func GetMasterStep(order Order) Step + func GetReleaseStep(order Order) Step + type Transformable interface + Transform func() rxgo.Observable + type Writer interface + Write func(chunkSize int, items ...interface{}) result.Result + type XmlArtist struct + DataQuality *string + ID int32 + Name *string + Profile *string + RealName *string + func (a *XmlArtist) Transform() rxgo.Observable + type XmlArtistRelation struct + Aliases []XmlRef + Groups []XmlRef + ID int32 + NameVars []string + Urls []string + func (a *XmlArtistRelation) GetAliases() []*model.ArtistAlias + func (a *XmlArtistRelation) GetGroups() []*model.ArtistGroup + func (a *XmlArtistRelation) GetNameVars() []*model.ArtistNameVariation + func (a *XmlArtistRelation) GetUrls() []*model.ArtistURL + type XmlContract struct + Content string + ResourceUrl string + type XmlCreditedArtist struct + ArtistID int32 + Role string + type XmlFormat struct + Descriptions []string + Name *string + Quantity *int32 + Text *string + type XmlGenreStyle struct + Genres []string + Styles []string + type XmlIdentifier struct + Desc string + Typ string + Value string + type XmlIsMaster struct + IsMaster bool + type XmlLabel struct + ContactInfo *string + DataQuality *string + ID int32 + Name *string + Profile *string + func (l *XmlLabel) Transform() rxgo.Observable + type XmlLabelRelation struct + ID int32 + ParentLabel *XmlRef + Urls []string + func (l *XmlLabelRelation) GetParentID() *int32 + func (l *XmlLabelRelation) GetUrls() []*model.LabelURL + type XmlLabelRelease struct + CategoryNotation string + LabelID int32 + type XmlMaster struct + DataQuality *string + ID int32 + Title *string + Year *int16 + func (m *XmlMaster) Transform() rxgo.Observable + type XmlMasterRelation struct + Artists []int32 + Genres []string + ID int32 + Styles []string + Videos []XmlVideo + func (m *XmlMasterRelation) GetMasterArtists() []*model.MasterArtist + func (m *XmlMasterRelation) GetMasterGenres() []*model.MasterGenre + func (m *XmlMasterRelation) GetMasterStyles() []*model.MasterStyle + func (m *XmlMasterRelation) GetMasterVideos() []*model.MasterVideo + type XmlRef struct + ID int32 + Name string + type XmlRelease struct + Country *string + DataQuality *string + ID int32 + IsMaster XmlIsMaster + ListedReleaseDate *string + Notes *string + Status *string + Title *string + func (m *XmlRelease) Transform() rxgo.Observable + type XmlReleaseRelation struct + Artists []int32 + Contracts []XmlContract + CreditedArtists []XmlCreditedArtist + Formats []XmlFormat + Genres []string + ID int32 + Identifiers []XmlIdentifier + Labels []XmlLabelRelease + MasterID int32 + Styles []string + Tracks []XmlTrack + Videos []XmlVideo + func (r *XmlReleaseRelation) GetContracts() []*model.ReleaseContract + func (r *XmlReleaseRelation) GetCreditedArtists() []*model.ReleaseCreditedArtist + func (r *XmlReleaseRelation) GetFormats() []*model.ReleaseFormat + func (r *XmlReleaseRelation) GetIdentifiers() []*model.ReleaseIdentifier + func (r *XmlReleaseRelation) GetLabels() []*model.LabelRelease + func (r *XmlReleaseRelation) GetMasterReleases() []*model.MasterMainRelease + func (r *XmlReleaseRelation) GetReleaseArtists() []*model.ReleaseArtist + func (r *XmlReleaseRelation) GetReleaseGenres() []*model.ReleaseGenre + func (r *XmlReleaseRelation) GetReleaseStyles() []*model.ReleaseStyle + func (r *XmlReleaseRelation) GetTracks() []*model.ReleaseTrack + func (r *XmlReleaseRelation) GetVideos() []*model.ReleaseVideo + type XmlTrack struct + Duration string + Position string + Title string + type XmlVideo struct + Description *string + Title *string + URL string