core

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package core defines the common Go model for FYT configuration and timesheets.

Index

Constants

View Source
const GroupName = "fyt.queueb.org"

GroupName is a name for APIs united under single logical group.

Variables

View Source
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

View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

GroupVersion specifies the group and the version used to register the objects.

View Source
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

func (in *Config) DeepCopy() *Config

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Config) DeepCopyObject

func (in *Config) DeepCopyObject() runtime.Object

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

func (in *Directory) DeepCopy() *Directory

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Directory.

func (*Directory) DeepCopyInto

func (in *Directory) DeepCopyInto(out *Directory)

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

type InvoiceAdditionalLine struct {
	Description string
	Quantity    string
	UnitPrice   string
}

InvoiceAdditionalLine describes an extra charge in the invoice currency.

func (*InvoiceAdditionalLine) DeepCopy

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

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

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

type InvoiceTaxOverride struct {
	Type        *TaxType
	RatePercent *string
}

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 TaxType

type TaxType string

TaxType identifies an invoice tax regime.

const (
	// TaxTypeNone selects an invoice without tax.
	TaxTypeNone TaxType = "None"
	// TaxTypePercentage selects a percentage tax on the subtotal.
	TaxTypePercentage TaxType = "Percentage"
)

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

func (in *TimeEntry) DeepCopy() *TimeEntry

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeEntry.

func (*TimeEntry) DeepCopyInto

func (in *TimeEntry) DeepCopyInto(out *TimeEntry)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TimeEntry) DeepCopyObject

func (in *TimeEntry) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*TimeEntry) GetConditions

func (c *TimeEntry) GetConditions() *[]metav1.Condition

GetConditions returns resource conditions.

func (*TimeEntry) SetConditions

func (c *TimeEntry) SetConditions(conditions []metav1.Condition)

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

type TimeEntryStatus struct {
	Conditions []metav1.Condition
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL