Documentation
¶
Overview ¶
Package core defines the common Go model for FYT configuration and timesheets.
Index ¶
- Constants
- Variables
- type Config
- type Directory
- type DocumentsConfig
- type DuplicatePolicy
- type InvoiceAdditionalLine
- type InvoiceConfig
- type InvoiceConfigList
- type InvoiceParty
- type InvoicePartyOverride
- type InvoiceSettings
- type InvoiceSettingsOverride
- type InvoiceTax
- type InvoiceTaxOverride
- type ProcessingConfig
- type ReportsConfig
- type TaxType
- type TimeEntry
- type TimeEntryList
- type TimeEntryStatus
Constants ¶
const GroupName = "fyt.queueb.org"
GroupName is a name for APIs united under single logical group.
Variables ¶
var ( // SchemeBuilder is a scheme builder asset for the package SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) Resource = api.Resource(SchemeGroupVersion) Kind = api.Kind(SchemeGroupVersion) Install = localSchemeBuilder.AddToScheme )
Exported variables
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}
SchemeGroupVersion is group version used to register these objects
Deprecated: Use GroupVersion instead.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
metav1.TypeMeta
metav1.ObjectMeta
InputDirectories []Directory
Reports ReportsConfig
Processing ProcessingConfig
Invoice InvoiceSettings
Documents DocumentsConfig
}
Config keeps default configuration.
func (*Config) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Config) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Directory ¶
type Directory struct {
// Path is the filesystem path of the directory.
Path string
// Description keeps user description if it's required.
Description string
}
Directory identifies a filesystem directory with optional descriptive metadata.
func (*Directory) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Directory.
func (*Directory) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DocumentsConfig ¶
type DocumentsConfig struct {
// OutputDirectory is a Go template for the final PDF output path.
OutputDirectory string
// TemplatesDirectories identifies custom template directories; empty selects the bundled set.
TemplatesDirectories []Directory
}
DocumentsConfig selects output and template directories for PDF generation.
func (*DocumentsConfig) DeepCopy ¶
func (in *DocumentsConfig) DeepCopy() *DocumentsConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DocumentsConfig.
func (*DocumentsConfig) DeepCopyInto ¶
func (in *DocumentsConfig) DeepCopyInto(out *DocumentsConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DuplicatePolicy ¶
type DuplicatePolicy string
DuplicatePolicy selects how proven duplicate entries are handled.
const ( // DuplicatePolicyMerge combines proven duplicates while retaining their sources. DuplicatePolicyMerge DuplicatePolicy = "Merge" // DuplicatePolicyError rejects proven duplicates. DuplicatePolicyError DuplicatePolicy = "Error" )
type InvoiceAdditionalLine ¶
InvoiceAdditionalLine describes an extra charge in the invoice currency.
func (*InvoiceAdditionalLine) DeepCopy ¶
func (in *InvoiceAdditionalLine) DeepCopy() *InvoiceAdditionalLine
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvoiceAdditionalLine.
func (*InvoiceAdditionalLine) DeepCopyInto ¶
func (in *InvoiceAdditionalLine) DeepCopyInto(out *InvoiceAdditionalLine)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InvoiceConfig ¶
type InvoiceConfig struct {
metav1.TypeMeta
Invoice InvoiceSettingsOverride
}
InvoiceConfig carries partial invoice settings for one document.
func (*InvoiceConfig) DeepCopy ¶
func (in *InvoiceConfig) DeepCopy() *InvoiceConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvoiceConfig.
func (*InvoiceConfig) DeepCopyInto ¶
func (in *InvoiceConfig) DeepCopyInto(out *InvoiceConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InvoiceConfig) DeepCopyObject ¶
func (in *InvoiceConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InvoiceConfigList ¶
type InvoiceConfigList struct {
metav1.TypeMeta
metav1.ListMeta
Items []InvoiceConfig
}
InvoiceConfigList carries invoice configurations in order.
func (*InvoiceConfigList) DeepCopy ¶
func (in *InvoiceConfigList) DeepCopy() *InvoiceConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvoiceConfigList.
func (*InvoiceConfigList) DeepCopyInto ¶
func (in *InvoiceConfigList) DeepCopyInto(out *InvoiceConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InvoiceConfigList) DeepCopyObject ¶
func (in *InvoiceConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InvoiceParty ¶
type InvoiceParty struct {
Name string
Details string
Address string
City string
Phone string
Email string
Options map[string]string
}
InvoiceParty identifies an invoice party and carries optional contact and template data.
func (*InvoiceParty) DeepCopy ¶
func (in *InvoiceParty) DeepCopy() *InvoiceParty
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvoiceParty.
func (*InvoiceParty) DeepCopyInto ¶
func (in *InvoiceParty) DeepCopyInto(out *InvoiceParty)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InvoicePartyOverride ¶
type InvoicePartyOverride struct {
Name *string
Details *string
Address *string
City *string
Phone *string
Email *string
Options map[string]string
}
InvoicePartyOverride contains individual party fields. Options replaces the whole map.
func (*InvoicePartyOverride) DeepCopy ¶
func (in *InvoicePartyOverride) DeepCopy() *InvoicePartyOverride
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvoicePartyOverride.
func (*InvoicePartyOverride) DeepCopyInto ¶
func (in *InvoicePartyOverride) DeepCopyInto(out *InvoicePartyOverride)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InvoiceSettings ¶
type InvoiceSettings struct {
// Supplier identifies the invoice supplier; its name defaults to John Doe.
Supplier InvoiceParty
// Customer identifies the invoice customer after configuration defaulting.
Customer *InvoiceParty
// ServiceDescription describes the billed service; defaults to Software development.
ServiceDescription string
// Currency is the denomination of invoice monetary values.
// Defaults to USD when omitted or null in the versioned base configuration.
Currency *string
// HourlyRate is an exact non-negative decimal amount expressed as text.
// Uses digits with an optional fractional part, e.g. "25.50"; defaults to "25".
HourlyRate string
// MonetaryPrecision is the number of fractional digits in totals, from 0 to 6 inclusive.
// Defaults to 2 in the versioned configuration; an explicit zero is valid.
MonetaryPrecision *int32
Tax InvoiceTax
// PaymentInstructions contains optional multiline payment details.
PaymentInstructions string
// AdditionalLines are billed in the order supplied, after any hourly service.
AdditionalLines []InvoiceAdditionalLine
}
InvoiceSettings contains reusable invoice settings.
func (*InvoiceSettings) DeepCopy ¶
func (in *InvoiceSettings) DeepCopy() *InvoiceSettings
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvoiceSettings.
func (*InvoiceSettings) DeepCopyInto ¶
func (in *InvoiceSettings) DeepCopyInto(out *InvoiceSettings)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InvoiceSettingsOverride ¶
type InvoiceSettingsOverride struct {
Supplier *InvoicePartyOverride
Customer *InvoicePartyOverride
ServiceDescription *string
Currency *string
HourlyRate *string
MonetaryPrecision *int32
Tax *InvoiceTaxOverride
PaymentInstructions *string
AdditionalLines []InvoiceAdditionalLine
}
InvoiceSettingsOverride distinguishes absent fields from explicit values.
func (*InvoiceSettingsOverride) DeepCopy ¶
func (in *InvoiceSettingsOverride) DeepCopy() *InvoiceSettingsOverride
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvoiceSettingsOverride.
func (*InvoiceSettingsOverride) DeepCopyInto ¶
func (in *InvoiceSettingsOverride) DeepCopyInto(out *InvoiceSettingsOverride)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InvoiceTax ¶
type InvoiceTax struct {
// Type is None or Percentage.
// Defaults to None when unspecified in the versioned configuration.
Type TaxType
// RatePercent is an exact non-negative decimal percentage.
// Required for Percentage. Uses digits with an optional fractional part, e.g. "7.50".
// Unused and not validated when Type is None.
RatePercent string
}
InvoiceTax describes the invoice tax regime.
func (*InvoiceTax) DeepCopy ¶
func (in *InvoiceTax) DeepCopy() *InvoiceTax
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvoiceTax.
func (*InvoiceTax) DeepCopyInto ¶
func (in *InvoiceTax) DeepCopyInto(out *InvoiceTax)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InvoiceTaxOverride ¶
InvoiceTaxOverride contains individual tax fields.
func (*InvoiceTaxOverride) DeepCopy ¶
func (in *InvoiceTaxOverride) DeepCopy() *InvoiceTaxOverride
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvoiceTaxOverride.
func (*InvoiceTaxOverride) DeepCopyInto ¶
func (in *InvoiceTaxOverride) DeepCopyInto(out *InvoiceTaxOverride)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProcessingConfig ¶
type ProcessingConfig struct {
// DuplicatePolicy selects how proven duplicates are handled: Merge or Error.
// Defaults to Merge when unspecified in the versioned configuration.
DuplicatePolicy DuplicatePolicy
// ShortEntryThreshold is the warning threshold for a complete source entry.
// Defaults to 5m in the versioned configuration; an explicit zero disables warnings.
ShortEntryThreshold *metav1.Duration
}
ProcessingConfig contains settings shared by validation, export and generation.
func (*ProcessingConfig) DeepCopy ¶
func (in *ProcessingConfig) DeepCopy() *ProcessingConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProcessingConfig.
func (*ProcessingConfig) DeepCopyInto ¶
func (in *ProcessingConfig) DeepCopyInto(out *ProcessingConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReportsConfig ¶
type ReportsConfig struct {
// MemberName is the display name used in both reports, independent of Invoice.Supplier.
// Defaults to John Doe when unspecified in the versioned configuration.
MemberName string
}
ReportsConfig contains settings shared by detailed and summary reports.
func (*ReportsConfig) DeepCopy ¶
func (in *ReportsConfig) DeepCopy() *ReportsConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReportsConfig.
func (*ReportsConfig) DeepCopyInto ¶
func (in *ReportsConfig) DeepCopyInto(out *ReportsConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TimeEntry ¶
type TimeEntry struct {
metav1.TypeMeta
metav1.ObjectMeta
// Start period keeps date start period of entry, e.g. 2026-09-01 10:00
Start metav1.Time
// End keeps date end period, e.g. 2026-09-01 12:00
End metav1.Time
// Description keeps human readable description.
Description string
// Ticket is internal system ticket in a free form.
Ticket string
// Status keeps internal status for [TimeEntry] object.
Status TimeEntryStatus
}
TimeEntry keeps a time entry for evaluating reports.
func (*TimeEntry) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeEntry.
func (*TimeEntry) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TimeEntry) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*TimeEntry) GetConditions ¶
GetConditions returns resource conditions.
func (*TimeEntry) SetConditions ¶
SetConditions sets conditions
type TimeEntryList ¶
type TimeEntryList struct {
metav1.TypeMeta
metav1.ListMeta
Meta map[string]string
Items []TimeEntry
}
TimeEntryList represents TimeEntry objects over API.
func (*TimeEntryList) DeepCopy ¶
func (in *TimeEntryList) DeepCopy() *TimeEntryList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeEntryList.
func (*TimeEntryList) DeepCopyInto ¶
func (in *TimeEntryList) DeepCopyInto(out *TimeEntryList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TimeEntryList) DeepCopyObject ¶
func (in *TimeEntryList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TimeEntryStatus ¶
TimeEntryStatus keeps internal status for TimeEntry object. Conditions represented over `Ready` and `Failed` states. Ready and Failed should not have True status sim.
func (*TimeEntryStatus) DeepCopy ¶
func (in *TimeEntryStatus) DeepCopy() *TimeEntryStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeEntryStatus.
func (*TimeEntryStatus) DeepCopyInto ¶
func (in *TimeEntryStatus) DeepCopyInto(out *TimeEntryStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package scheme provides the runtime scheme and codecs for all supported versions of the FYT API.
|
Package scheme provides the runtime scheme and codecs for all supported versions of the FYT API. |
|
Package v1alpha1 defines the types for FYT's v1alpha1 document format.
|
Package v1alpha1 defines the types for FYT's v1alpha1 document format. |
|
Package validation checks FYT configuration and time entries.
|
Package validation checks FYT configuration and time entries. |