Documentation
¶
Index ¶
- Constants
- type Allocation
- type CBA
- func (cba *CBA) CalcReport() Report
- func (cba *CBA) DeleteAllocationByID(id string)
- func (cba *CBA) DeleteCostByName(name string)
- func (cba *CBA) DeletePhaseByIndex(i int)
- func (cba *CBA) FindAllocationByID(id string) *Allocation
- func (cba *CBA) FindCostByName(name string) *Cost
- func (cba *CBA) FindPhaseByIndex(i int) *Phase
- func (cba *CBA) FindPhaseByName(name string) *Phase
- func (cba *CBA) ListCosts() []string
- func (cba *CBA) ListPhases() []string
- func (cba *CBA) Load(data []byte)
- func (cba *CBA) LoadCostsFromCatalog(data []byte) error
- func (cba *CBA) LoadCostsFromCatalogFile(path string) error
- func (cba *CBA) LoadFile(path string) error
- func (cba *CBA) NewAllocation() *Allocation
- func (cba *CBA) NewCost() *Cost
- func (cba *CBA) NewPhase() *Phase
- func (cba *CBA) RenderingReport(report Report, templateFile string, reportFile string) error
- type CatalogOfCosts
- type Cost
- type Discount
- type Phase
- type Report
- type SubReport
Constants ¶
View Source
const ( CURRENCY_EURO = "euro" CURRENCY_DOLLAR = "dollar" CURRENCY_EURO_SYMBOL = "€" CURRENCY_DOLLAR_SYMBOL = "$" )
View Source
const ( COST_TYPE_LABOR = "labor" COST_TYPE_INVESTMENT = "investment" COST_TYPE_CONSULTING = "consulting" COST_TYPE_OTHERS = "others" COST_METRIC_YEARLY = "yearly" COST_METRIC_DAILY = "daily" COST_METRIC_ONCE = "once" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocation ¶
type Allocation struct {
ID string `json:"id" yaml:"id"`
Cost string `json:"cost" yaml:"cost"`
Occurrence float64 `json:"occurrence" yaml:"occurrence"` // float64 because for labor cost you may have 1.3 FTE for example
Phase int `json:"phase" yaml:"phase"`
Discount string `json:"discount" yaml:"discount"`
}
type CBA ¶
type CBA struct {
Phases []*Phase `json:"phases" yaml:"phases"`
Discounts []*Discount `json:"discounts" yaml:"discounts"`
Costs []*Cost `json:"costs" yaml:"costs"`
Allocations []*Allocation `json:"allocations" yaml:"allocations"`
Currency string `json:"currency" yaml:"currency"`
ValueAddedTax float64 `json:"vat" yaml:"vat"`
VAT bool `json:"vat_enable" yaml:"vat_enable"`
}
func (*CBA) CalcReport ¶
func (*CBA) DeleteAllocationByID ¶
func (*CBA) DeleteCostByName ¶
func (*CBA) DeletePhaseByIndex ¶
func (*CBA) FindAllocationByID ¶
func (cba *CBA) FindAllocationByID(id string) *Allocation
func (*CBA) FindCostByName ¶
func (*CBA) FindPhaseByIndex ¶
func (*CBA) FindPhaseByName ¶
func (*CBA) ListPhases ¶
func (*CBA) LoadCostsFromCatalog ¶
func (*CBA) LoadCostsFromCatalogFile ¶
func (*CBA) NewAllocation ¶
func (cba *CBA) NewAllocation() *Allocation
type CatalogOfCosts ¶
type CatalogOfCosts struct {
Catalog []*Cost `json:"costs" yaml:"costs"`
}
type Cost ¶
type Cost struct {
Name string `json:"name" yaml:"name"`
Metric string `json:"metric" yaml:"metric"`
Type string `json:"type" yaml:"type"`
Amount float64 `json:"amount" yaml:"amount"`
Currency string `json:"currency" yaml:"currency"`
External bool `json:"external" yaml:"external"`
ReadOnly bool `json:"readonly" yaml:"readonly"`
}
Click to show internal directories.
Click to hide internal directories.