Documentation ¶
Index ¶
- Constants
- func MinMaxDays(periodType string) (int, int, error)
- func NewClient(ctx context.Context, projectID string) (*spanner.Client, error)
- func PeriodOps(periodType string) (periodOps, error)
- func ReadLinesHitCount(ctx context.Context, ns, commit, file string, tp TimePeriod) (map[int]int, error)
- func SaveMergeResult(ctx context.Context, projectID string, covMap map[string]*Coverage, ...) error
- type Coverage
- type DayPeriodOps
- type FileSubsystems
- type FilesRecord
- type HistoryRecord
- type MonthPeriodOps
- type QuarterPeriodOps
- type TimePeriod
- func AtMostNLatestPeriods(periods []TimePeriod, n int) []TimePeriod
- func GenNPeriodsTill(n int, d civil.Date, periodType string) ([]TimePeriod, error)
- func MakeTimePeriod(targetDate civil.Date, periodType string) (TimePeriod, error)
- func NsDataMerged(ctx context.Context, projectID, ns string) ([]TimePeriod, []int64, error)
- func PeriodsToMerge(srcDates, mergedPeriods []TimePeriod, srcRows, mergedRows []int64, ...) []TimePeriod
Constants ¶
View Source
const ( DayPeriod = "day" MonthPeriod = "month" QuarterPeriod = "quarter" )
Variables ¶
This section is empty.
Functions ¶
func ReadLinesHitCount ¶
Types ¶
type DayPeriodOps ¶
type DayPeriodOps struct{}
func (*DayPeriodOps) IsValidPeriod ¶
func (dpo *DayPeriodOps) IsValidPeriod(p TimePeriod) bool
type FileSubsystems ¶
type FilesRecord ¶
type HistoryRecord ¶
type MonthPeriodOps ¶
type MonthPeriodOps struct{}
func (*MonthPeriodOps) IsValidPeriod ¶
func (m *MonthPeriodOps) IsValidPeriod(p TimePeriod) bool
type QuarterPeriodOps ¶
type QuarterPeriodOps struct{}
func (*QuarterPeriodOps) IsValidPeriod ¶
func (q *QuarterPeriodOps) IsValidPeriod(p TimePeriod) bool
type TimePeriod ¶
type TimePeriod struct { DateTo civil.Date Days int Type string // DayPeriod, MonthPeriod, QuarterPeriod. }
func AtMostNLatestPeriods ¶
func AtMostNLatestPeriods(periods []TimePeriod, n int) []TimePeriod
func GenNPeriodsTill ¶
func MakeTimePeriod ¶
func MakeTimePeriod(targetDate civil.Date, periodType string) (TimePeriod, error)
func NsDataMerged ¶
func PeriodsToMerge ¶
func PeriodsToMerge(srcDates, mergedPeriods []TimePeriod, srcRows, mergedRows []int64, ops periodOps) []TimePeriod
func (*TimePeriod) DatesFromTo ¶
func (tp *TimePeriod) DatesFromTo() (civil.Date, civil.Date)
DatesFromTo returns the closed range [fromDate, toDate].
Click to show internal directories.
Click to hide internal directories.