Documentation ¶
Index ¶
- Constants
- type Artist
- type Batch
- type BatchedReport
- type Release
- type Report
- type Retailer
- type SKU
- type VinylDB
- func (v *VinylDB) AddNewBatch(tx *postgres.Tx, numRequiredSearches int, ...) (batchId int64, err error)
- func (v *VinylDB) AddSKUToReportsForBatch(tx *postgres.Tx, batchId int64, sku *SKU) error
- func (v *VinylDB) CloseTransaction(tx *postgres.Tx, err error) error
- func (v *VinylDB) DeleteBatch(tx *postgres.Tx, batchId int64) error
- func (v *VinylDB) DeleteReport(tx *postgres.Tx, reportId int64) error
- func (v *VinylDB) DeleteReportsForBatch(tx *postgres.Tx, batchId int64) error
- func (v *VinylDB) GetAllArtists(tx *postgres.Tx) ([]Artist, error)
- func (v *VinylDB) GetAllCompletedUnsentReports(tx *postgres.Tx) ([]BatchedReport, error)
- func (v *VinylDB) GetAllRetailers(tx *postgres.Tx) ([]Retailer, error)
- func (v *VinylDB) GetAllSKUs(tx *postgres.Tx, artistId *int64, retailerId *int64) ([]SKU, error)
- func (v *VinylDB) GetCurrentSKUForRelease(tx *postgres.Tx, releaseID int64, retailerID int64) (*SKU, error)
- func (v *VinylDB) GetSkusForReport(tx *postgres.Tx, reportId int64) ([]retailers.SKU, error)
- func (v *VinylDB) GetWatchedArtists(tx *postgres.Tx) (map[int64][]WatchedArtist, error)
- func (v *VinylDB) IncrementBatchSearchCompletedCount(tx *postgres.Tx, batchId int64) error
- func (v *VinylDB) MarkBatchReported(tx *postgres.Tx, batchId int64) error
- func (v *VinylDB) MarkReportSent(tx *postgres.Tx, reportId int64) error
- func (v *VinylDB) Q(tx *postgres.Tx) postgres.Querier
- func (v *VinylDB) StartTransaction() (*postgres.Tx, error)
- func (v *VinylDB) UpdateSKU(tx *postgres.Tx, sku *SKU) error
- func (v *VinylDB) UpsertRelease(tx *postgres.Tx, artistId int64, title string) (id int64, err error)
- func (v *VinylDB) UpsertSKU(tx *postgres.Tx, sku *SKU) (same bool, err error)
- func (v *VinylDB) VerifySchema() error
- func (v *VinylDB) WaitForDbUp(timeoutSecs int64) error
- type VinylDS
- type VinylDSMock
- func (mock *VinylDSMock) AddNewBatch(tx *postgres.Tx, numRequiredSearches int, ...) (int64, error)
- func (mock *VinylDSMock) AddNewBatchCalls() []struct{ ... }
- func (mock *VinylDSMock) AddSKUToReportsForBatch(tx *postgres.Tx, batchId int64, sku *SKU) error
- func (mock *VinylDSMock) AddSKUToReportsForBatchCalls() []struct{ ... }
- func (mock *VinylDSMock) CloseTransaction(tx *postgres.Tx, err error) error
- func (mock *VinylDSMock) CloseTransactionCalls() []struct{ ... }
- func (mock *VinylDSMock) DeleteBatch(tx *postgres.Tx, batchId int64) error
- func (mock *VinylDSMock) DeleteBatchCalls() []struct{ ... }
- func (mock *VinylDSMock) DeleteReport(tx *postgres.Tx, reportId int64) error
- func (mock *VinylDSMock) DeleteReportCalls() []struct{ ... }
- func (mock *VinylDSMock) DeleteReportsForBatch(tx *postgres.Tx, batchId int64) error
- func (mock *VinylDSMock) DeleteReportsForBatchCalls() []struct{ ... }
- func (mock *VinylDSMock) GetAllArtists(tx *postgres.Tx) ([]Artist, error)
- func (mock *VinylDSMock) GetAllArtistsCalls() []struct{ ... }
- func (mock *VinylDSMock) GetAllCompletedUnsentReports(tx *postgres.Tx) ([]BatchedReport, error)
- func (mock *VinylDSMock) GetAllCompletedUnsentReportsCalls() []struct{ ... }
- func (mock *VinylDSMock) GetAllRetailers(tx *postgres.Tx) ([]Retailer, error)
- func (mock *VinylDSMock) GetAllRetailersCalls() []struct{ ... }
- func (mock *VinylDSMock) GetAllSKUs(tx *postgres.Tx, artistId *int64, retailerId *int64) ([]SKU, error)
- func (mock *VinylDSMock) GetAllSKUsCalls() []struct{ ... }
- func (mock *VinylDSMock) GetCurrentSKUForRelease(tx *postgres.Tx, releaseID int64, retailerID int64) (*SKU, error)
- func (mock *VinylDSMock) GetCurrentSKUForReleaseCalls() []struct{ ... }
- func (mock *VinylDSMock) GetSkusForReport(tx *postgres.Tx, reportId int64) ([]retailers.SKU, error)
- func (mock *VinylDSMock) GetSkusForReportCalls() []struct{ ... }
- func (mock *VinylDSMock) GetWatchedArtists(tx *postgres.Tx) (map[int64][]WatchedArtist, error)
- func (mock *VinylDSMock) GetWatchedArtistsCalls() []struct{ ... }
- func (mock *VinylDSMock) IncrementBatchSearchCompletedCount(tx *postgres.Tx, batchId int64) error
- func (mock *VinylDSMock) IncrementBatchSearchCompletedCountCalls() []struct{ ... }
- func (mock *VinylDSMock) MarkBatchReported(tx *postgres.Tx, batchId int64) error
- func (mock *VinylDSMock) MarkBatchReportedCalls() []struct{ ... }
- func (mock *VinylDSMock) MarkReportSent(tx *postgres.Tx, reportId int64) error
- func (mock *VinylDSMock) MarkReportSentCalls() []struct{ ... }
- func (mock *VinylDSMock) Q(tx *postgres.Tx) postgres.Querier
- func (mock *VinylDSMock) QCalls() []struct{ ... }
- func (mock *VinylDSMock) StartTransaction() (*postgres.Tx, error)
- func (mock *VinylDSMock) StartTransactionCalls() []struct{}
- func (mock *VinylDSMock) UpdateSKU(tx *postgres.Tx, sku *SKU) error
- func (mock *VinylDSMock) UpdateSKUCalls() []struct{ ... }
- func (mock *VinylDSMock) UpsertRelease(tx *postgres.Tx, artistId int64, title string) (int64, error)
- func (mock *VinylDSMock) UpsertReleaseCalls() []struct{ ... }
- func (mock *VinylDSMock) UpsertSKU(tx *postgres.Tx, sku *SKU) (bool, error)
- func (mock *VinylDSMock) UpsertSKUCalls() []struct{ ... }
- func (mock *VinylDSMock) VerifySchema() error
- func (mock *VinylDSMock) VerifySchemaCalls() []struct{}
- func (mock *VinylDSMock) WaitForDbUp(timeoutSecs int64) error
- func (mock *VinylDSMock) WaitForDbUpCalls() []struct{ ... }
- type WatchedArtist
Constants ¶
const (
DB_WAIT_DELAY_MSECS = 500
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artist ¶
type Artist struct { ID int64 `db:"id" json:"id"` Name string `db:"name" json:"name"` ImageUrl string `db:"image_url" json:"imageUrl"` WebsiteUrl string `db:"website_url" json:"websiteUrl"` Variants []string `db:"variants" json:"variants"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
type Batch ¶
type Batch struct { ID int64 `db:"id" json:"id"` NumRequiredSearches int `db:"req_searches" json:"numRequiredSearches"` NumCompletedSearches int `db:"completed_searches" json:"numCompletedSearches"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` ReportedAt time.Time `db:"reported_at" json:"reportedAt"` }
type BatchedReport ¶
type Report ¶
type Report struct { ID int64 `db:"id" json:"id"` UserID int64 `db:"user_id" json:"userId"` BatchID int64 `db:"batch_id" json:"batchId"` CreatedAt time.Time `db:"created_at" json:"createdAt"` UpdatedAt time.Time `db:"updated_at"` CompletedAt null.Time `db:"completed_at" json:"completedAt"` SentAt null.Time `db:"sent_at" json:"sentAt"` }
type SKU ¶
type SKU struct { ID int64 `db:"id" json:"id"` Name string `json:"name"` ReleaseID int64 `db:"release_id" json:"releaseId"` RetailerID int64 `db:"retailer_id" json:"retailerId"` ArtistID int64 `db:"artist_id" json:"artistId"` ItemUrl string `db:"item_url" json:"itemUrl"` ImageUrl string `db:"image_url" json:"imageUrl"` Price string `db:"price" json:"price"` CreatedAt time.Time `db:"created_at" json:"createdAt"` }
type VinylDB ¶
type VinylDB struct {
// contains filtered or unexported fields
}
func (*VinylDB) AddNewBatch ¶
func (v *VinylDB) AddNewBatch(tx *postgres.Tx, numRequiredSearches int, userArtists map[int64][]WatchedArtist) (batchId int64, err error)
AddNewBatch Create a new batch instance, representing one full set of scans to be completed over the set of users currently watching a set of artists. This batch instance will have a set of empty reports connected to it, one per watching user, and each such report will cover the set of artists currently being watched by the user for whom the report pertains. The batch also stores the required number of searches to be performed (artist x retailer) so that we can keep track of whether a batch has been completed or not.
func (*VinylDB) AddSKUToReportsForBatch ¶
AddSKUToReportsForBatch Given a particular SKU sound for an artist + retailer, this method looks at all the reports attached to the current batch, determines if the SKU artist is covered by the report, and if so attaches the SKU to the final report. We assume that it has already been determined whether the SKU represents a valid result for the report (for example the price has changed).
func (*VinylDB) CloseTransaction ¶
func (*VinylDB) DeleteReport ¶
func (*VinylDB) DeleteReportsForBatch ¶
func (*VinylDB) GetAllCompletedUnsentReports ¶
func (v *VinylDB) GetAllCompletedUnsentReports(tx *postgres.Tx) ([]BatchedReport, error)
func (*VinylDB) GetAllRetailers ¶
func (*VinylDB) GetAllSKUs ¶
func (*VinylDB) GetCurrentSKUForRelease ¶
func (*VinylDB) GetSkusForReport ¶
func (*VinylDB) GetWatchedArtists ¶
func (*VinylDB) IncrementBatchSearchCompletedCount ¶
IncrementBatchSearchCompletedCount When scanning is complete for a specific artist + retailer, this method allows the scanner to increment the number of scans completed that is stored against the batch. We use UPDATE here as an atomic operation on the batches table and as such this method will be thread-safe in terms of getting all increments.
func (*VinylDB) MarkBatchReported ¶
func (*VinylDB) MarkReportSent ¶
func (*VinylDB) UpsertRelease ¶
func (*VinylDB) VerifySchema ¶
func (*VinylDB) WaitForDbUp ¶
type VinylDS ¶
type VinylDS interface { // // AddNewBatch // Create a new batch instance, representing one full set of scans to be completed over the set of users // currently watching a set of artists. This batch instance will have a set of empty reports connected to // it, one per watching user, and each such report will cover the set of artists currently being watched // by the user for whom the report pertains. The batch also stores the required number of searches to be // performed (artist x retailer) so that we can keep track of whether a batch has been completed or not. // AddNewBatch(tx *postgres.Tx, numRequiredSearches int, userArtists map[int64][]WatchedArtist) (batchId int64, err error) // // AddSKUToReportsForBatch // Given a particular SKU sound for an artist + retailer, this method looks at all the reports attached to the // current batch, determines if the SKU artist is covered by the report, and if so attaches the SKU to the final // report. We assume that it has already been determined whether the SKU represents a valid result for the report // (for example the price has changed). // AddSKUToReportsForBatch(tx *postgres.Tx, batchId int64, sku *SKU) error CloseTransaction(tx *postgres.Tx, err error) error DeleteBatch(tx *postgres.Tx, batchId int64) error DeleteReport(tx *postgres.Tx, reportId int64) error DeleteReportsForBatch(tx *postgres.Tx, batchId int64) error GetAllArtists(tx *postgres.Tx) ([]Artist, error) GetAllCompletedUnsentReports(tx *postgres.Tx) ([]BatchedReport, error) GetAllRetailers(tx *postgres.Tx) ([]Retailer, error) GetAllSKUs(tx *postgres.Tx, artistId *int64, retailerId *int64) ([]SKU, error) GetCurrentSKUForRelease(tx *postgres.Tx, releaseID int64, retailerID int64) (*SKU, error) GetSkusForReport(tx *postgres.Tx, reportId int64) ([]retailers.SKU, error) GetWatchedArtists(tx *postgres.Tx) (map[int64][]WatchedArtist, error) // // IncrementBatchSearchCompletedCount // When scanning is complete for a specific artist + retailer, this method allows the scanner to increment // the number of scans completed that is stored against the batch. We use UPDATE here as an atomic operation // on the batches table and as such this method will be thread-safe in terms of getting all increments. // IncrementBatchSearchCompletedCount(tx *postgres.Tx, batchId int64) error MarkBatchReported(tx *postgres.Tx, batchId int64) error MarkReportSent(tx *postgres.Tx, reportId int64) error Q(tx *postgres.Tx) postgres.Querier StartTransaction() (*postgres.Tx, error) UpdateSKU(tx *postgres.Tx, sku *SKU) error UpsertRelease(tx *postgres.Tx, artistId int64, title string) (id int64, err error) UpsertSKU(tx *postgres.Tx, sku *SKU) (same bool, err error) VerifySchema() error WaitForDbUp(timeoutSecs int64) error }
VinylDS ...
type VinylDSMock ¶
type VinylDSMock struct { // AddNewBatchFunc mocks the AddNewBatch method. AddNewBatchFunc func(tx *postgres.Tx, numRequiredSearches int, userArtists map[int64][]WatchedArtist) (int64, error) // AddSKUToReportsForBatchFunc mocks the AddSKUToReportsForBatch method. AddSKUToReportsForBatchFunc func(tx *postgres.Tx, batchId int64, sku *SKU) error // CloseTransactionFunc mocks the CloseTransaction method. CloseTransactionFunc func(tx *postgres.Tx, err error) error // DeleteBatchFunc mocks the DeleteBatch method. DeleteBatchFunc func(tx *postgres.Tx, batchId int64) error // DeleteReportFunc mocks the DeleteReport method. DeleteReportFunc func(tx *postgres.Tx, reportId int64) error // DeleteReportsForBatchFunc mocks the DeleteReportsForBatch method. DeleteReportsForBatchFunc func(tx *postgres.Tx, batchId int64) error // GetAllArtistsFunc mocks the GetAllArtists method. GetAllArtistsFunc func(tx *postgres.Tx) ([]Artist, error) // GetAllCompletedUnsentReportsFunc mocks the GetAllCompletedUnsentReports method. GetAllCompletedUnsentReportsFunc func(tx *postgres.Tx) ([]BatchedReport, error) // GetAllRetailersFunc mocks the GetAllRetailers method. GetAllRetailersFunc func(tx *postgres.Tx) ([]Retailer, error) // GetAllSKUsFunc mocks the GetAllSKUs method. GetAllSKUsFunc func(tx *postgres.Tx, artistId *int64, retailerId *int64) ([]SKU, error) // GetCurrentSKUForReleaseFunc mocks the GetCurrentSKUForRelease method. GetCurrentSKUForReleaseFunc func(tx *postgres.Tx, releaseID int64, retailerID int64) (*SKU, error) // GetSkusForReportFunc mocks the GetSkusForReport method. GetSkusForReportFunc func(tx *postgres.Tx, reportId int64) ([]retailers.SKU, error) // GetWatchedArtistsFunc mocks the GetWatchedArtists method. GetWatchedArtistsFunc func(tx *postgres.Tx) (map[int64][]WatchedArtist, error) // IncrementBatchSearchCompletedCountFunc mocks the IncrementBatchSearchCompletedCount method. IncrementBatchSearchCompletedCountFunc func(tx *postgres.Tx, batchId int64) error // MarkBatchReportedFunc mocks the MarkBatchReported method. MarkBatchReportedFunc func(tx *postgres.Tx, batchId int64) error // MarkReportSentFunc mocks the MarkReportSent method. MarkReportSentFunc func(tx *postgres.Tx, reportId int64) error // QFunc mocks the Q method. QFunc func(tx *postgres.Tx) postgres.Querier // StartTransactionFunc mocks the StartTransaction method. StartTransactionFunc func() (*postgres.Tx, error) // UpdateSKUFunc mocks the UpdateSKU method. UpdateSKUFunc func(tx *postgres.Tx, sku *SKU) error // UpsertReleaseFunc mocks the UpsertRelease method. UpsertReleaseFunc func(tx *postgres.Tx, artistId int64, title string) (int64, error) // UpsertSKUFunc mocks the UpsertSKU method. UpsertSKUFunc func(tx *postgres.Tx, sku *SKU) (bool, error) // VerifySchemaFunc mocks the VerifySchema method. VerifySchemaFunc func() error // WaitForDbUpFunc mocks the WaitForDbUp method. WaitForDbUpFunc func(timeoutSecs int64) error // contains filtered or unexported fields }
VinylDSMock is a mock implementation of VinylDS.
func TestSomethingThatUsesVinylDS(t *testing.T) { // make and configure a mocked VinylDS mockedVinylDS := &VinylDSMock{ AddNewBatchFunc: func(tx *postgres.Tx, numRequiredSearches int, userArtists map[int64][]WatchedArtist) (int64, error) { panic("mock out the AddNewBatch method") }, AddSKUToReportsForBatchFunc: func(tx *postgres.Tx, batchId int64, sku *SKU) error { panic("mock out the AddSKUToReportsForBatch method") }, CloseTransactionFunc: func(tx *postgres.Tx, err error) error { panic("mock out the CloseTransaction method") }, DeleteBatchFunc: func(tx *postgres.Tx, batchId int64) error { panic("mock out the DeleteBatch method") }, DeleteReportFunc: func(tx *postgres.Tx, reportId int64) error { panic("mock out the DeleteReport method") }, DeleteReportsForBatchFunc: func(tx *postgres.Tx, batchId int64) error { panic("mock out the DeleteReportsForBatch method") }, GetAllArtistsFunc: func(tx *postgres.Tx) ([]Artist, error) { panic("mock out the GetAllArtists method") }, GetAllCompletedUnsentReportsFunc: func(tx *postgres.Tx) ([]BatchedReport, error) { panic("mock out the GetAllCompletedUnsentReports method") }, GetAllRetailersFunc: func(tx *postgres.Tx) ([]Retailer, error) { panic("mock out the GetAllRetailers method") }, GetAllSKUsFunc: func(tx *postgres.Tx, artistId *int64, retailerId *int64) ([]SKU, error) { panic("mock out the GetAllSKUs method") }, GetCurrentSKUForReleaseFunc: func(tx *postgres.Tx, releaseID int64, retailerID int64) (*SKU, error) { panic("mock out the GetCurrentSKUForRelease method") }, GetSkusForReportFunc: func(tx *postgres.Tx, reportId int64) ([]retailers.SKU, error) { panic("mock out the GetSkusForReport method") }, GetWatchedArtistsFunc: func(tx *postgres.Tx) (map[int64][]WatchedArtist, error) { panic("mock out the GetWatchedArtists method") }, IncrementBatchSearchCompletedCountFunc: func(tx *postgres.Tx, batchId int64) error { panic("mock out the IncrementBatchSearchCompletedCount method") }, MarkBatchReportedFunc: func(tx *postgres.Tx, batchId int64) error { panic("mock out the MarkBatchReported method") }, MarkReportSentFunc: func(tx *postgres.Tx, reportId int64) error { panic("mock out the MarkReportSent method") }, QFunc: func(tx *postgres.Tx) postgres.Querier { panic("mock out the Q method") }, StartTransactionFunc: func() (*postgres.Tx, error) { panic("mock out the StartTransaction method") }, UpdateSKUFunc: func(tx *postgres.Tx, sku *SKU) error { panic("mock out the UpdateSKU method") }, UpsertReleaseFunc: func(tx *postgres.Tx, artistId int64, title string) (int64, error) { panic("mock out the UpsertRelease method") }, UpsertSKUFunc: func(tx *postgres.Tx, sku *SKU) (bool, error) { panic("mock out the UpsertSKU method") }, VerifySchemaFunc: func() error { panic("mock out the VerifySchema method") }, WaitForDbUpFunc: func(timeoutSecs int64) error { panic("mock out the WaitForDbUp method") }, } // use mockedVinylDS in code that requires VinylDS // and then make assertions. }
func (*VinylDSMock) AddNewBatch ¶
func (mock *VinylDSMock) AddNewBatch(tx *postgres.Tx, numRequiredSearches int, userArtists map[int64][]WatchedArtist) (int64, error)
AddNewBatch calls AddNewBatchFunc.
func (*VinylDSMock) AddNewBatchCalls ¶
func (mock *VinylDSMock) AddNewBatchCalls() []struct { Tx *postgres.Tx NumRequiredSearches int UserArtists map[int64][]WatchedArtist }
AddNewBatchCalls gets all the calls that were made to AddNewBatch. Check the length with:
len(mockedVinylDS.AddNewBatchCalls())
func (*VinylDSMock) AddSKUToReportsForBatch ¶
AddSKUToReportsForBatch calls AddSKUToReportsForBatchFunc.
func (*VinylDSMock) AddSKUToReportsForBatchCalls ¶
func (mock *VinylDSMock) AddSKUToReportsForBatchCalls() []struct { Tx *postgres.Tx BatchId int64 Sku *SKU }
AddSKUToReportsForBatchCalls gets all the calls that were made to AddSKUToReportsForBatch. Check the length with:
len(mockedVinylDS.AddSKUToReportsForBatchCalls())
func (*VinylDSMock) CloseTransaction ¶
func (mock *VinylDSMock) CloseTransaction(tx *postgres.Tx, err error) error
CloseTransaction calls CloseTransactionFunc.
func (*VinylDSMock) CloseTransactionCalls ¶
func (mock *VinylDSMock) CloseTransactionCalls() []struct { Tx *postgres.Tx Err error }
CloseTransactionCalls gets all the calls that were made to CloseTransaction. Check the length with:
len(mockedVinylDS.CloseTransactionCalls())
func (*VinylDSMock) DeleteBatch ¶
func (mock *VinylDSMock) DeleteBatch(tx *postgres.Tx, batchId int64) error
DeleteBatch calls DeleteBatchFunc.
func (*VinylDSMock) DeleteBatchCalls ¶
func (mock *VinylDSMock) DeleteBatchCalls() []struct { Tx *postgres.Tx BatchId int64 }
DeleteBatchCalls gets all the calls that were made to DeleteBatch. Check the length with:
len(mockedVinylDS.DeleteBatchCalls())
func (*VinylDSMock) DeleteReport ¶
func (mock *VinylDSMock) DeleteReport(tx *postgres.Tx, reportId int64) error
DeleteReport calls DeleteReportFunc.
func (*VinylDSMock) DeleteReportCalls ¶
func (mock *VinylDSMock) DeleteReportCalls() []struct { Tx *postgres.Tx ReportId int64 }
DeleteReportCalls gets all the calls that were made to DeleteReport. Check the length with:
len(mockedVinylDS.DeleteReportCalls())
func (*VinylDSMock) DeleteReportsForBatch ¶
func (mock *VinylDSMock) DeleteReportsForBatch(tx *postgres.Tx, batchId int64) error
DeleteReportsForBatch calls DeleteReportsForBatchFunc.
func (*VinylDSMock) DeleteReportsForBatchCalls ¶
func (mock *VinylDSMock) DeleteReportsForBatchCalls() []struct { Tx *postgres.Tx BatchId int64 }
DeleteReportsForBatchCalls gets all the calls that were made to DeleteReportsForBatch. Check the length with:
len(mockedVinylDS.DeleteReportsForBatchCalls())
func (*VinylDSMock) GetAllArtists ¶
func (mock *VinylDSMock) GetAllArtists(tx *postgres.Tx) ([]Artist, error)
GetAllArtists calls GetAllArtistsFunc.
func (*VinylDSMock) GetAllArtistsCalls ¶
func (mock *VinylDSMock) GetAllArtistsCalls() []struct { Tx *postgres.Tx }
GetAllArtistsCalls gets all the calls that were made to GetAllArtists. Check the length with:
len(mockedVinylDS.GetAllArtistsCalls())
func (*VinylDSMock) GetAllCompletedUnsentReports ¶
func (mock *VinylDSMock) GetAllCompletedUnsentReports(tx *postgres.Tx) ([]BatchedReport, error)
GetAllCompletedUnsentReports calls GetAllCompletedUnsentReportsFunc.
func (*VinylDSMock) GetAllCompletedUnsentReportsCalls ¶
func (mock *VinylDSMock) GetAllCompletedUnsentReportsCalls() []struct { Tx *postgres.Tx }
GetAllCompletedUnsentReportsCalls gets all the calls that were made to GetAllCompletedUnsentReports. Check the length with:
len(mockedVinylDS.GetAllCompletedUnsentReportsCalls())
func (*VinylDSMock) GetAllRetailers ¶
func (mock *VinylDSMock) GetAllRetailers(tx *postgres.Tx) ([]Retailer, error)
GetAllRetailers calls GetAllRetailersFunc.
func (*VinylDSMock) GetAllRetailersCalls ¶
func (mock *VinylDSMock) GetAllRetailersCalls() []struct { Tx *postgres.Tx }
GetAllRetailersCalls gets all the calls that were made to GetAllRetailers. Check the length with:
len(mockedVinylDS.GetAllRetailersCalls())
func (*VinylDSMock) GetAllSKUs ¶
func (mock *VinylDSMock) GetAllSKUs(tx *postgres.Tx, artistId *int64, retailerId *int64) ([]SKU, error)
GetAllSKUs calls GetAllSKUsFunc.
func (*VinylDSMock) GetAllSKUsCalls ¶
func (mock *VinylDSMock) GetAllSKUsCalls() []struct { Tx *postgres.Tx ArtistId *int64 RetailerId *int64 }
GetAllSKUsCalls gets all the calls that were made to GetAllSKUs. Check the length with:
len(mockedVinylDS.GetAllSKUsCalls())
func (*VinylDSMock) GetCurrentSKUForRelease ¶
func (mock *VinylDSMock) GetCurrentSKUForRelease(tx *postgres.Tx, releaseID int64, retailerID int64) (*SKU, error)
GetCurrentSKUForRelease calls GetCurrentSKUForReleaseFunc.
func (*VinylDSMock) GetCurrentSKUForReleaseCalls ¶
func (mock *VinylDSMock) GetCurrentSKUForReleaseCalls() []struct { Tx *postgres.Tx ReleaseID int64 RetailerID int64 }
GetCurrentSKUForReleaseCalls gets all the calls that were made to GetCurrentSKUForRelease. Check the length with:
len(mockedVinylDS.GetCurrentSKUForReleaseCalls())
func (*VinylDSMock) GetSkusForReport ¶
GetSkusForReport calls GetSkusForReportFunc.
func (*VinylDSMock) GetSkusForReportCalls ¶
func (mock *VinylDSMock) GetSkusForReportCalls() []struct { Tx *postgres.Tx ReportId int64 }
GetSkusForReportCalls gets all the calls that were made to GetSkusForReport. Check the length with:
len(mockedVinylDS.GetSkusForReportCalls())
func (*VinylDSMock) GetWatchedArtists ¶
func (mock *VinylDSMock) GetWatchedArtists(tx *postgres.Tx) (map[int64][]WatchedArtist, error)
GetWatchedArtists calls GetWatchedArtistsFunc.
func (*VinylDSMock) GetWatchedArtistsCalls ¶
func (mock *VinylDSMock) GetWatchedArtistsCalls() []struct { Tx *postgres.Tx }
GetWatchedArtistsCalls gets all the calls that were made to GetWatchedArtists. Check the length with:
len(mockedVinylDS.GetWatchedArtistsCalls())
func (*VinylDSMock) IncrementBatchSearchCompletedCount ¶
func (mock *VinylDSMock) IncrementBatchSearchCompletedCount(tx *postgres.Tx, batchId int64) error
IncrementBatchSearchCompletedCount calls IncrementBatchSearchCompletedCountFunc.
func (*VinylDSMock) IncrementBatchSearchCompletedCountCalls ¶
func (mock *VinylDSMock) IncrementBatchSearchCompletedCountCalls() []struct { Tx *postgres.Tx BatchId int64 }
IncrementBatchSearchCompletedCountCalls gets all the calls that were made to IncrementBatchSearchCompletedCount. Check the length with:
len(mockedVinylDS.IncrementBatchSearchCompletedCountCalls())
func (*VinylDSMock) MarkBatchReported ¶
func (mock *VinylDSMock) MarkBatchReported(tx *postgres.Tx, batchId int64) error
MarkBatchReported calls MarkBatchReportedFunc.
func (*VinylDSMock) MarkBatchReportedCalls ¶
func (mock *VinylDSMock) MarkBatchReportedCalls() []struct { Tx *postgres.Tx BatchId int64 }
MarkBatchReportedCalls gets all the calls that were made to MarkBatchReported. Check the length with:
len(mockedVinylDS.MarkBatchReportedCalls())
func (*VinylDSMock) MarkReportSent ¶
func (mock *VinylDSMock) MarkReportSent(tx *postgres.Tx, reportId int64) error
MarkReportSent calls MarkReportSentFunc.
func (*VinylDSMock) MarkReportSentCalls ¶
func (mock *VinylDSMock) MarkReportSentCalls() []struct { Tx *postgres.Tx ReportId int64 }
MarkReportSentCalls gets all the calls that were made to MarkReportSent. Check the length with:
len(mockedVinylDS.MarkReportSentCalls())
func (*VinylDSMock) QCalls ¶
func (mock *VinylDSMock) QCalls() []struct { Tx *postgres.Tx }
QCalls gets all the calls that were made to Q. Check the length with:
len(mockedVinylDS.QCalls())
func (*VinylDSMock) StartTransaction ¶
func (mock *VinylDSMock) StartTransaction() (*postgres.Tx, error)
StartTransaction calls StartTransactionFunc.
func (*VinylDSMock) StartTransactionCalls ¶
func (mock *VinylDSMock) StartTransactionCalls() []struct { }
StartTransactionCalls gets all the calls that were made to StartTransaction. Check the length with:
len(mockedVinylDS.StartTransactionCalls())
func (*VinylDSMock) UpdateSKU ¶
func (mock *VinylDSMock) UpdateSKU(tx *postgres.Tx, sku *SKU) error
UpdateSKU calls UpdateSKUFunc.
func (*VinylDSMock) UpdateSKUCalls ¶
func (mock *VinylDSMock) UpdateSKUCalls() []struct { Tx *postgres.Tx Sku *SKU }
UpdateSKUCalls gets all the calls that were made to UpdateSKU. Check the length with:
len(mockedVinylDS.UpdateSKUCalls())
func (*VinylDSMock) UpsertRelease ¶
func (mock *VinylDSMock) UpsertRelease(tx *postgres.Tx, artistId int64, title string) (int64, error)
UpsertRelease calls UpsertReleaseFunc.
func (*VinylDSMock) UpsertReleaseCalls ¶
func (mock *VinylDSMock) UpsertReleaseCalls() []struct { Tx *postgres.Tx ArtistId int64 Title string }
UpsertReleaseCalls gets all the calls that were made to UpsertRelease. Check the length with:
len(mockedVinylDS.UpsertReleaseCalls())
func (*VinylDSMock) UpsertSKUCalls ¶
func (mock *VinylDSMock) UpsertSKUCalls() []struct { Tx *postgres.Tx Sku *SKU }
UpsertSKUCalls gets all the calls that were made to UpsertSKU. Check the length with:
len(mockedVinylDS.UpsertSKUCalls())
func (*VinylDSMock) VerifySchema ¶
func (mock *VinylDSMock) VerifySchema() error
VerifySchema calls VerifySchemaFunc.
func (*VinylDSMock) VerifySchemaCalls ¶
func (mock *VinylDSMock) VerifySchemaCalls() []struct { }
VerifySchemaCalls gets all the calls that were made to VerifySchema. Check the length with:
len(mockedVinylDS.VerifySchemaCalls())
func (*VinylDSMock) WaitForDbUp ¶
func (mock *VinylDSMock) WaitForDbUp(timeoutSecs int64) error
WaitForDbUp calls WaitForDbUpFunc.
func (*VinylDSMock) WaitForDbUpCalls ¶
func (mock *VinylDSMock) WaitForDbUpCalls() []struct { TimeoutSecs int64 }
WaitForDbUpCalls gets all the calls that were made to WaitForDbUp. Check the length with:
len(mockedVinylDS.WaitForDbUpCalls())