Documentation
¶
Overview ¶
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2024 SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func ClearRegistry()
- func FormatSummaryLine(results []CheckResult) string
- func RegisterAudit(c AuditCheck)
- func RegisterInline(c InlineCheck)
- func SaveResults(ctx context.Context, pool *pgxpool.Pool, results []CheckResult, ...) error
- type AssetsChange
- func (c *AssetsChange) Audit(ctx context.Context, pool *pgxpool.Pool, table string, lastChecked *time.Time, ...) ([]CheckResult, error)
- func (c *AssetsChange) DataTypes() []string
- func (c *AssetsChange) Description() string
- func (c *AssetsChange) Name() string
- func (c *AssetsChange) Phase() CheckPhase
- func (c *AssetsChange) Severity() CheckSeverity
- type AuditCheck
- type AuditOptions
- type AuditRunner
- type BalanceSheetIdentity
- func (c *BalanceSheetIdentity) DataTypes() []string
- func (c *BalanceSheetIdentity) Description() string
- func (c *BalanceSheetIdentity) Name() string
- func (c *BalanceSheetIdentity) Phase() CheckPhase
- func (c *BalanceSheetIdentity) Severity() CheckSeverity
- func (c *BalanceSheetIdentity) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
- type CashFlowSum
- func (c *CashFlowSum) DataTypes() []string
- func (c *CashFlowSum) Description() string
- func (c *CashFlowSum) Name() string
- func (c *CashFlowSum) Phase() CheckPhase
- func (c *CashFlowSum) Severity() CheckSeverity
- func (c *CashFlowSum) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
- type Check
- type CheckPhase
- type CheckResult
- type CheckSeverity
- type CurrentRatioCalc
- func (c *CurrentRatioCalc) DataTypes() []string
- func (c *CurrentRatioCalc) Description() string
- func (c *CurrentRatioCalc) Name() string
- func (c *CurrentRatioCalc) Phase() CheckPhase
- func (c *CurrentRatioCalc) Severity() CheckSeverity
- func (c *CurrentRatioCalc) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
- type DuplicateObservations
- func (c *DuplicateObservations) Audit(ctx context.Context, pool *pgxpool.Pool, table string, lastChecked *time.Time, ...) ([]CheckResult, error)
- func (c *DuplicateObservations) DataTypes() []string
- func (c *DuplicateObservations) Description() string
- func (c *DuplicateObservations) Name() string
- func (c *DuplicateObservations) Phase() CheckPhase
- func (c *DuplicateObservations) Severity() CheckSeverity
- type EodWithoutFundamentals
- func (c *EodWithoutFundamentals) Audit(ctx context.Context, pool *pgxpool.Pool, _ string, lastChecked *time.Time, ...) ([]CheckResult, error)
- func (c *EodWithoutFundamentals) DataTypes() []string
- func (c *EodWithoutFundamentals) Description() string
- func (c *EodWithoutFundamentals) Name() string
- func (c *EodWithoutFundamentals) Phase() CheckPhase
- func (c *EodWithoutFundamentals) Severity() CheckSeverity
- type FundamentalsWithoutAsset
- func (c *FundamentalsWithoutAsset) Audit(ctx context.Context, pool *pgxpool.Pool, table string, lastChecked *time.Time, ...) ([]CheckResult, error)
- func (c *FundamentalsWithoutAsset) DataTypes() []string
- func (c *FundamentalsWithoutAsset) Description() string
- func (c *FundamentalsWithoutAsset) Name() string
- func (c *FundamentalsWithoutAsset) Phase() CheckPhase
- func (c *FundamentalsWithoutAsset) Severity() CheckSeverity
- type GrossProfitCalc
- func (c *GrossProfitCalc) DataTypes() []string
- func (c *GrossProfitCalc) Description() string
- func (c *GrossProfitCalc) Name() string
- func (c *GrossProfitCalc) Phase() CheckPhase
- func (c *GrossProfitCalc) Severity() CheckSeverity
- func (c *GrossProfitCalc) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
- type InlineCheck
- type InlineValidator
- type MarginRange
- func (c *MarginRange) Audit(ctx context.Context, pool *pgxpool.Pool, table string, lastChecked *time.Time, ...) ([]CheckResult, error)
- func (c *MarginRange) DataTypes() []string
- func (c *MarginRange) Description() string
- func (c *MarginRange) Name() string
- func (c *MarginRange) Phase() CheckPhase
- func (c *MarginRange) Severity() CheckSeverity
- type MetricFundamentalAgree
- func (c *MetricFundamentalAgree) Audit(ctx context.Context, pool *pgxpool.Pool, _ string, lastChecked *time.Time, ...) ([]CheckResult, error)
- func (c *MetricFundamentalAgree) DataTypes() []string
- func (c *MetricFundamentalAgree) Description() string
- func (c *MetricFundamentalAgree) Name() string
- func (c *MetricFundamentalAgree) Phase() CheckPhase
- func (c *MetricFundamentalAgree) Severity() CheckSeverity
- type MissingQuarters
- func (c *MissingQuarters) Audit(ctx context.Context, pool *pgxpool.Pool, table string, lastChecked *time.Time, ...) ([]CheckResult, error)
- func (c *MissingQuarters) DataTypes() []string
- func (c *MissingQuarters) Description() string
- func (c *MissingQuarters) Name() string
- func (c *MissingQuarters) Phase() CheckPhase
- func (c *MissingQuarters) Severity() CheckSeverity
- type NetIncomeEPS
- func (c *NetIncomeEPS) DataTypes() []string
- func (c *NetIncomeEPS) Description() string
- func (c *NetIncomeEPS) Name() string
- func (c *NetIncomeEPS) Phase() CheckPhase
- func (c *NetIncomeEPS) Severity() CheckSeverity
- func (c *NetIncomeEPS) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
- type OperatingIncomeCalc
- func (c *OperatingIncomeCalc) DataTypes() []string
- func (c *OperatingIncomeCalc) Description() string
- func (c *OperatingIncomeCalc) Name() string
- func (c *OperatingIncomeCalc) Phase() CheckPhase
- func (c *OperatingIncomeCalc) Severity() CheckSeverity
- func (c *OperatingIncomeCalc) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
- type PERange
- func (c *PERange) Audit(ctx context.Context, pool *pgxpool.Pool, table string, lastChecked *time.Time, ...) ([]CheckResult, error)
- func (c *PERange) DataTypes() []string
- func (c *PERange) Description() string
- func (c *PERange) Name() string
- func (c *PERange) Phase() CheckPhase
- func (c *PERange) Severity() CheckSeverity
- type PositiveAssets
- func (c *PositiveAssets) DataTypes() []string
- func (c *PositiveAssets) Description() string
- func (c *PositiveAssets) Name() string
- func (c *PositiveAssets) Phase() CheckPhase
- func (c *PositiveAssets) Severity() CheckSeverity
- func (c *PositiveAssets) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
- type PositiveRevenue
- func (c *PositiveRevenue) DataTypes() []string
- func (c *PositiveRevenue) Description() string
- func (c *PositiveRevenue) Name() string
- func (c *PositiveRevenue) Phase() CheckPhase
- func (c *PositiveRevenue) Severity() CheckSeverity
- func (c *PositiveRevenue) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
- type PositiveShares
- func (c *PositiveShares) DataTypes() []string
- func (c *PositiveShares) Description() string
- func (c *PositiveShares) Name() string
- func (c *PositiveShares) Phase() CheckPhase
- func (c *PositiveShares) Severity() CheckSeverity
- func (c *PositiveShares) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
- type RequiredFields
- func (c *RequiredFields) DataTypes() []string
- func (c *RequiredFields) Description() string
- func (c *RequiredFields) Name() string
- func (c *RequiredFields) Phase() CheckPhase
- func (c *RequiredFields) Severity() CheckSeverity
- func (c *RequiredFields) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
- type RevenueChange
- func (c *RevenueChange) Audit(ctx context.Context, pool *pgxpool.Pool, table string, lastChecked *time.Time, ...) ([]CheckResult, error)
- func (c *RevenueChange) DataTypes() []string
- func (c *RevenueChange) Description() string
- func (c *RevenueChange) Name() string
- func (c *RevenueChange) Phase() CheckPhase
- func (c *RevenueChange) Severity() CheckSeverity
- type StaleData
- func (c *StaleData) Audit(ctx context.Context, pool *pgxpool.Pool, table string, _ *time.Time, ...) ([]CheckResult, error)
- func (c *StaleData) DataTypes() []string
- func (c *StaleData) Description() string
- func (c *StaleData) Name() string
- func (c *StaleData) Phase() CheckPhase
- func (c *StaleData) Severity() CheckSeverity
- type ValidDates
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearRegistry ¶
func ClearRegistry()
func FormatSummaryLine ¶
func FormatSummaryLine(results []CheckResult) string
FormatSummaryLine returns a one-line summary like: "Data quality: 2 critical, 5 errors, 12 warnings" Returns empty string if no results.
func RegisterAudit ¶
func RegisterAudit(c AuditCheck)
func RegisterInline ¶
func RegisterInline(c InlineCheck)
Types ¶
type AssetsChange ¶
type AssetsChange struct{}
AssetsChange detects ARQ records where total_assets changed more than 5x quarter-over-quarter.
func (*AssetsChange) DataTypes ¶
func (c *AssetsChange) DataTypes() []string
func (*AssetsChange) Description ¶
func (c *AssetsChange) Description() string
func (*AssetsChange) Name ¶
func (c *AssetsChange) Name() string
func (*AssetsChange) Phase ¶
func (c *AssetsChange) Phase() CheckPhase
func (*AssetsChange) Severity ¶
func (c *AssetsChange) Severity() CheckSeverity
type AuditCheck ¶
type AuditCheck interface {
Check
Audit(ctx context.Context, pool *pgxpool.Pool, table string, lastChecked *time.Time, lookback *time.Duration) ([]CheckResult, error)
}
func AuditChecks ¶
func AuditChecks() []AuditCheck
type AuditOptions ¶
AuditOptions controls which checks run and over what time range.
type AuditRunner ¶
type AuditRunner struct {
// contains filtered or unexported fields
}
AuditRunner executes a set of AuditChecks and manages run checkpoints.
func NewAuditRunner ¶
func NewAuditRunner(checks []AuditCheck, pool *pgxpool.Pool) *AuditRunner
NewAuditRunner creates an AuditRunner with the given checks and pool.
func (*AuditRunner) Run ¶
func (r *AuditRunner) Run(ctx context.Context, opts AuditOptions, table string) ([]CheckResult, error)
Run executes all matching checks against table and returns the combined results.
type BalanceSheetIdentity ¶
type BalanceSheetIdentity struct{}
BalanceSheetIdentity checks that Assets = Liabilities + Equity within 0.5% tolerance (min 1000). The 0.5% threshold accommodates companies with significant non-controlling interests (e.g. BRK/B ~0.2% NCI) where the equity field uses parent-only StockholdersEquity to match Sharadar.
func (*BalanceSheetIdentity) DataTypes ¶
func (c *BalanceSheetIdentity) DataTypes() []string
func (*BalanceSheetIdentity) Description ¶
func (c *BalanceSheetIdentity) Description() string
func (*BalanceSheetIdentity) Name ¶
func (c *BalanceSheetIdentity) Name() string
func (*BalanceSheetIdentity) Phase ¶
func (c *BalanceSheetIdentity) Phase() CheckPhase
func (*BalanceSheetIdentity) Severity ¶
func (c *BalanceSheetIdentity) Severity() CheckSeverity
func (*BalanceSheetIdentity) Validate ¶
func (c *BalanceSheetIdentity) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
type CashFlowSum ¶
type CashFlowSum struct{}
CashFlowSum checks that OpCF + InvCF + FinCF ~= NetCashFlow within 1% tolerance (min 1M).
func (*CashFlowSum) DataTypes ¶
func (c *CashFlowSum) DataTypes() []string
func (*CashFlowSum) Description ¶
func (c *CashFlowSum) Description() string
func (*CashFlowSum) Name ¶
func (c *CashFlowSum) Name() string
func (*CashFlowSum) Phase ¶
func (c *CashFlowSum) Phase() CheckPhase
func (*CashFlowSum) Severity ¶
func (c *CashFlowSum) Severity() CheckSeverity
func (*CashFlowSum) Validate ¶
func (c *CashFlowSum) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
type Check ¶
type Check interface {
Name() string
Description() string
Phase() CheckPhase
Severity() CheckSeverity
DataTypes() []string
}
type CheckResult ¶
type CheckSeverity ¶
type CheckSeverity int
const ( SeverityInfo CheckSeverity = iota SeverityWarning SeverityError SeverityCritical )
func (CheckSeverity) String ¶
func (s CheckSeverity) String() string
type CurrentRatioCalc ¶
type CurrentRatioCalc struct{}
CurrentRatioCalc checks that CurrentRatio ~= CurrentAssets/CurrentLiabilities within 0.05 absolute tolerance.
func (*CurrentRatioCalc) DataTypes ¶
func (c *CurrentRatioCalc) DataTypes() []string
func (*CurrentRatioCalc) Description ¶
func (c *CurrentRatioCalc) Description() string
func (*CurrentRatioCalc) Name ¶
func (c *CurrentRatioCalc) Name() string
func (*CurrentRatioCalc) Phase ¶
func (c *CurrentRatioCalc) Phase() CheckPhase
func (*CurrentRatioCalc) Severity ¶
func (c *CurrentRatioCalc) Severity() CheckSeverity
func (*CurrentRatioCalc) Validate ¶
func (c *CurrentRatioCalc) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
type DuplicateObservations ¶
type DuplicateObservations struct{}
DuplicateObservations checks for duplicate primary keys (composite_figi, dimension, event_date) within the table having COUNT > 1.
func (*DuplicateObservations) DataTypes ¶
func (c *DuplicateObservations) DataTypes() []string
func (*DuplicateObservations) Description ¶
func (c *DuplicateObservations) Description() string
func (*DuplicateObservations) Name ¶
func (c *DuplicateObservations) Name() string
func (*DuplicateObservations) Phase ¶
func (c *DuplicateObservations) Phase() CheckPhase
func (*DuplicateObservations) Severity ¶
func (c *DuplicateObservations) Severity() CheckSeverity
type EodWithoutFundamentals ¶
type EodWithoutFundamentals struct{}
EodWithoutFundamentals finds tickers with recent EOD data but no recent fundamentals (6 months). Requires both 'eod' and 'fundamentals' views to exist; returns nil if either is absent.
func (*EodWithoutFundamentals) DataTypes ¶
func (c *EodWithoutFundamentals) DataTypes() []string
func (*EodWithoutFundamentals) Description ¶
func (c *EodWithoutFundamentals) Description() string
func (*EodWithoutFundamentals) Name ¶
func (c *EodWithoutFundamentals) Name() string
func (*EodWithoutFundamentals) Phase ¶
func (c *EodWithoutFundamentals) Phase() CheckPhase
func (*EodWithoutFundamentals) Severity ¶
func (c *EodWithoutFundamentals) Severity() CheckSeverity
type FundamentalsWithoutAsset ¶
type FundamentalsWithoutAsset struct{}
FundamentalsWithoutAsset finds fundamentals records whose composite_figi doesn't exist in the assets view.
func (*FundamentalsWithoutAsset) DataTypes ¶
func (c *FundamentalsWithoutAsset) DataTypes() []string
func (*FundamentalsWithoutAsset) Description ¶
func (c *FundamentalsWithoutAsset) Description() string
func (*FundamentalsWithoutAsset) Name ¶
func (c *FundamentalsWithoutAsset) Name() string
func (*FundamentalsWithoutAsset) Phase ¶
func (c *FundamentalsWithoutAsset) Phase() CheckPhase
func (*FundamentalsWithoutAsset) Severity ¶
func (c *FundamentalsWithoutAsset) Severity() CheckSeverity
type GrossProfitCalc ¶
type GrossProfitCalc struct{}
GrossProfitCalc checks that GrossProfit = Revenue - CostOfRevenue within 0.1% tolerance.
func (*GrossProfitCalc) DataTypes ¶
func (c *GrossProfitCalc) DataTypes() []string
func (*GrossProfitCalc) Description ¶
func (c *GrossProfitCalc) Description() string
func (*GrossProfitCalc) Name ¶
func (c *GrossProfitCalc) Name() string
func (*GrossProfitCalc) Phase ¶
func (c *GrossProfitCalc) Phase() CheckPhase
func (*GrossProfitCalc) Severity ¶
func (c *GrossProfitCalc) Severity() CheckSeverity
func (*GrossProfitCalc) Validate ¶
func (c *GrossProfitCalc) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
type InlineCheck ¶
type InlineCheck interface {
Check
Validate(ctx context.Context, obs *data.Observation) ([]CheckResult, bool)
}
func InlineChecks ¶
func InlineChecks() []InlineCheck
type InlineValidator ¶
type InlineValidator struct {
// contains filtered or unexported fields
}
func NewInlineValidator ¶
func NewInlineValidator(checks []InlineCheck) *InlineValidator
func (*InlineValidator) Validate ¶
func (v *InlineValidator) Validate(ctx context.Context, obs *data.Observation) ([]CheckResult, bool)
type MarginRange ¶
type MarginRange struct{}
MarginRange finds records where gross_margin, ebitda_margin, or profit_margin is outside [-10, 10] (and non-zero). Margins outside this range likely indicate data errors. Values in [-10, -1] or [1, 10] are common for pre-revenue startups and early-stage companies.
func (*MarginRange) DataTypes ¶
func (c *MarginRange) DataTypes() []string
func (*MarginRange) Description ¶
func (c *MarginRange) Description() string
func (*MarginRange) Name ¶
func (c *MarginRange) Name() string
func (*MarginRange) Phase ¶
func (c *MarginRange) Phase() CheckPhase
func (*MarginRange) Severity ¶
func (c *MarginRange) Severity() CheckSeverity
type MetricFundamentalAgree ¶
type MetricFundamentalAgree struct{}
MetricFundamentalAgree compares PE between fundamentals and metrics views. Flags records where both are non-zero and differ by > 50%. Requires both views to exist.
func (*MetricFundamentalAgree) DataTypes ¶
func (c *MetricFundamentalAgree) DataTypes() []string
func (*MetricFundamentalAgree) Description ¶
func (c *MetricFundamentalAgree) Description() string
func (*MetricFundamentalAgree) Name ¶
func (c *MetricFundamentalAgree) Name() string
func (*MetricFundamentalAgree) Phase ¶
func (c *MetricFundamentalAgree) Phase() CheckPhase
func (*MetricFundamentalAgree) Severity ¶
func (c *MetricFundamentalAgree) Severity() CheckSeverity
type MissingQuarters ¶
type MissingQuarters struct{}
MissingQuarters uses a LEAD window function to find gaps > 120 days between consecutive ARQ event_dates for the same composite_figi.
func (*MissingQuarters) DataTypes ¶
func (c *MissingQuarters) DataTypes() []string
func (*MissingQuarters) Description ¶
func (c *MissingQuarters) Description() string
func (*MissingQuarters) Name ¶
func (c *MissingQuarters) Name() string
func (*MissingQuarters) Phase ¶
func (c *MissingQuarters) Phase() CheckPhase
func (*MissingQuarters) Severity ¶
func (c *MissingQuarters) Severity() CheckSeverity
type NetIncomeEPS ¶
type NetIncomeEPS struct{}
NetIncomeEPS checks that EPS * SharesDiluted ~= NetIncome within 5% tolerance (min 1M).
func (*NetIncomeEPS) DataTypes ¶
func (c *NetIncomeEPS) DataTypes() []string
func (*NetIncomeEPS) Description ¶
func (c *NetIncomeEPS) Description() string
func (*NetIncomeEPS) Name ¶
func (c *NetIncomeEPS) Name() string
func (*NetIncomeEPS) Phase ¶
func (c *NetIncomeEPS) Phase() CheckPhase
func (*NetIncomeEPS) Severity ¶
func (c *NetIncomeEPS) Severity() CheckSeverity
func (*NetIncomeEPS) Validate ¶
func (c *NetIncomeEPS) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
type OperatingIncomeCalc ¶
type OperatingIncomeCalc struct{}
OperatingIncomeCalc checks that OperatingIncome = GrossProfit - OperatingExpenses within 0.1% tolerance.
func (*OperatingIncomeCalc) DataTypes ¶
func (c *OperatingIncomeCalc) DataTypes() []string
func (*OperatingIncomeCalc) Description ¶
func (c *OperatingIncomeCalc) Description() string
func (*OperatingIncomeCalc) Name ¶
func (c *OperatingIncomeCalc) Name() string
func (*OperatingIncomeCalc) Phase ¶
func (c *OperatingIncomeCalc) Phase() CheckPhase
func (*OperatingIncomeCalc) Severity ¶
func (c *OperatingIncomeCalc) Severity() CheckSeverity
func (*OperatingIncomeCalc) Validate ¶
func (c *OperatingIncomeCalc) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
type PERange ¶
type PERange struct{}
PERange finds records where PE is positive and exceeds 1000, which likely indicates a data error. Negative PE (negative earnings) is normal and not flagged.
func (*PERange) Description ¶
func (*PERange) Phase ¶
func (c *PERange) Phase() CheckPhase
func (*PERange) Severity ¶
func (c *PERange) Severity() CheckSeverity
type PositiveAssets ¶
type PositiveAssets struct{}
PositiveAssets checks that TotalAssets is greater than zero.
func (*PositiveAssets) DataTypes ¶
func (c *PositiveAssets) DataTypes() []string
func (*PositiveAssets) Description ¶
func (c *PositiveAssets) Description() string
func (*PositiveAssets) Name ¶
func (c *PositiveAssets) Name() string
func (*PositiveAssets) Phase ¶
func (c *PositiveAssets) Phase() CheckPhase
func (*PositiveAssets) Severity ¶
func (c *PositiveAssets) Severity() CheckSeverity
func (*PositiveAssets) Validate ¶
func (c *PositiveAssets) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
type PositiveRevenue ¶
type PositiveRevenue struct{}
PositiveRevenue checks that Revenues is >= 0.
func (*PositiveRevenue) DataTypes ¶
func (c *PositiveRevenue) DataTypes() []string
func (*PositiveRevenue) Description ¶
func (c *PositiveRevenue) Description() string
func (*PositiveRevenue) Name ¶
func (c *PositiveRevenue) Name() string
func (*PositiveRevenue) Phase ¶
func (c *PositiveRevenue) Phase() CheckPhase
func (*PositiveRevenue) Severity ¶
func (c *PositiveRevenue) Severity() CheckSeverity
func (*PositiveRevenue) Validate ¶
func (c *PositiveRevenue) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
type PositiveShares ¶
type PositiveShares struct{}
PositiveShares checks that WeightedAverageSharesDiluted is > 0.
func (*PositiveShares) DataTypes ¶
func (c *PositiveShares) DataTypes() []string
func (*PositiveShares) Description ¶
func (c *PositiveShares) Description() string
func (*PositiveShares) Name ¶
func (c *PositiveShares) Name() string
func (*PositiveShares) Phase ¶
func (c *PositiveShares) Phase() CheckPhase
func (*PositiveShares) Severity ¶
func (c *PositiveShares) Severity() CheckSeverity
func (*PositiveShares) Validate ¶
func (c *PositiveShares) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
type RequiredFields ¶
type RequiredFields struct{}
RequiredFields checks that revenues, total_assets, and equity are non-zero.
func (*RequiredFields) DataTypes ¶
func (c *RequiredFields) DataTypes() []string
func (*RequiredFields) Description ¶
func (c *RequiredFields) Description() string
func (*RequiredFields) Name ¶
func (c *RequiredFields) Name() string
func (*RequiredFields) Phase ¶
func (c *RequiredFields) Phase() CheckPhase
func (*RequiredFields) Severity ¶
func (c *RequiredFields) Severity() CheckSeverity
func (*RequiredFields) Validate ¶
func (c *RequiredFields) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
type RevenueChange ¶
type RevenueChange struct{}
RevenueChange detects ARQ records where revenue changed more than 10x quarter-over-quarter.
func (*RevenueChange) DataTypes ¶
func (c *RevenueChange) DataTypes() []string
func (*RevenueChange) Description ¶
func (c *RevenueChange) Description() string
func (*RevenueChange) Name ¶
func (c *RevenueChange) Name() string
func (*RevenueChange) Phase ¶
func (c *RevenueChange) Phase() CheckPhase
func (*RevenueChange) Severity ¶
func (c *RevenueChange) Severity() CheckSeverity
type StaleData ¶
type StaleData struct{}
StaleData groups ARQ records by ticker/composite_figi and flags those whose MAX(event_date) is older than 6 months. Always performs a full scan regardless of lastChecked.
func (*StaleData) Description ¶
func (*StaleData) Phase ¶
func (c *StaleData) Phase() CheckPhase
func (*StaleData) Severity ¶
func (c *StaleData) Severity() CheckSeverity
type ValidDates ¶
type ValidDates struct{}
ValidDates checks that EventDate, ReportPeriod, and DateKey are not in the future.
func (*ValidDates) DataTypes ¶
func (c *ValidDates) DataTypes() []string
func (*ValidDates) Description ¶
func (c *ValidDates) Description() string
func (*ValidDates) Name ¶
func (c *ValidDates) Name() string
func (*ValidDates) Phase ¶
func (c *ValidDates) Phase() CheckPhase
func (*ValidDates) Severity ¶
func (c *ValidDates) Severity() CheckSeverity
func (*ValidDates) Validate ¶
func (c *ValidDates) Validate(_ context.Context, obs *data.Observation) ([]CheckResult, bool)
Source Files
¶
- assets_change.go
- audit_runner.go
- balance_sheet_identity.go
- cash_flow_sum.go
- check.go
- current_ratio_calc.go
- duplicate_observations.go
- eod_without_fundamentals.go
- fundamentals_without_asset.go
- gross_profit_calc.go
- margin_range.go
- metric_fundamental_agree.go
- missing_quarters.go
- net_income_eps.go
- operating_income_calc.go
- pe_range.go
- persistence.go
- positive_assets.go
- positive_revenue.go
- positive_shares.go
- register.go
- registry.go
- required_fields.go
- revenue_change.go
- stale_data.go
- summary.go
- valid_dates.go
- validator.go