Documentation ¶
Overview ¶
Package mock_database is a generated GoMock package.
Index ¶
- type Interface
- type MockInterface
- func (m *MockInterface) Connect() error
- func (m *MockInterface) Disconnect() error
- func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder
- func (m *MockInterface) GetAgenciesByUF(uf string) ([]models.Agency, error)
- func (m *MockInterface) GetAgenciesCount() (int, error)
- func (m *MockInterface) GetAgency(aid string) (*models.Agency, error)
- func (m *MockInterface) GetAllAgencies() ([]models.Agency, error)
- func (m *MockInterface) GetAllAgencyCollection(agency string) ([]models.AgencyMonthlyInfo, error)
- func (m *MockInterface) GetAnnualSummary(agency string) ([]models.AnnualSummary, error)
- func (m *MockInterface) GetFirstDateWithMonthlyInfo() (int, int, error)
- func (m *MockInterface) GetGeneralMonthlyInfo() (float64, error)
- func (m *MockInterface) GetGeneralMonthlyInfosFromYear(year int) ([]models.GeneralMonthlyInfo, error)
- func (m *MockInterface) GetIndexInformation(name string, month, year int) (map[string][]models.IndexInformation, error)
- func (m *MockInterface) GetLastDateWithMonthlyInfo() (int, int, error)
- func (m *MockInterface) GetMonthlyInfo(agencies []models.Agency, year int) (map[string][]models.AgencyMonthlyInfo, error)
- func (m *MockInterface) GetNumberOfMonthsCollected() (int, error)
- func (m *MockInterface) GetOMA(month, year int, agency string) (*models.AgencyMonthlyInfo, *models.Agency, error)
- func (m *MockInterface) GetOPJ(group string) ([]models.Agency, error)
- func (m *MockInterface) GetPaycheckItems(agency models.Agency, year int) ([]models.PaycheckItem, error)
- func (m *MockInterface) GetPaychecks(agency models.Agency, year int) ([]models.Paycheck, error)
- func (m *MockInterface) GetStateAgencies(uf string) ([]models.Agency, error)
- func (m *MockInterface) Store(agmi models.AgencyMonthlyInfo) error
- func (m *MockInterface) StorePaychecks(p []models.Paycheck, r []models.PaycheckItem) error
- func (m *MockInterface) StoreRemunerations(remu models.Remunerations) error
- type MockInterfaceMockRecorder
- func (mr *MockInterfaceMockRecorder) Connect() *gomock.Call
- func (mr *MockInterfaceMockRecorder) Disconnect() *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetAgenciesByUF(uf interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetAgenciesCount() *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetAgency(aid interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetAllAgencies() *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetAllAgencyCollection(agency interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetAnnualSummary(agency interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetFirstDateWithMonthlyInfo() *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetGeneralMonthlyInfo() *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetGeneralMonthlyInfosFromYear(year interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetIndexInformation(name, month, year interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetLastDateWithMonthlyInfo() *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetMonthlyInfo(agencies, year interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetNumberOfMonthsCollected() *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetOMA(month, year, agency interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetOPJ(group interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetPaycheckItems(agency, year interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetPaychecks(agency, year interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) GetStateAgencies(uf interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) Store(agmi interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) StorePaychecks(p, r interface{}) *gomock.Call
- func (mr *MockInterfaceMockRecorder) StoreRemunerations(remu interface{}) *gomock.Call
- type PostgresDB
- func (p *PostgresDB) Connect() error
- func (p *PostgresDB) Disconnect() error
- func (p *PostgresDB) GetAgenciesByUF(uf string) ([]models.Agency, error)
- func (p *PostgresDB) GetAgenciesCount() (int, error)
- func (p *PostgresDB) GetAgency(aid string) (*models.Agency, error)
- func (p *PostgresDB) GetAllAgencies() ([]models.Agency, error)
- func (p *PostgresDB) GetAllAgencyCollection(agency string) ([]models.AgencyMonthlyInfo, error)
- func (p *PostgresDB) GetAnnualSummary(agency string) ([]models.AnnualSummary, error)
- func (p *PostgresDB) GetConnection() (*gorm.DB, error)
- func (p *PostgresDB) GetFirstDateWithMonthlyInfo() (int, int, error)
- func (p *PostgresDB) GetGeneralMonthlyInfo() (float64, error)
- func (p *PostgresDB) GetGeneralMonthlyInfosFromYear(year int) ([]models.GeneralMonthlyInfo, error)
- func (p *PostgresDB) GetIndexInformation(name string, month, year int) (map[string][]models.IndexInformation, error)
- func (p *PostgresDB) GetLastDateWithMonthlyInfo() (int, int, error)
- func (p *PostgresDB) GetMonthlyInfo(agencies []models.Agency, year int) (map[string][]models.AgencyMonthlyInfo, error)
- func (p *PostgresDB) GetNumberOfMonthsCollected() (int, error)
- func (p *PostgresDB) GetOMA(month int, year int, agency string) (*models.AgencyMonthlyInfo, *models.Agency, error)
- func (p *PostgresDB) GetOPJ(group string) ([]models.Agency, error)
- func (p *PostgresDB) GetPaycheckItems(agency models.Agency, year int) ([]models.PaycheckItem, error)
- func (p *PostgresDB) GetPaychecks(agency models.Agency, year int) ([]models.Paycheck, error)
- func (p *PostgresDB) GetStateAgencies(uf string) ([]models.Agency, error)
- func (p *PostgresDB) SetConnection(conn *gorm.DB)
- func (p *PostgresDB) Store(agmi models.AgencyMonthlyInfo) error
- func (p *PostgresDB) StorePaychecks(paychecks []models.Paycheck, remunerations []models.PaycheckItem) error
- func (p *PostgresDB) StoreRemunerations(remu models.Remunerations) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { Connect() error Disconnect() error Store(agmi models.AgencyMonthlyInfo) error // StorePaychecks: armazena dados nas tabelas 'contracheques' e 'remuneracoes' StorePaychecks(p []models.Paycheck, r []models.PaycheckItem) error // StoreRemunerations: armazena dados dos zips de remunerações que estão no S3. StoreRemunerations(remu models.Remunerations) error GetStateAgencies(uf string) ([]models.Agency, error) // OPJ: Órgãos por jurisdição. GetOPJ(group string) ([]models.Agency, error) GetNumberOfMonthsCollected() (int, error) GetAgenciesCount() (int, error) GetAgenciesByUF(uf string) ([]models.Agency, error) GetAgency(aid string) (*models.Agency, error) GetAllAgencies() ([]models.Agency, error) GetMonthlyInfo(agencies []models.Agency, year int) (map[string][]models.AgencyMonthlyInfo, error) GetAnnualSummary(agency string) ([]models.AnnualSummary, error) // OMA: Órgão Mês Ano GetOMA(month int, year int, agency string) (*models.AgencyMonthlyInfo, *models.Agency, error) GetGeneralMonthlyInfosFromYear(year int) ([]models.GeneralMonthlyInfo, error) GetFirstDateWithMonthlyInfo() (int, int, error) GetLastDateWithMonthlyInfo() (int, int, error) GetGeneralMonthlyInfo() (float64, error) GetIndexInformation(name string, month, year int) (map[string][]models.IndexInformation, error) GetAllAgencyCollection(agency string) ([]models.AgencyMonthlyInfo, error) GetPaychecks(agency models.Agency, year int) ([]models.Paycheck, error) GetPaycheckItems(agency models.Agency, year int) ([]models.PaycheckItem, error) }
type MockInterface ¶
type MockInterface struct {
// contains filtered or unexported fields
}
MockInterface is a mock of Interface interface.
func NewMockInterface ¶
func NewMockInterface(ctrl *gomock.Controller) *MockInterface
NewMockInterface creates a new mock instance.
func (*MockInterface) Disconnect ¶
func (m *MockInterface) Disconnect() error
Disconnect mocks base method.
func (*MockInterface) EXPECT ¶
func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockInterface) GetAgenciesByUF ¶
func (m *MockInterface) GetAgenciesByUF(uf string) ([]models.Agency, error)
GetAgenciesByUF mocks base method.
func (*MockInterface) GetAgenciesCount ¶
func (m *MockInterface) GetAgenciesCount() (int, error)
GetAgenciesCount mocks base method.
func (*MockInterface) GetAgency ¶
func (m *MockInterface) GetAgency(aid string) (*models.Agency, error)
GetAgency mocks base method.
func (*MockInterface) GetAllAgencies ¶
func (m *MockInterface) GetAllAgencies() ([]models.Agency, error)
GetAllAgencies mocks base method.
func (*MockInterface) GetAllAgencyCollection ¶
func (m *MockInterface) GetAllAgencyCollection(agency string) ([]models.AgencyMonthlyInfo, error)
GetAllAgencyCollection mocks base method.
func (*MockInterface) GetAnnualSummary ¶
func (m *MockInterface) GetAnnualSummary(agency string) ([]models.AnnualSummary, error)
GetAnnualSummary mocks base method.
func (*MockInterface) GetFirstDateWithMonthlyInfo ¶
func (m *MockInterface) GetFirstDateWithMonthlyInfo() (int, int, error)
GetFirstDateWithMonthlyInfo mocks base method.
func (*MockInterface) GetGeneralMonthlyInfo ¶
func (m *MockInterface) GetGeneralMonthlyInfo() (float64, error)
GetGeneralMonthlyInfo mocks base method.
func (*MockInterface) GetGeneralMonthlyInfosFromYear ¶
func (m *MockInterface) GetGeneralMonthlyInfosFromYear(year int) ([]models.GeneralMonthlyInfo, error)
GetGeneralMonthlyInfosFromYear mocks base method.
func (*MockInterface) GetIndexInformation ¶
func (m *MockInterface) GetIndexInformation(name string, month, year int) (map[string][]models.IndexInformation, error)
GetIndexInformation mocks base method.
func (*MockInterface) GetLastDateWithMonthlyInfo ¶
func (m *MockInterface) GetLastDateWithMonthlyInfo() (int, int, error)
GetLastDateWithMonthlyInfo mocks base method.
func (*MockInterface) GetMonthlyInfo ¶
func (m *MockInterface) GetMonthlyInfo(agencies []models.Agency, year int) (map[string][]models.AgencyMonthlyInfo, error)
GetMonthlyInfo mocks base method.
func (*MockInterface) GetNumberOfMonthsCollected ¶
func (m *MockInterface) GetNumberOfMonthsCollected() (int, error)
GetNumberOfMonthsCollected mocks base method.
func (*MockInterface) GetOMA ¶
func (m *MockInterface) GetOMA(month, year int, agency string) (*models.AgencyMonthlyInfo, *models.Agency, error)
GetOMA mocks base method.
func (*MockInterface) GetOPJ ¶
func (m *MockInterface) GetOPJ(group string) ([]models.Agency, error)
GetOPJ mocks base method.
func (*MockInterface) GetPaycheckItems ¶
func (m *MockInterface) GetPaycheckItems(agency models.Agency, year int) ([]models.PaycheckItem, error)
GetPaycheckItems mocks base method.
func (*MockInterface) GetPaychecks ¶
GetPaychecks mocks base method.
func (*MockInterface) GetStateAgencies ¶
func (m *MockInterface) GetStateAgencies(uf string) ([]models.Agency, error)
GetStateAgencies mocks base method.
func (*MockInterface) Store ¶
func (m *MockInterface) Store(agmi models.AgencyMonthlyInfo) error
Store mocks base method.
func (*MockInterface) StorePaychecks ¶
func (m *MockInterface) StorePaychecks(p []models.Paycheck, r []models.PaycheckItem) error
StorePaychecks mocks base method.
func (*MockInterface) StoreRemunerations ¶
func (m *MockInterface) StoreRemunerations(remu models.Remunerations) error
StoreRemunerations mocks base method.
type MockInterfaceMockRecorder ¶
type MockInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockInterfaceMockRecorder is the mock recorder for MockInterface.
func (*MockInterfaceMockRecorder) Connect ¶
func (mr *MockInterfaceMockRecorder) Connect() *gomock.Call
Connect indicates an expected call of Connect.
func (*MockInterfaceMockRecorder) Disconnect ¶
func (mr *MockInterfaceMockRecorder) Disconnect() *gomock.Call
Disconnect indicates an expected call of Disconnect.
func (*MockInterfaceMockRecorder) GetAgenciesByUF ¶
func (mr *MockInterfaceMockRecorder) GetAgenciesByUF(uf interface{}) *gomock.Call
GetAgenciesByUF indicates an expected call of GetAgenciesByUF.
func (*MockInterfaceMockRecorder) GetAgenciesCount ¶
func (mr *MockInterfaceMockRecorder) GetAgenciesCount() *gomock.Call
GetAgenciesCount indicates an expected call of GetAgenciesCount.
func (*MockInterfaceMockRecorder) GetAgency ¶
func (mr *MockInterfaceMockRecorder) GetAgency(aid interface{}) *gomock.Call
GetAgency indicates an expected call of GetAgency.
func (*MockInterfaceMockRecorder) GetAllAgencies ¶
func (mr *MockInterfaceMockRecorder) GetAllAgencies() *gomock.Call
GetAllAgencies indicates an expected call of GetAllAgencies.
func (*MockInterfaceMockRecorder) GetAllAgencyCollection ¶
func (mr *MockInterfaceMockRecorder) GetAllAgencyCollection(agency interface{}) *gomock.Call
GetAllAgencyCollection indicates an expected call of GetAllAgencyCollection.
func (*MockInterfaceMockRecorder) GetAnnualSummary ¶
func (mr *MockInterfaceMockRecorder) GetAnnualSummary(agency interface{}) *gomock.Call
GetAnnualSummary indicates an expected call of GetAnnualSummary.
func (*MockInterfaceMockRecorder) GetFirstDateWithMonthlyInfo ¶
func (mr *MockInterfaceMockRecorder) GetFirstDateWithMonthlyInfo() *gomock.Call
GetFirstDateWithMonthlyInfo indicates an expected call of GetFirstDateWithMonthlyInfo.
func (*MockInterfaceMockRecorder) GetGeneralMonthlyInfo ¶
func (mr *MockInterfaceMockRecorder) GetGeneralMonthlyInfo() *gomock.Call
GetGeneralMonthlyInfo indicates an expected call of GetGeneralMonthlyInfo.
func (*MockInterfaceMockRecorder) GetGeneralMonthlyInfosFromYear ¶
func (mr *MockInterfaceMockRecorder) GetGeneralMonthlyInfosFromYear(year interface{}) *gomock.Call
GetGeneralMonthlyInfosFromYear indicates an expected call of GetGeneralMonthlyInfosFromYear.
func (*MockInterfaceMockRecorder) GetIndexInformation ¶
func (mr *MockInterfaceMockRecorder) GetIndexInformation(name, month, year interface{}) *gomock.Call
GetIndexInformation indicates an expected call of GetIndexInformation.
func (*MockInterfaceMockRecorder) GetLastDateWithMonthlyInfo ¶
func (mr *MockInterfaceMockRecorder) GetLastDateWithMonthlyInfo() *gomock.Call
GetLastDateWithMonthlyInfo indicates an expected call of GetLastDateWithMonthlyInfo.
func (*MockInterfaceMockRecorder) GetMonthlyInfo ¶
func (mr *MockInterfaceMockRecorder) GetMonthlyInfo(agencies, year interface{}) *gomock.Call
GetMonthlyInfo indicates an expected call of GetMonthlyInfo.
func (*MockInterfaceMockRecorder) GetNumberOfMonthsCollected ¶
func (mr *MockInterfaceMockRecorder) GetNumberOfMonthsCollected() *gomock.Call
GetNumberOfMonthsCollected indicates an expected call of GetNumberOfMonthsCollected.
func (*MockInterfaceMockRecorder) GetOMA ¶
func (mr *MockInterfaceMockRecorder) GetOMA(month, year, agency interface{}) *gomock.Call
GetOMA indicates an expected call of GetOMA.
func (*MockInterfaceMockRecorder) GetOPJ ¶
func (mr *MockInterfaceMockRecorder) GetOPJ(group interface{}) *gomock.Call
GetOPJ indicates an expected call of GetOPJ.
func (*MockInterfaceMockRecorder) GetPaycheckItems ¶
func (mr *MockInterfaceMockRecorder) GetPaycheckItems(agency, year interface{}) *gomock.Call
GetPaycheckItems indicates an expected call of GetPaycheckItems.
func (*MockInterfaceMockRecorder) GetPaychecks ¶
func (mr *MockInterfaceMockRecorder) GetPaychecks(agency, year interface{}) *gomock.Call
GetPaychecks indicates an expected call of GetPaychecks.
func (*MockInterfaceMockRecorder) GetStateAgencies ¶
func (mr *MockInterfaceMockRecorder) GetStateAgencies(uf interface{}) *gomock.Call
GetStateAgencies indicates an expected call of GetStateAgencies.
func (*MockInterfaceMockRecorder) Store ¶
func (mr *MockInterfaceMockRecorder) Store(agmi interface{}) *gomock.Call
Store indicates an expected call of Store.
func (*MockInterfaceMockRecorder) StorePaychecks ¶
func (mr *MockInterfaceMockRecorder) StorePaychecks(p, r interface{}) *gomock.Call
StorePaychecks indicates an expected call of StorePaychecks.
func (*MockInterfaceMockRecorder) StoreRemunerations ¶
func (mr *MockInterfaceMockRecorder) StoreRemunerations(remu interface{}) *gomock.Call
StoreRemunerations indicates an expected call of StoreRemunerations.
type PostgresDB ¶
type PostgresDB struct {
// contains filtered or unexported fields
}
func NewPostgresDB ¶
func NewPostgresDB(user, password, dbName, host, port string) (*PostgresDB, error)
func (*PostgresDB) Connect ¶
func (p *PostgresDB) Connect() error
func (*PostgresDB) Disconnect ¶
func (p *PostgresDB) Disconnect() error
func (*PostgresDB) GetAgenciesByUF ¶
func (p *PostgresDB) GetAgenciesByUF(uf string) ([]models.Agency, error)
func (*PostgresDB) GetAgenciesCount ¶
func (p *PostgresDB) GetAgenciesCount() (int, error)
func (*PostgresDB) GetAllAgencies ¶
func (p *PostgresDB) GetAllAgencies() ([]models.Agency, error)
func (*PostgresDB) GetAllAgencyCollection ¶
func (p *PostgresDB) GetAllAgencyCollection(agency string) ([]models.AgencyMonthlyInfo, error)
func (*PostgresDB) GetAnnualSummary ¶
func (p *PostgresDB) GetAnnualSummary(agency string) ([]models.AnnualSummary, error)
func (*PostgresDB) GetConnection ¶
func (p *PostgresDB) GetConnection() (*gorm.DB, error)
func (*PostgresDB) GetFirstDateWithMonthlyInfo ¶
func (p *PostgresDB) GetFirstDateWithMonthlyInfo() (int, int, error)
func (*PostgresDB) GetGeneralMonthlyInfo ¶
func (p *PostgresDB) GetGeneralMonthlyInfo() (float64, error)
func (*PostgresDB) GetGeneralMonthlyInfosFromYear ¶
func (p *PostgresDB) GetGeneralMonthlyInfosFromYear(year int) ([]models.GeneralMonthlyInfo, error)
func (*PostgresDB) GetIndexInformation ¶
func (p *PostgresDB) GetIndexInformation(name string, month, year int) (map[string][]models.IndexInformation, error)
func (*PostgresDB) GetLastDateWithMonthlyInfo ¶
func (p *PostgresDB) GetLastDateWithMonthlyInfo() (int, int, error)
func (*PostgresDB) GetMonthlyInfo ¶
func (p *PostgresDB) GetMonthlyInfo(agencies []models.Agency, year int) (map[string][]models.AgencyMonthlyInfo, error)
func (*PostgresDB) GetNumberOfMonthsCollected ¶
func (p *PostgresDB) GetNumberOfMonthsCollected() (int, error)
func (*PostgresDB) GetOMA ¶
func (p *PostgresDB) GetOMA(month int, year int, agency string) (*models.AgencyMonthlyInfo, *models.Agency, error)
func (*PostgresDB) GetPaycheckItems ¶
func (p *PostgresDB) GetPaycheckItems(agency models.Agency, year int) ([]models.PaycheckItem, error)
func (*PostgresDB) GetPaychecks ¶
func (*PostgresDB) GetStateAgencies ¶
func (p *PostgresDB) GetStateAgencies(uf string) ([]models.Agency, error)
func (*PostgresDB) SetConnection ¶
func (p *PostgresDB) SetConnection(conn *gorm.DB)
func (*PostgresDB) Store ¶
func (p *PostgresDB) Store(agmi models.AgencyMonthlyInfo) error
func (*PostgresDB) StorePaychecks ¶
func (p *PostgresDB) StorePaychecks(paychecks []models.Paycheck, remunerations []models.PaycheckItem) error
func (*PostgresDB) StoreRemunerations ¶
func (p *PostgresDB) StoreRemunerations(remu models.Remunerations) error