Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBaselineDate = time.Date(2023, 1, 13, 0, 0, 0, 0, time.UTC)
DefaultBaselineDate represents the first date of the first report: 2023-01-13 This is the reference date to calculate the bi-weekly ranges (used in report number etc.)
Functions ¶
func DiscoverReportNumber ¶
DiscoverReportNumber returns the report number for a given date.
func WeekOfTheYear ¶
WeekOfTheYear returns the week of the year for a given date.
Types ¶
type DateGenerator ¶
func NewDateGenerator ¶
func NewDateGenerator(filename string, startDate string) (*DateGenerator, error)
func (DateGenerator) Persist ¶
func (d DateGenerator) Persist(dates Dates) error
func (DateGenerator) RangeOfDates ¶
func (d DateGenerator) RangeOfDates() (Dates, error)
RangeOfDates generates a list of dates for bi-weekly reports.
type ReportParser ¶
type ReportParser struct {
// contains filtered or unexported fields
}
func NewReportParser ¶
func NewReportParser(file io.Reader) *ReportParser
func (*ReportParser) Parse ¶
func (r *ReportParser) Parse() ([]Report, error)
type ReportProcessor ¶
type ReportProcessor struct {
// contains filtered or unexported fields
}
func NewReportProcessor ¶
func (*ReportProcessor) GenerateFileName ¶
func (rp *ReportProcessor) GenerateFileName(report *Report, reportType string) (string, error)
func (*ReportProcessor) Process ¶
func (rp *ReportProcessor) Process() ([]Report, error)
func (*ReportProcessor) ReplacePlaceholders ¶
func (rp *ReportProcessor) ReplacePlaceholders(report *Report) docx.PlaceholderMap
Click to show internal directories.
Click to hide internal directories.