database

package
v0.0.0-...-e766170 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 13 Imported by: 1

Documentation

Overview

Package mock_database is a generated GoMock package.

Index

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) Connect

func (m *MockInterface) Connect() error

Connect mocks base method.

func (*MockInterface) Disconnect

func (m *MockInterface) Disconnect() error

Disconnect mocks base method.

func (*MockInterface) EXPECT

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

func (m *MockInterface) GetPaychecks(agency models.Agency, year int) ([]models.Paycheck, error)

GetPaychecks mocks base method.

func (*MockInterface) GetStateAgencies

func (m *MockInterface) GetStateAgencies(uf string) ([]models.Agency, error)

GetStateAgencies mocks base method.

func (*MockInterface) Store

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) GetAgency

func (p *PostgresDB) GetAgency(aid string) (*models.Agency, 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) GetOPJ

func (p *PostgresDB) GetOPJ(group string) ([]models.Agency, error)

func (*PostgresDB) GetPaycheckItems

func (p *PostgresDB) GetPaycheckItems(agency models.Agency, year int) ([]models.PaycheckItem, error)

func (*PostgresDB) GetPaychecks

func (p *PostgresDB) GetPaychecks(agency models.Agency, year int) ([]models.Paycheck, error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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