Documentation ¶
Index ¶
- Variables
- func GetDataTypes(resourceNames ...string) (map[string]DataType, bool)
- func IsSupportedACO(cmsID string) bool
- type ACOConfig
- type CCLFNotFoundError
- type Config
- type DataType
- type JobsNotFoundError
- type MockService
- func (_m *MockService) CancelJob(ctx context.Context, jobID uint) (uint, error)
- func (_m *MockService) GetACOConfigForID(cmsID string) (*ACOConfig, bool)
- func (_m *MockService) GetAlrJobs(ctx context.Context, alrMBI *models.AlrMBIs) []*models.JobAlrEnqueueArgs
- func (_m *MockService) GetJobAndKeys(ctx context.Context, jobID uint) (*models.Job, []*models.JobKey, error)
- func (_m *MockService) GetJobKey(ctx context.Context, jobID uint, filename string) (*models.JobKey, error)
- func (_m *MockService) GetJobPriority(acoID string, resourceType string, sinceParam bool) int16
- func (_m *MockService) GetJobs(ctx context.Context, acoID uuid.UUID, statuses ...models.JobStatus) ([]*models.Job, error)
- func (_m *MockService) GetLatestCCLFFile(ctx context.Context, cmsID string, fileType models.CCLFFileType) (*models.CCLFFile, error)
- func (_m *MockService) GetQueJobs(ctx context.Context, conditions RequestConditions) ([]*models.JobEnqueueArgs, error)
- type RequestConditions
- type RequestType
- type RunoutConfig
- type Service
Constants ¶
This section is empty.
Variables ¶
var ( ErrJobNotCancelled = goerrors.New("Job was not cancelled due to internal server error.") ErrJobNotCancellable = goerrors.New("Job was not cancelled because it is not Pending or In Progress") )
Functions ¶
func GetDataTypes ¶
GetDataTypes creates a map of the given resourceNames with their associated DataType objects It returns the resource map and a status flag, with true meaning all resources were found and mapped.
func IsSupportedACO ¶
IsSupportedACO determines if the particular ACO is supported by checking its CMS_ID against the supported formats.
Types ¶
type ACOConfig ¶
type ACOConfig struct { Model string Pattern string `conf:"name_pattern"` PerfYearTransition string `conf:"performance_year_transition"` LookbackYears int `conf:"lookback_period"` Disabled bool `conf:"disabled" conf_default:"false"` Data []string `conf:"data"` // contains filtered or unexported fields }
func (*ACOConfig) LookbackTime ¶
LookbackTime returns the timestamp that we should use as the lookback time associated with the ACO. We compute lookback time by evaluating the performance year transition and the number of lookback years.
type CCLFNotFoundError ¶
type CCLFNotFoundError struct { FileNumber int CMSID string FileType models.CCLFFileType CutoffTime time.Time }
func (CCLFNotFoundError) Error ¶
func (e CCLFNotFoundError) Error() string
type Config ¶
type Config struct { SuppressionLookbackDays int `conf:"BCDA_SUPPRESSION_LOOKBACK_DAYS" conf_default:"60"` CutoffDurationDays int `conf:"CCLF_CUTOFF_DATE_DAYS" conf_default:"45"` AlrJobSize uint `conf:"alr_job_size" conf_default:"1000"` // Number of entries to put in a single ALR job // Use the squash tag to allow the RunoutConfigs to avoid requiring the parameters // to be defined as a child of RunoutConfig. // Ex: Without the ,squash, we would have to have RunoutConfig.RUNOUT_CUTOFF_DATE_DAYS // With the ,squash, we would have RUNOUT_CUTOFF_DATE_DAYS. RunoutConfig RunoutConfig `conf:",squash"` ACOConfigs []ACOConfig `conf:"aco_config"` // contains filtered or unexported fields }
func LoadConfig ¶
func (*Config) ComputeFields ¶
Parse un-exported fields using the fields loaded via the config
func (*Config) IsACODisabled ¶
type DataType ¶
DataType is used to identify the type of data returned by each resource
func GetDataType ¶
GetDataType gets the DataType associated with the given resourceName
func (DataType) SupportsDataType ¶
SupportsDataType checks if the dataType is supported by the instanced DataType object
type JobsNotFoundError ¶
func (JobsNotFoundError) Error ¶
func (e JobsNotFoundError) Error() string
type MockService ¶
MockService is an autogenerated mock type for the Service type
func (*MockService) GetACOConfigForID ¶
func (_m *MockService) GetACOConfigForID(cmsID string) (*ACOConfig, bool)
func (*MockService) GetAlrJobs ¶
func (_m *MockService) GetAlrJobs(ctx context.Context, alrMBI *models.AlrMBIs) []*models.JobAlrEnqueueArgs
GetAlrJobs provides a mock function with given fields: ctx, alrMBI
func (*MockService) GetJobAndKeys ¶
func (_m *MockService) GetJobAndKeys(ctx context.Context, jobID uint) (*models.Job, []*models.JobKey, error)
GetJobAndKeys provides a mock function with given fields: ctx, jobID
func (*MockService) GetJobKey ¶
func (_m *MockService) GetJobKey(ctx context.Context, jobID uint, filename string) (*models.JobKey, error)
GetJobKey provides a mock function with given fields: ctx, jobID, filename
func (*MockService) GetJobPriority ¶
func (_m *MockService) GetJobPriority(acoID string, resourceType string, sinceParam bool) int16
GetJobPriority provides a mock function with given fields: acoID, resourceType, sinceParam
func (*MockService) GetJobs ¶
func (_m *MockService) GetJobs(ctx context.Context, acoID uuid.UUID, statuses ...models.JobStatus) ([]*models.Job, error)
GetJobs provides a mock function with given fields: ctx, acoID, statuses
func (*MockService) GetLatestCCLFFile ¶
func (_m *MockService) GetLatestCCLFFile(ctx context.Context, cmsID string, fileType models.CCLFFileType) (*models.CCLFFile, error)
GetLatestCCLFFile provides a mock function with given fields: ctx, cmsID, fileType
func (*MockService) GetQueJobs ¶
func (_m *MockService) GetQueJobs(ctx context.Context, conditions RequestConditions) ([]*models.JobEnqueueArgs, error)
GetQueJobs provides a mock function with given fields: ctx, conditions
type RequestConditions ¶
type RequestType ¶
type RequestType uint8
const ( DefaultRequest RequestType = iota RetrieveNewBeneHistData // Allows caller to retrieve all of the data for newly attributed beneficiaries Runout // Allows caller to retrieve claims data for beneficiaries no longer attributed to the ACO )
type RunoutConfig ¶
type RunoutConfig struct { CutoffDurationDays int `conf:"RUNOUT_CUTOFF_DATE_DAYS" conf_default:"180"` ClaimThruDate string `conf:"RUNOUT_CLAIM_THRU_DATE" conf_default:"2020-12-31"` // contains filtered or unexported fields }
func (RunoutConfig) String ¶
func (config RunoutConfig) String() string
type Service ¶
type Service interface { GetQueJobs(ctx context.Context, conditions RequestConditions) (queJobs []*models.JobEnqueueArgs, err error) GetAlrJobs(ctx context.Context, alrMBI *models.AlrMBIs) []*models.JobAlrEnqueueArgs GetJobAndKeys(ctx context.Context, jobID uint) (*models.Job, []*models.JobKey, error) GetJobKey(ctx context.Context, jobID uint, filename string) (*models.JobKey, error) GetJobs(ctx context.Context, acoID uuid.UUID, statuses ...models.JobStatus) ([]*models.Job, error) CancelJob(ctx context.Context, jobID uint) (uint, error) GetJobPriority(acoID string, resourceType string, sinceParam bool) int16 GetLatestCCLFFile(ctx context.Context, cmsID string, fileType models.CCLFFileType) (*models.CCLFFile, error) GetACOConfigForID(cmsID string) (*ACOConfig, bool) }
Service contains all of the methods needed to interact with the data represented in the models package
func NewService ¶
func NewService(r models.Repository, cfg *Config, basePath string) Service