postgres

package
v0.0.0-...-41bf266 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: CC0-1.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlrRepository

type AlrRepository struct {
	*sql.DB
}

func NewAlrRepo

func NewAlrRepo(db *sql.DB) *AlrRepository

func (*AlrRepository) AddAlr

func (r *AlrRepository) AddAlr(ctx context.Context, aco string, timestamp time.Time, alrs []models.Alr) error

func (*AlrRepository) GetAlr

func (r *AlrRepository) GetAlr(ctx context.Context, metakey int64, MBIs []string) ([]*models.Alr, error)

type Repository

type Repository struct {
	database.Queryable
	database.Executable
}

func NewRepository

func NewRepository(db *sql.DB) *Repository

func NewRepositoryPgxTx

func NewRepositoryPgxTx(tx *pgx.Tx) *Repository

func NewRepositoryTx

func NewRepositoryTx(tx *sql.Tx) *Repository

func (*Repository) CreateACO

func (r *Repository) CreateACO(ctx context.Context, aco models.ACO) error

func (*Repository) CreateCCLFFile

func (r *Repository) CreateCCLFFile(ctx context.Context, cclfFile models.CCLFFile) (uint, error)

func (*Repository) CreateJob

func (r *Repository) CreateJob(ctx context.Context, j models.Job) (uint, error)

func (*Repository) CreateSuppression

func (r *Repository) CreateSuppression(ctx context.Context, suppression optout.OptOutRecord) error

func (*Repository) CreateSuppressionFile

func (r *Repository) CreateSuppressionFile(ctx context.Context, suppressionFile optout.OptOutFile) (uint, error)

func (*Repository) GetACOByCMSID

func (r *Repository) GetACOByCMSID(ctx context.Context, cmsID string) (*models.ACO, error)

func (*Repository) GetACOByClientID

func (r *Repository) GetACOByClientID(ctx context.Context, clientID string) (*models.ACO, error)

func (*Repository) GetACOByUUID

func (r *Repository) GetACOByUUID(ctx context.Context, uuid uuid.UUID) (*models.ACO, error)

func (*Repository) GetAlrMBIs

func (r *Repository) GetAlrMBIs(ctx context.Context, cmsID string) (*models.AlrMBIs, error)

GetAlrMBIs takes cms_id and returns all the MBIs associated with the ACO's quarterly ALR

func (*Repository) GetCCLFBeneficiaries

func (r *Repository) GetCCLFBeneficiaries(ctx context.Context, cclfFileID uint, ignoredMBIs []string) ([]*models.CCLFBeneficiary, error)

func (*Repository) GetCCLFBeneficiaryMBIs

func (r *Repository) GetCCLFBeneficiaryMBIs(ctx context.Context, cclfFileID uint) ([]string, error)

func (*Repository) GetCCLFFileExistsByName

func (r *Repository) GetCCLFFileExistsByName(ctx context.Context, name string) (bool, error)

func (*Repository) GetJobByID

func (r *Repository) GetJobByID(ctx context.Context, jobID uint) (*models.Job, error)

func (*Repository) GetJobKey

func (r *Repository) GetJobKey(ctx context.Context, jobID uint, fileName string) (*models.JobKey, error)

func (*Repository) GetJobKeys

func (r *Repository) GetJobKeys(ctx context.Context, jobID uint) ([]*models.JobKey, error)

func (*Repository) GetJobs

func (r *Repository) GetJobs(ctx context.Context, acoID uuid.UUID, statuses ...models.JobStatus) ([]*models.Job, error)

func (*Repository) GetJobsByUpdateTimeAndStatus

func (r *Repository) GetJobsByUpdateTimeAndStatus(ctx context.Context, lowerBound, upperBound time.Time, statuses ...models.JobStatus) ([]*models.Job, error)

func (*Repository) GetLatestCCLFFile

func (r *Repository) GetLatestCCLFFile(ctx context.Context, cmsID string, cclfNum int, importStatus string, lowerBound time.Time, upperBound time.Time, fileType models.CCLFFileType) (*models.CCLFFile, error)

func (*Repository) GetSuppressedMBIs

func (r *Repository) GetSuppressedMBIs(ctx context.Context, lookbackDays int, upperBound time.Time) ([]string, error)

func (*Repository) UpdateACO

func (r *Repository) UpdateACO(ctx context.Context, acoUUID uuid.UUID, fieldsAndValues map[string]interface{}) error

func (*Repository) UpdateCCLFFileImportStatus

func (r *Repository) UpdateCCLFFileImportStatus(ctx context.Context, fileID uint, importStatus string) error

func (*Repository) UpdateJob

func (r *Repository) UpdateJob(ctx context.Context, j models.Job) error

func (*Repository) UpdateSuppressionFileImportStatus

func (r *Repository) UpdateSuppressionFileImportStatus(ctx context.Context, fileID uint, importStatus string) error

Directories

Path Synopsis
Package postgrestest provides CRUD utilities for the postgres database.
Package postgrestest provides CRUD utilities for the postgres database.

Jump to

Keyboard shortcuts

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